/* JoJo's Media: the family home page. Themes set the sky and surfaces; --accent is the person's colour. */
:root, [data-theme="dusk"] {
  --bg: #0c0e1a; --sky1: #3b2a8f; --sky2: #0f5f86; --sky3: #8a2d6b;
  --panel: rgba(22, 25, 44, .62); --panel-2: rgba(34, 38, 64, .72); --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
  --text: #f2f1fa; --muted: #a9a8c3; --faint: #7a7998; --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --accent: #8b7bff; color-scheme: dark;
}
[data-theme="ember"] { --bg: #140d0b; --sky1: #9b3b1c; --sky2: #6b1f3c; --sky3: #b8741c;
  --panel: rgba(38, 22, 18, .62); --panel-2: rgba(56, 32, 26, .72); --text: #fbefe8; --muted: #c9aa9b; --faint: #8f7468; }
[data-theme="forest"] { --bg: #08130f; --sky1: #145c45; --sky2: #2a5c1a; --sky3: #0d5560;
  --panel: rgba(16, 34, 28, .62); --panel-2: rgba(24, 48, 40, .72); --text: #eaf6ef; --muted: #9ebfae; --faint: #6c8c7c; }
[data-theme="day"] { --bg: #f6f2ea; --sky1: #ffd6b0; --sky2: #bfe0ff; --sky3: #f5c6e4;
  --panel: rgba(255, 255, 255, .7); --panel-2: rgba(255, 255, 255, .88); --line: rgba(30, 25, 50, .09); --line-2: rgba(30, 25, 50, .17);
  --text: #1d1a2b; --muted: #5d5872; --faint: #8e899e; --shadow: 0 18px 44px -24px rgba(60, 40, 90, .35); color-scheme: light; }

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: transparent; overflow-x: clip;
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

/* Slow aurora behind everything */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 38s ease-in-out infinite alternate; }
.sky i:nth-child(1) { background: var(--sky1); top: -30vmax; left: -15vmax; }
.sky i:nth-child(2) { background: var(--sky2); top: -20vmax; right: -25vmax; animation-duration: 46s; animation-delay: -12s; }
.sky i:nth-child(3) { background: var(--sky3); bottom: -45vmax; left: 20vmax; opacity: .35; animation-duration: 52s; animation-delay: -20s; }
[data-theme="day"] .sky i { opacity: .7; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .sky i { animation: none; } * { transition: none !important; } }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 40px); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 55%, transparent); border-bottom: 1px solid var(--line); }
.top > * { min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; letter-spacing: -.02em; font-size: 17px; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #ff4f8b)); box-shadow: 0 6px 18px -6px var(--accent); }
.search { justify-self: center; width: min(620px, 100%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; transition: box-shadow .2s, border-color .2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.search svg { color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 50%, transparent); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--accent); color: #fff; }
.me { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 600; }
.me:hover { border-color: var(--accent); }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #22c4ff)); }
.dot { position: absolute; top: 2px; left: 28px; width: 11px; height: 11px; border-radius: 50%; background: #ff4f6d; border: 2px solid var(--bg); }

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }

/* Greeting */
.hero { padding: clamp(36px, 7vw, 76px) 0 18px; }
.when { margin: 0 0 6px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.hero h1 { margin: 0; font-size: clamp(38px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
.hero h1 b { background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #ff7ab8) 60%, color-mix(in srgb, var(--accent) 40%, #ffd36b));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px); color: var(--muted); text-decoration: none; }
.chip b { color: var(--text); }
.chip .led { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .18); }

/* Sections */
.block { margin-top: 38px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.head h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; font-weight: 750; }
.ghost { border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; padding: 4px 2px; }
.ghost:hover { color: var(--text); }

/* App tiles: colour blocks, like a TV's launcher */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.app { --c: #7b5cff; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 26px; min-height: 150px;
  padding: 18px; border-radius: 22px; overflow: hidden; text-decoration: none; color: #fff; isolation: isolate;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 92%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, var(--shadow); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.app::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 75%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); z-index: -1; transition: transform .4s; }
.app:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 22px 50px -18px var(--c); }
.app:hover::after { transform: scale(1.25); }
.app .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.app .ic svg { width: 24px; height: 24px; stroke-width: 2; }
.app b { display: block; font-size: 18px; letter-spacing: -.015em; }
.app small { display: block; opacity: .86; font-size: 13.5px; line-height: 1.35; }

/* My links */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.mylink { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 16px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); transition: border-color .2s, transform .2s; }
.mylink:hover { border-color: var(--accent); transform: translateY(-2px); }
.mylink .fav { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--accent); }
.mylink small { display: block; color: var(--faint); font-size: 12px; }

/* Poster shelf */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 156px; gap: 14px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.card { scroll-snap-align: start; text-decoration: none; }
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.card:hover .cover { transform: translateY(-4px); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.game { display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c) 40%, color-mix(in srgb, var(--c) 40%, #000)); }
.cover.game svg { position: absolute; top: 12px; left: 12px; width: 26px; height: 26px; opacity: .9; }
.cover.game span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.cover .tag { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.card b { display: block; margin-top: 9px; font-size: 14px; line-height: 1.3; font-weight: 650; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card small { color: var(--faint); font-size: 12.5px; }
.empty { color: var(--faint); padding: 20px 0; }

/* Play together */
.together { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.panel { position: relative; padding: 18px 20px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(16px); }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.panel li:first-child { border-top: 0; }
.panel li a { font-weight: 600; text-decoration: none; }
.panel li a:hover { color: var(--accent); }
.panel li span { color: var(--faint); font-size: 13px; text-align: right; }
.panel dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.panel dl div { padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 35%, transparent); border: 1px solid var(--line); }
.panel dt { font-size: 12px; color: var(--faint); font-weight: 600; }
.panel dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; line-height: 1.3; }
.panel dd.big { font-size: 26px; letter-spacing: -.03em; }
.more { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 650; font-size: 14px; text-decoration: none; }

.foot { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 30px 16px 40px; color: var(--faint); font-size: 14px; }
.foot a, .foot button { color: var(--muted); background: none; border: 0; padding: 0; text-decoration: none; font-weight: 600; }
.foot a:hover, .foot button:hover { color: var(--text); }

/* Drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5, 5, 15, .45); backdrop-filter: blur(3px); animation: fade .2s; }
.drawer { position: fixed; z-index: 41; top: 10px; right: 10px; bottom: 10px; width: min(440px, calc(100vw - 20px)); display: flex; flex-direction: column;
  border-radius: 26px; background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .6);
  animation: slide .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 22px 10px; }
.d-kicker { margin: 0; color: var(--faint); font-size: 13px; }
.d-head h2 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.03em; }
.x { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--panel-2); }
.tabs { display: flex; gap: 4px; margin: 6px 22px 0; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; }
.tabs button { flex: 1; border: 0; background: none; padding: 7px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.tabs button.on { background: var(--panel-2); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff4f6d; color: #fff; font-size: 11px; }
.d-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.d-body h4 { margin: 18px 0 10px; font-size: 13px; color: var(--muted); font-weight: 650; }
.d-body h4:first-child { margin-top: 0; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.d-body input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; outline: 0; }
.d-body input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme { position: relative; height: 82px; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--line); text-align: left; font-weight: 700; overflow: hidden; color: #fff; }
.theme[data-t="day"] { color: #1d1a2b; }
.theme.on { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; background: var(--c); box-shadow: 0 0 0 1px var(--line-2); }
.sw.on { border-color: var(--bg); box-shadow: 0 0 0 3px var(--c); }
.toggles, .mylinks, .people { list-style: none; margin: 0; padding: 0; }
.toggles li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggles li:first-child { border-top: 0; }
.toggles .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; }
.toggles .ic svg { width: 18px; height: 18px; }
.toggles label { flex: 1; font-weight: 600; cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; width: 44px !important; height: 26px; padding: 0 !important; border-radius: 999px !important; background: var(--line-2) !important;
  position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch:checked { background: var(--accent) !important; }
.switch:checked::after { transform: translateX(18px); }
.mylinks li, .people li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.mylinks li:first-child, .people li:first-child { border-top: 0; }
.mylinks small, .people small { display: block; color: var(--faint); font-size: 12.5px; overflow-wrap: anywhere; }
.people li.pending small { color: var(--accent); }
.people .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mini { padding: 6px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 13px; font-weight: 600; }
.mini:hover { border-color: var(--accent); }
.mini.yes, .solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.solid { padding: 11px 16px; border-radius: 12px; border: 0; font-weight: 700; }
.add { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-top: 14px; }
.pw { display: grid; gap: 10px; }
.pw h4 { margin: 0 0 2px !important; }
.wide { width: 100%; margin-top: 20px; padding: 11px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 650; }
.d-status { margin: 0; padding: 12px 22px 18px; min-height: 46px; font-size: 14px; color: var(--muted); }
.d-status.bad { color: #ff7a8a; }
.none { color: var(--faint); }

@media (max-width: 760px) {
  .top { grid-template-columns: auto auto; gap: 12px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .me { justify-self: end; }
  .me-name, .brand span:last-child { display: none; }
  .seg button { padding: 6px 8px; font-size: 12px; }
  .search { padding-left: 12px; gap: 6px; }
  .apps { grid-template-columns: 1fr 1fr; gap: 10px; }
  .app { min-height: 128px; padding: 14px; border-radius: 18px; }
  .app small { display: none; }
  .shelf { grid-auto-columns: 128px; }
  .panel dl { grid-template-columns: 1fr 1fr; }
  .panel dl div:last-child { grid-column: 1 / -1; }
  .panel li { flex-direction: column; gap: 2px; }
  .panel li span { text-align: left; }
  .add { grid-template-columns: 1fr; }
}

/* five-star-web motion system.
   Durations and curves are taken from measured top sites (see references/research.md).
   Base states are always VISIBLE: animations only describe how things arrive, so
   with animations off (reduced motion, print, no JS, screenshot tools) the page is complete. */

:root {
  /* Three bands: feedback / movement / moments */
  --dur-instant: 100ms;   /* colour, hover tint (Linear 100ms, Vercel 100ms) */
  --dur-fast: 180ms;      /* hover lift, press, focus ring */
  --dur-base: 320ms;      /* cards, menus, small reveals (Stripe 300, Apple 320) */
  --dur-slow: 420ms;      /* list stagger items, drawers (Raycast 400) */
  --dur-moment: 750ms;    /* hero entrance, wipes, panel swap (Linear 700, Lando 750) */
  --dur-epic: 1000ms;     /* cinematic reveals only (Riot 1s) */

  --ease-out: cubic-bezier(.23, 1, .32, 1);        /* easeOutQuint: default for things arriving */
  --ease-out-soft: cubic-bezier(.25, 1, .5, 1);    /* easeOutQuart: Stripe's everything-curve */
  --ease-expo: cubic-bezier(.16, 1, .3, 1);        /* long cinematic arrivals */
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);      /* drawers, sheets, panels (iOS / Linear) */
  --ease-wipe: cubic-bezier(.65, .05, 0, 1);       /* clip-path wipes that cross the screen */
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);       /* things that move from A to B while visible */
  --ease-in: cubic-bezier(.4, 0, 1, 1);            /* things leaving */

  /* Springs as CSS linear(): pair with the duration noted */
  --spring-gentle: linear(0, 0.072, 0.218, 0.391, 0.561, 0.711, 0.831, 0.922, 0.984, 1.023, 1.043, 1.05, 1.049, 1.043, 1.034, 1.026, 1.018, 1.011, 1.006, 1.002, 1, 0.998, 0.998, 0.997, 0.998, 0.999, 1);  /* ~690ms, 5% overshoot */
  --spring-bouncy: linear(0, 0.058, 0.183, 0.349, 0.529, 0.703, 0.858, 0.984, 1.079, 1.141, 1.175, 1.184, 1.174, 1.151, 1.121, 1.088, 1.056, 1.027, 1.004, 0.986, 0.974, 0.968, 0.972, 0.978, 0.984, 0.99, 0.995, 0.999, 1);  /* ~920ms, 18% overshoot: playful styles only */

  --stagger: 60ms;        /* per-item delay; cap the visible chain at ~8 items */
  --rise: 24px;           /* reveal travel distance; 12px on dense UIs, 48px on showpieces */
}

/* ---------- Feedback ---------- */
.lift { transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .lift:hover { transform: translateY(-2px); } }
.press { transition: transform var(--dur-instant) var(--ease-out); }
.press:active { transform: scale(.97); }
.tint { transition: color var(--dur-instant) var(--ease-out), background-color var(--dur-instant) var(--ease-out), border-color var(--dur-instant) var(--ease-out); }
:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 3px; }

/* ---------- Scroll reveals ----------
   <div data-reveal>…</div>            fade + rise
   <div data-reveal="wipe">…</div>     clip-path wipe from bottom
   <div data-reveal="scale">…</div>    soft scale-in (images, cards)
   <ul data-stagger><li>…</li></ul>    children arrive in sequence (motion.js sets --i)
   Uses CSS scroll timelines where supported, IntersectionObserver (motion.js) otherwise. */
@keyframes fs-rise  { from { opacity: 0; transform: translateY(var(--rise)); } }
@keyframes fs-wipe  { from { clip-path: inset(100% 0 0 0); } }
@keyframes fs-scale { from { opacity: 0; transform: scale(.94); } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    [data-reveal], [data-stagger] > * {
      animation: fs-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    [data-reveal="wipe"]  { animation-name: fs-wipe; }
    [data-reveal="scale"] { animation-name: fs-scale; }
    /* scroll-linked animations ignore delay, so stagger by shifting the range */
    [data-stagger] > * { animation-range: entry calc(var(--i, 0) * 4%) entry calc(60% + var(--i, 0) * 4%); }
  }
  @supports not (animation-timeline: view()) {
    .fs-js [data-reveal]:not(.is-in), .fs-js [data-stagger] > :not(.is-in) { opacity: 0; transform: translateY(var(--rise)); }
    .fs-js [data-reveal="wipe"]:not(.is-in) { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); }
    .fs-js [data-reveal], .fs-js [data-stagger] > * {
      transition: opacity var(--dur-moment) var(--ease-out), transform var(--dur-moment) var(--ease-out), clip-path var(--dur-moment) var(--ease-wipe);
      transition-delay: calc(var(--i, 0) * var(--stagger));
    }
  }
}

/* ---------- Hero entrance (plays once on load, time-based) ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] { animation: fs-rise var(--dur-moment) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  [data-enter="wipe"] { animation-name: fs-wipe; animation-timing-function: var(--ease-wipe); }
  /* split headline: motion.js wraps words in <span class="w" style="--i:n"> */
  [data-split] .w { display: inline-block; animation: fs-rise var(--dur-moment) var(--ease-out) both; animation-delay: calc(var(--i) * 40ms + 80ms); }
  [data-split="mask"] .w { animation-name: fs-wipe; }
}

/* ---------- Marquee (logos, posters, tickers) ----------
   <div class="marquee"><div class="marquee__track">items…</div></div>; motion.js duplicates the track. */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: var(--marquee-gap, 3rem); width: max-content; }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: fs-marquee var(--marquee-dur, 40s) linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
@keyframes fs-marquee { to { transform: translateX(calc(-50% - var(--marquee-gap, 3rem) / 2)); } }

/* ---------- Live indicator (markets, streams, presence) ---------- */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live, #22c55e); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live, #22c55e) 60%, transparent); }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: fs-pulse 1.6s var(--ease-out) infinite; } }
@keyframes fs-pulse { to { box-shadow: 0 0 0 8px transparent; } }

/* ---------- Reading / scroll progress ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent, currentColor); transform-origin: 0 50%; transform: scaleX(0); z-index: 100; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress { animation: fs-progress linear both; animation-timeline: scroll(root); }
  }
}
@keyframes fs-progress { to { transform: scaleX(1); } }

/* ---------- Page / state changes ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: var(--dur-base) var(--ease-in) both fs-fade-out; }
  ::view-transition-new(root) { animation: var(--dur-base) var(--ease-out) both fs-fade-in; }
}
@keyframes fs-fade-out { to { opacity: 0; } }
@keyframes fs-fade-in { from { opacity: 0; } }

/* ---------- Reduced motion: keep feedback, drop travel ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .lift:hover { transform: none; }
}

/* The home canvas. Every surface belongs to the same movable widget system. */
:root{--ease-canvas:cubic-bezier(.23,1,.32,1)}
body{font-size:16px}button,a,input{touch-action:manipulation}button{min-height:44px}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:4px} [hidden]{display:none!important}
#wallpaper{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}.sky{opacity:.3}.top{max-width:1480px;margin:auto;background:transparent;border:0;padding:24px 4vw}.brand .logo{background:var(--panel-2);border:1px solid var(--line-2);color:var(--text)}
main{max-width:1480px;padding:0 4vw 32px}.hero{padding:48px 0 36px}.eyebrow{font-size:11px;letter-spacing:.18em;font-weight:700;color:var(--muted)}.hero>.eyebrow{margin-bottom:24px}.hero h1{font-weight:450;font-size:clamp(36px,5vw,68px);letter-spacing:-.055em;line-height:1.12}.hero h1 b{font-weight:550;background:none;color:var(--text)}.when{font-size:14px;font-weight:400;margin-bottom:14px}.canvas-tools{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}.canvas-tools button{width:auto;margin:0;padding:10px 18px;border-radius:14px}.solid{color:#111426;background:#c0b4ff;border:0}.chip{font-weight:400}.chip b{font-weight:600}
.widget-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;align-items:start}.widget{grid-column:span 6;min-width:0;margin:0;padding:24px;border:1px solid var(--line-2);border-radius:26px;background:color-mix(in srgb,var(--bg) 76%,transparent);backdrop-filter:blur(24px);box-shadow:0 12px 55px #00000012;animation:widget-arrive .75s var(--ease-canvas) both;transition:transform .32s var(--ease-canvas),border-color .18s var(--ease-canvas)}.widget:nth-child(2){animation-delay:60ms}.widget:nth-child(3){animation-delay:120ms}.widget:nth-child(4){animation-delay:180ms}.widget:hover{border-color:color-mix(in srgb,var(--accent) 45%,transparent)}.widget[data-widget=apps],.widget[data-widget=recent],.widget.wide-widget{grid-column:span 12}.head h2{font-size:18px;font-weight:600}.apps{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.app{min-height:90px;flex-direction:row;align-items:center;justify-content:start;gap:14px;padding:16px;background:color-mix(in srgb,var(--c) 8%,var(--panel-2));color:var(--text);box-shadow:none;border:1px solid var(--line);border-radius:17px}.app .ic{background:color-mix(in srgb,var(--c) 20%,transparent);color:color-mix(in srgb,var(--c) 60%,var(--text));width:44px;height:44px;flex-shrink:0}.app b{font-size:15px}.app small{font-size:12px;color:var(--muted)}.app::after{display:none}.app:hover{transform:translateY(-3px);box-shadow:0 8px 28px #0002}.shelf{padding-bottom:8px}.card{width:145px;flex:0 0 145px}.cover{border-radius:14px}.together{grid-template-columns:1fr}.panel{background:transparent;border:0;border-radius:0;padding:8px 0}.panel+.panel{border-top:1px solid var(--line);padding-top:20px}.clock-time{font-size:clamp(44px,6vw,80px);letter-spacing:-.065em;font-weight:300;font-variant-numeric:tabular-nums;margin:24px 0}.admin-label{border:1px solid var(--line-2);border-radius:6px;padding:5px 8px;font-size:10px;letter-spacing:.12em;color:var(--muted)}.admin-count{font-size:64px;letter-spacing:-.05em}.people{padding:0;list-style:none}.people li{flex-wrap:wrap;gap:12px}.people small{display:block}.acts{display:flex;flex-wrap:wrap;gap:6px}.admin-status{overflow-wrap:anywhere}.foot{margin:12px auto 32px}.drawer{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(680px,calc(100% - 32px));height:auto;max-height:88dvh;border:1px solid var(--line-2);border-radius:28px;box-shadow:0 32px 160px #0009;animation:panel-arrive .42s var(--ease-canvas);background:var(--bg)}.d-body{overflow:auto}.tabs{flex-wrap:wrap}.d-head{padding:24px}.shader-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.shader-choice{min-height:80px;padding:15px 10px;border:1px solid var(--line-2);border-radius:15px;background:radial-gradient(ellipse at 20% 0%,var(--preview,#4f4688),var(--panel-2));color:var(--text);text-align:left}.shader-choice small{display:block;margin-top:5px;opacity:.75;font-size:11px}.shader-choice.on{outline:2px solid var(--accent);outline-offset:2px}.shader-controls{display:flex;gap:16px;margin:24px 0}.shader-controls label{flex:1;font-size:14px}.shader-controls input{display:block;width:100%;margin-top:10px}.import-label{display:block;cursor:pointer;margin-top:16px;padding:14px}.import-label input{display:block;font-size:12px;margin-top:10px;max-width:100%}#shader-error{color:var(--muted);overflow-wrap:anywhere;font-size:13px}.widget-option{display:flex;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}.widget-option label{flex:1}.widget-option input{margin-right:10px}.widget-option button,.layout-controls button{border:1px solid var(--line-2);border-radius:9px;background:var(--panel-2);color:var(--text);padding:6px 12px}.layout-controls{display:none;gap:6px;margin-bottom:16px}.arranging .layout-controls{display:flex}.arranging .widget{border-style:dashed}.arranging .widget[draggable=true]{cursor:grab}.widget.dragging{opacity:.45}.arranging .widget.drag-over{outline:2px solid var(--accent)}
@keyframes widget-arrive{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}@keyframes panel-arrive{from{opacity:0;translate:0 20px}to{opacity:1;translate:0 0}}
@media(min-width:1000px){.widget[data-widget=apps]{grid-column:span 8}.widget[data-widget=clock]{grid-column:span 4}.apps{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.top{padding:16px}.hero{padding-top:30px}.hero>.eyebrow{margin-bottom:18px}main{padding:0 16px 24px}.widget-grid{gap:14px}.widget{grid-column:span 12!important;padding:20px;border-radius:22px}.apps{grid-template-columns:repeat(2,minmax(0,1fr))}.app{flex-direction:column;align-items:start;gap:10px;padding:14px}.app small{line-height:1.4}.search{order:3}.card{width:125px;flex-basis:125px}.canvas-tools{gap:7px}.canvas-tools button{font-size:13px;padding:9px 12px}.shader-options{grid-template-columns:repeat(2,minmax(0,1fr))}.drawer{max-height:92dvh}.d-head{padding:18px}.widget-option{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.d-body .widget-option input{width:20px;height:20px;padding:0;vertical-align:middle}.widget[data-widget].wide-widget{grid-column:span 12}.top{position:relative}.app small{display:block}.shader-choice small{color:#eee}.shader-choice{color:#fff}#canvas-status{color:var(--muted);font-size:13px}.scrim{backdrop-filter:blur(8px)}
.access-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:28px 0}.access-stats strong{display:block;font-size:38px;font-weight:450;letter-spacing:-.05em}.access-stats span{font-size:12px;color:var(--muted)}
/* Edit only what you need: a move handle, hide button and resize corner. */
.hero{padding:32px 0 26px}.hero h1{font-size:clamp(34px,4.6vw,60px)}.widget{position:relative}.layout-controls{justify-content:space-between;align-items:center}.layout-controls button{background:transparent;border:0;color:var(--muted);padding:4px 10px}.widget-grip{cursor:grab;touch-action:none;user-select:none}.widget-grip span{font-size:12px}.widget-resize{display:none;position:absolute;bottom:5px;right:5px;width:44px;height:44px;border:0;border-radius:12px;background:var(--bg);color:var(--muted);cursor:nwse-resize;touch-action:none;z-index:2}.arranging .widget-resize{display:block}.arranging .widget{padding-bottom:50px}.widget.sized-widget{overflow:auto;min-height:180px}.widget.manipulating{transition:none;animation:none}.widget.dragging{opacity:.55}.widget .apps{grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr))}.widget .head{flex-wrap:wrap}.widget .head h2{overflow-wrap:anywhere}.widget .app{min-width:0}.widget .app span{min-width:0;overflow-wrap:anywhere}.widget .clock-time{font-size:clamp(32px,4.5vw,72px)}.widget .access-stats{grid-template-columns:repeat(auto-fit,minmax(60px,1fr))}#layout-hint{margin:0 0 18px}.widget-grip:active{cursor:grabbing}
@media(max-width:760px){.widget.sized-widget{height:auto!important;min-height:var(--mobile-height,180px)}.widget-resize{cursor:ns-resize}.hero{padding-top:24px}}
/* Independent app windows on a quiet desktop. */
.app-window{grid-column:span 4}.app-content{display:flex;flex-direction:column;align-items:flex-start;min-height:150px;gap:10px}.app-content h2{font-size:22px;margin:0;font-weight:550;letter-spacing:-.035em}.app-content p{margin:0;color:var(--muted);font-size:14px}.app-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:color-mix(in srgb,var(--c) 18%,transparent);color:var(--c)}.open-app{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-top:auto;padding:10px 0;text-decoration:none;font-size:14px}.open-app:hover{color:var(--accent)}
.free-windows{display:block;position:relative}.free-windows>.widget{position:absolute;margin:0;min-width:0;overflow:auto;animation:none;padding:16px 20px 36px;grid-column:auto!important}.free-windows .layout-controls{display:flex;margin:-6px -8px 14px;gap:8px;position:sticky;top:-16px;background:var(--bg);border-radius:10px;z-index:3}.free-windows .widget-grip{flex:1;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.free-windows .layout-controls [data-hide]{opacity:0;transition:opacity .18s var(--ease-canvas)}.free-windows .widget-resize{display:block;opacity:0;transition:opacity .18s var(--ease-canvas)}.free-windows .widget:hover [data-hide],.free-windows .widget:focus-within [data-hide],.free-windows .widget:hover .widget-resize,.free-windows .widget:focus-within .widget-resize,.arranging .free-windows [data-hide],.arranging .free-windows .widget-resize{opacity:1}.free-windows .widget.manipulating{box-shadow:0 24px 80px #0005;border-color:var(--accent)}.free-windows .app-content h2{display:none}.free-windows .widget-grip span{font-size:14px;font-weight:550;color:var(--text)}
@media(hover:none){.free-windows .widget-resize,.free-windows .layout-controls [data-hide]{opacity:1}}
@media(max-width:760px){.app-window{grid-column:span 12}.app-content{min-height:130px}}
/* Live status: app cards, hero chip, Server status widget */
html body .chip .led.bad{background:#e5534b;box-shadow:0 0 0 3px color-mix(in srgb,#e5534b 22%,transparent)}html body .chip .led.wait{background:var(--faint);box-shadow:none;animation:led-wait 1.2s ease-in-out infinite}
@keyframes led-wait{50%{opacity:.35}}
.app-state{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--muted);padding:3px 8px 3px 7px;border-radius:999px;background:color-mix(in srgb,var(--text) 6%,transparent)}
.app-state::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--good,#3ddc84)}
.app-state.down{color:#e5534b;background:color-mix(in srgb,#e5534b 12%,transparent)}.app-state.down::before{background:#e5534b}
.app-window{cursor:pointer;transition:transform .2s var(--ease-canvas,ease),box-shadow .2s}.app-window:hover .open-app span{transform:translate(2px,-2px)}.open-app span{display:inline-block;transition:transform .2s}
.status-list{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:2px 18px}
.status-list li{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);min-width:0;font-size:14px}
.status-list .led{flex:0 0 7px;height:7px;border-radius:50%;background:var(--good,#3ddc84);box-shadow:0 0 0 3px color-mix(in srgb,var(--good,#3ddc84) 20%,transparent)}.status-list .led.bad{background:#e5534b;box-shadow:0 0 0 3px color-mix(in srgb,#e5534b 22%,transparent)}
.status-list a{color:var(--text);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-list a:hover{color:var(--accent)}
.status-list small{margin-left:auto;color:var(--faint);font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}.status-list li.down small{color:#e5534b}.status-list .none{color:var(--muted)}
#admin-people{overflow:visible}
/* Open anything: the search box's list */
.search{position:relative}
.launch{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:40;max-height:min(420px,60vh);overflow:auto;padding:6px;border-radius:16px;background:var(--bg);border:1px solid var(--line-2);box-shadow:0 24px 70px #0007;text-align:left;animation:launch-in .16s ease-out}
@keyframes launch-in{from{opacity:0;transform:translateY(-4px)}}
.launch-head{margin:6px 10px 4px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.launch-item{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:11px;color:var(--text);text-decoration:none;min-width:0}
.launch-item.on{background:color-mix(in srgb,var(--accent) 16%,transparent)}
.launch-item .ic{flex:0 0 30px;height:30px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--c) 20%,transparent);color:var(--c)}.launch-item .ic svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.launch-item.is-search .ic{background:color-mix(in srgb,var(--text) 7%,transparent);color:var(--muted)}
.launch-item>span:nth-child(2){min-width:0;flex:1}.launch-item b{display:block;font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.launch-item small{display:block;font-size:12px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.launch-item kbd{font:500 12px inherit;color:var(--faint);min-width:14px}
@media(prefers-reduced-motion:reduce){.launch{animation:none}html body .chip .led.wait{animation:none}}
.hero{position:relative;z-index:30}#q:focus-visible{outline:none}
/* Widgets: the Workbench desk. 8-column snap grid (4 on narrow screens), rows 78px, gaps 12px */
#widget-grid.desk{display:block;position:relative;min-height:0;transition:height .3s var(--ease,ease)}
#widget-grid.desk.edit{background-image:radial-gradient(var(--line-2) 1.4px,transparent 1.8px);background-size:calc(var(--cw) + var(--g)) calc(var(--ch) + var(--g));background-position:calc(var(--g) / -2) calc(var(--g) / -2);border-radius:12px;outline:1.5px dashed var(--line-2);outline-offset:6px}
#widget-grid.desk>.widget{position:absolute;display:flex;flex-direction:column;margin:0;padding:14px;min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;user-select:none;animation:none;grid-column:auto!important;
  border-radius:16px;background:var(--s1,var(--panel-2));border:0;box-shadow:var(--sh,0 8px 30px #0003),0 0 0 1px var(--line);backdrop-filter:none;
  transition:left .3s var(--ease,ease),top .3s var(--ease,ease),width .3s var(--ease,ease),height .3s var(--ease,ease),box-shadow .2s,transform .2s var(--ease,ease)}
#widget-grid.desk>.widget:hover{box-shadow:var(--sh,0 8px 30px #0003),0 0 0 1px var(--line-2)}
@media (pointer:fine){#widget-grid.desk>.widget{cursor:grab}}
#widget-grid.desk.edit>.widget{cursor:grab;touch-action:none}
#widget-grid.desk>.widget.lift{transition:box-shadow .2s,transform .2s var(--ease,ease);z-index:6;box-shadow:var(--sh-lg,0 24px 70px #0006),0 0 0 1px var(--line-2);transform:scale(1.025);cursor:grabbing}
#widget-grid.desk>.widget:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.dropg{position:absolute;border-radius:16px;background:color-mix(in srgb,var(--accent) 14%,transparent);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--accent) 50%,transparent);transition:left .18s,top .18s,width .2s,height .2s;pointer-events:none}
#widget-grid.desk .head{display:flex;align-items:center;gap:8px;margin:0 0 10px;min-height:24px;flex-wrap:nowrap}
#widget-grid.desk .head h2{display:flex;align-items:center;gap:8px;flex:1;min-width:0;margin:0;font:500 13px var(--f-ui,inherit);letter-spacing:0;color:var(--text)}
#widget-grid.desk .head h2>svg{width:15px;height:15px;color:var(--faint)}
#widget-grid.desk .head h2 .tn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#widget-grid.desk .head .ghost{flex:none}
.wmore{display:grid;place-items:center;width:24px;height:24px;min-height:0;padding:0;border:0;border-radius:7px;background:none;color:var(--faint);opacity:0;transition:opacity .15s;cursor:pointer;flex:none}
.wmore svg{width:16px;height:16px}.wmore:hover{background:color-mix(in srgb,var(--text) 8%,transparent);color:var(--text)}
.widget:hover .wmore,.widget:focus-within .wmore,.desk.edit .wmore{opacity:1}
@media (hover:none){.wmore{opacity:1}}
#widget-grid.desk .rm{position:absolute;top:7px;left:7px;z-index:5;display:none;place-items:center;width:20px;height:20px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--text);color:var(--bg);box-shadow:var(--sh,0 2px 8px #0004);cursor:pointer}
#widget-grid.desk .rm svg{width:12px;height:12px;stroke-width:2.4}
#widget-grid.desk.edit .rm{display:grid}#widget-grid.desk.edit .head h2{padding-left:20px}
/* app widgets: the whole card opens the app, except while editing */
.desk .app-window .app-symbol{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;flex:none;background:color-mix(in srgb,var(--c) 22%,transparent);color:var(--c)}
.desk .app-window .app-symbol svg{width:14px;height:14px}
.desk .app-window .app-content{display:flex;flex-direction:column;align-items:flex-start;gap:6px;flex:1;min-height:0}
.desk .app-window .app-content p{margin:0;font-size:13px;line-height:1.45;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.desk .app-window .open-app{margin-top:auto;padding:0;height:24px;font:500 13px var(--f-ui,inherit);color:var(--accent);text-decoration:none}
.desk .app-window .open-app::after{content:"";position:absolute;inset:0;border-radius:inherit}
.desk .app-window .wmore,.desk .app-window .rm{position:relative;z-index:5}.desk .app-window .rm{position:absolute}
.desk.edit .app-window .open-app::after{display:none}
.desk .app-window[data-size=s] .app-state{font-size:0;gap:0;padding:4px}.desk .app-window[data-size=s] .app-state.down{font-size:11px;gap:6px;padding:3px 8px 3px 7px}
/* fitting each widget to its size */
.desk .shelf{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;padding:0 0 4px;scroll-snap-type:x proximity}
.desk .shelf .card{flex:0 0 62px;width:62px}.desk .shelf .cover{border-radius:9px}.desk .shelf .card b,.desk .shelf .card small,.desk .shelf .tag,.desk .shelf .cover.game span{display:none}
.desk [data-size=l] .shelf .card{flex-basis:118px;width:118px}.desk [data-size=l] .shelf .card b{display:-webkit-box;font-size:12.5px;margin-top:6px}.desk [data-size=l] .shelf .card small{display:block;font-size:11.5px}.desk [data-size=l] .shelf .tag{display:inline-block}
.desk .shelf .card:hover .cover{transform:none}
.desk .status-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:0 14px;margin:0}.desk .status-list li{padding:5px 0;font-size:13px}
.desk [data-widget=clock] .clock-time{margin:4px 0 0;font-size:clamp(30px,3.4vw,46px)}.desk [data-widget=clock][data-size=l] .clock-time{font-size:clamp(48px,6vw,84px)}
.desk .together{gap:6px}.desk .panel{padding:4px 0}
.desk .access-stats strong{font-size:26px}.desk .admin-count{font-size:40px;line-height:1}
.desk .widget>.hint{margin:6px 0}
#desk-empty{text-align:center}
.tlink{border:0;background:none;padding:0;min-height:0;font:inherit;color:var(--accent);cursor:pointer}
/* up top: widgets as pills beside the date and time */
.when-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 10px;margin:0 0 12px;order:-1}
.when-row .when{margin:0}
.topw{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;min-height:30px;border-radius:999px;transition:background .15s,outline-color .15s}
.topw.edit{outline:1.5px dashed var(--line-2);outline-offset:4px;padding:0 4px;min-width:120px}
.topw.drop-on{outline-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent)}
.top-hint{padding:0 10px;font-size:12px;color:var(--faint)}
.tpill{position:relative;display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:999px;background:var(--s1,var(--panel-2));box-shadow:var(--sh,none),0 0 0 1px var(--line);font:400 12.5px var(--f-ui,inherit);color:var(--muted);white-space:nowrap;user-select:none;touch-action:auto}
@media (pointer:fine){.tpill{cursor:grab}}.topw.edit .tpill{touch-action:none;cursor:grab}
.tpill:hover{box-shadow:var(--sh,none),0 0 0 1px var(--line-2)}.tpill:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tpill b{font-weight:500;color:var(--text)}.tpill>svg,.tp-main>svg{width:14px;height:14px;color:var(--faint)}
.tp-main{display:inline-flex;align-items:center;gap:7px;color:inherit;text-decoration:none}
.tpill .pi{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;background:color-mix(in srgb,var(--c) 22%,transparent);color:var(--c)}.tpill .pi svg{width:12px;height:12px}
.tpill .led{width:6px;height:6px;border-radius:50%;background:var(--good,#3ddc84);box-shadow:0 0 0 3px color-mix(in srgb,var(--good,#3ddc84) 20%,transparent)}.tpill .led.bad{background:#e5534b;box-shadow:0 0 0 3px color-mix(in srgb,#e5534b 22%,transparent)}
.tpill img{width:16px;height:24px;object-fit:cover;border-radius:3px}
.tpill .tclock{font-variant-numeric:tabular-nums}
.tfav{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;color:#fff;font-size:11px;font-weight:600;text-decoration:none}
.tdown{display:none;place-items:center;width:20px;height:20px;min-height:0;margin-right:-6px;padding:0;border:0;border-radius:50%;background:none;color:var(--faint);cursor:pointer}.tdown svg{width:13px;height:13px}.tdown:hover{background:color-mix(in srgb,var(--text) 8%,transparent);color:var(--text)}
.topw.edit .tdown,.tpill:hover .tdown,.tpill:focus-within .tdown{display:grid}
.tpill.dragging{z-index:50;transition:none;box-shadow:0 16px 40px #0006,0 0 0 1px var(--accent);cursor:grabbing}
/* the widget menu, like the app's */
.ctx{position:fixed;z-index:95;min-width:220px;padding:5px;border-radius:12px;background:var(--s1,var(--bg));box-shadow:var(--sh-lg,0 24px 70px #0007),0 0 0 1px var(--line);animation:launch-in .15s ease-out}
.ctx button{display:flex;align-items:center;gap:10px;width:100%;min-height:0;padding:7px 10px;border:0;border-radius:8px;background:none;color:var(--text);text-align:left;font:400 13px var(--f-ui,inherit);cursor:pointer}
.ctx button svg{width:15px;height:15px;color:var(--faint)}
.ctx button:hover,.ctx button:focus-visible{background:var(--s2,color-mix(in srgb,var(--text) 8%,transparent));outline:none}
.ctx button.red,.ctx button.red svg{color:#e5534b}
.ctx hr{border:0;border-top:1px solid var(--line);margin:4px 6px}
.ctx .sz{display:flex;gap:4px;padding:4px 6px 6px}
.ctx .sz button{flex:1;flex-direction:column;justify-content:center;gap:5px;padding:8px 4px;font-size:11.5px;color:var(--muted)}
.ctx .sz button.on{background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}
.szi{display:block;border-radius:3px;box-shadow:inset 0 0 0 1.5px currentColor}
/* Widgets tab */
.widget-option .wsz{display:inline-flex;gap:2px;padding:2px;border-radius:9px;background:var(--s2,var(--panel-2));box-shadow:inset 0 0 0 1px var(--line)}
.widget-option .wsz button{min-height:0;height:24px;width:28px;padding:0;border:0;border-radius:7px;background:none;color:var(--muted);font:500 11.5px var(--f-ui,inherit)}
.widget-option .wsz button.on{background:var(--accent);color:var(--accent-ink,#fff)}
.widget-option .mini.on{color:var(--accent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 50%,transparent)}
#reset-desk{margin-top:16px}
@media(prefers-reduced-motion:reduce){#widget-grid.desk>.widget,.dropg,.ctx{transition:none;animation:none}}
.desk [data-size=s] .head .eyebrow,.desk [data-size=s] .head .admin-label,.desk [data-size=m] [data-widget=clock] .head .eyebrow{display:none}
.desk .head .eyebrow,.desk .head .admin-label{flex:none;font-size:10px;white-space:nowrap}
.desk [data-size=s] .access-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.desk [data-size=s] .access-stats strong{font-size:22px}.desk [data-size=s] .access-stats span{font-size:11px}
.desk .status-list li{padding:3px 0}

/* ---------- 2026-10-19: petals, downloads, update log, Workbench ---------- */
#petals{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}
.petal-toggle{display:flex;align-items:center;gap:14px;padding:14px 16px;margin:0 0 18px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,#f4a6c4 8%,var(--panel-2));cursor:pointer}
.petal-toggle span{flex:1}.petal-toggle small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.dl-list{display:flex;flex-direction:column;gap:10px}
.dl-row{display:flex;align-items:center;gap:12px;min-width:0}
.dl-ic{flex:0 0 38px;height:38px;border-radius:11px;display:grid;place-items:center;font-weight:650;font-size:17px;color:#fff;background:linear-gradient(135deg,#d97757,#a8452c);box-shadow:0 6px 18px -6px #d9775799}
.dl-ic.dl-glyphfall{background:linear-gradient(135deg,#46e28b,#14804a);box-shadow:0 6px 18px -6px #46e28b88}
.dl-name{flex:1;min-width:0}.dl-name b{display:block;font-size:14px}.dl-name small{color:var(--muted);font-size:12px}
.dl-btns{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.dl-btn{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:10px;background:var(--accent);color:var(--accent-ink,#1d120d);text-decoration:none;font-size:13px;font-weight:600;transition:transform .18s,box-shadow .18s;white-space:nowrap}
.dl-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dl-btn small{font-weight:450;opacity:.75;margin-left:6px;font-size:11px}
.dl-btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px -8px var(--accent)}
.dl-btn.alt{background:var(--panel-2);color:var(--text);border:1px solid var(--line-2);font-weight:500}
.up-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.up-list li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:baseline;padding:7px 0;border-bottom:1px solid var(--line);font-size:13px;min-width:0}
.up-list li:last-child{border-bottom:0}
.up-txt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.up-txt small{color:var(--faint)}
.up-list time{color:var(--faint);font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.up-tag{font-size:11px;font-weight:600;padding:2px 7px;border-radius:6px;white-space:nowrap;background:color-mix(in srgb,var(--accent) 16%,transparent);color:color-mix(in srgb,var(--accent) 70%,var(--text))}
.up-tag.up-glyphfall{background:color-mix(in srgb,#46e28b 16%,transparent);color:color-mix(in srgb,#46e28b 70%,var(--text))}
.up-tag.up-home{background:color-mix(in srgb,#f4a6c4 18%,transparent);color:color-mix(in srgb,#f4a6c4 75%,var(--text))}
.wb-widget{cursor:pointer}
.wb-open{display:flex;align-items:center;gap:14px;padding:14px;border-radius:16px;text-decoration:none;color:var(--text);
  background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--accent) 26%,transparent),transparent 60%),var(--panel-2);border:1px solid var(--line-2);transition:transform .25s var(--ease-canvas,ease),border-color .2s}
.wb-open:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 55%,transparent)}
.wb-open>span:nth-child(2){flex:1;min-width:0}.wb-open b{display:block;font-size:15px}.wb-open small{color:var(--muted);font-size:12px}
.wb-glyph{flex:0 0 42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--accent);color:var(--accent-ink,#1d120d)}
.wb-glyph svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wb-go{font-size:18px;color:var(--muted);transition:transform .25s}.wb-open:hover .wb-go{transform:translate(2px,-2px);color:var(--text)}
.wb-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:12px;font-size:12px;color:var(--muted)}
.wb-meta span{display:inline-flex;align-items:center;gap:6px}
.wb-meta .led,.tpill .led.wait{width:7px;height:7px;border-radius:50%;background:var(--good,#3ddc84);box-shadow:0 0 0 3px color-mix(in srgb,var(--good,#3ddc84) 20%,transparent)}
.wb-meta .led.wait,.tpill .led.wait{background:var(--faint);box-shadow:none}
.wb-todo .eyebrow{margin:0 0 8px}.wb-todo ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.wb-todo li{display:flex;gap:9px;font-size:13px;line-height:1.4;min-width:0}.wb-todo li>span:last-child{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.td-sz{flex:0 0 20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:10px;font-weight:700;background:var(--s3,var(--panel-2));color:var(--muted)}
.td-sz.td-L{background:color-mix(in srgb,var(--accent) 22%,transparent);color:var(--accent)}
.desk .widget[data-widget=downloads],.desk .widget[data-widget=updates],.desk .widget[data-widget=wbtodo]{overflow:auto}
.keybox{margin:12px 0;padding:12px 14px;border-radius:12px;border:1px solid color-mix(in srgb,var(--accent) 45%,transparent);background:color-mix(in srgb,var(--accent) 8%,var(--panel-2))}
.keybox small{display:block;color:var(--muted);margin:4px 0 8px}.keybox code{display:block;overflow-wrap:anywhere;font-size:12px;padding:8px;border-radius:8px;background:var(--bg);margin-bottom:8px;user-select:all}
@media(max-width:520px){.dl-row{flex-wrap:wrap}.dl-btns{width:100%;justify-content:flex-start;padding-left:50px}}

/* Moonbag widget */
.mb-body{display:flex;flex-direction:column;gap:10px;min-width:0}
.mb-event{margin:0;font-size:12px;font-weight:600;color:#ffc43d}
.mb-intro{margin:0;opacity:.8}
.mb-top{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mb-top>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.mb-top small{opacity:.6;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.mb-top b{font-size:18px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-top b i{font-style:normal;font-size:12px;opacity:.6}
.mb-top span{font-size:12px;opacity:.65}
.mb-top .mb-title{font-size:14px}
.mb-xp{display:block;height:5px;border-radius:3px;background:rgba(127,127,127,.25);overflow:hidden;margin-top:4px}
.mb-xp i{display:block;height:100%;background:linear-gradient(90deg,#7c8cff,#2fe3ac)}
.mb-body .up{color:#2fe3ac}.mb-body .down{color:#f0476b}
.mb-missions,.mb-movers{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.mb-missions li{display:flex;justify-content:space-between;gap:8px;font-size:13px}
.mb-missions li.done{opacity:.6}
.mb-missions small{opacity:.6;white-space:nowrap}
.mb-movers li{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:baseline;font-size:13px}
.mb-movers span{opacity:.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mb-movers em{font-style:normal;font-variant-numeric:tabular-nums}
.mb-movers small{opacity:.6;font-variant-numeric:tabular-nums}
.mb-play{align-self:flex-start;padding:7px 14px;border-radius:999px;background:linear-gradient(90deg,#7c8cff,#2fe3ac);color:#0b0c10;font-weight:600;text-decoration:none}
@media(max-width:520px){.mb-top{grid-template-columns:1fr 1fr}.mb-top>div:last-child{grid-column:1/-1}}

/* Workbench look (matches harness/workbench.html): warm surfaces, Newsreader greeting, Geist UI, quiet cards.
   Applies to the Workbench and Paper themes; the older themes keep their own look. */
@font-face { font-family: "Geist"; src: url("/portal/static/geist.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/portal/static/newsreader.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
[data-theme="workbench"] {
  --bg: #262624; --side: #1e1e1c; --s1: #30302d; --s2: #2b2b28; --s3: #3a3a36; --line: #383834; --line-2: #46463f;
  --text: #ece9e1; --muted: #a8a498; --faint: #8a857a; --accent: #d97757; --accent-ink: #1d120d;
  --panel: var(--s2); --panel-2: var(--s1); --good: #6cba80;
  --sh: 0 1px 0 rgba(255,255,255,.04) inset, 0 1px 2px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.18);
  --sh-lg: 0 2px 6px rgba(0,0,0,.3), 0 24px 60px rgba(0,0,0,.45);
  --shadow: var(--sh); color-scheme: dark;
}
[data-theme="paper"] {
  --bg: #faf9f5; --side: #f3f1ea; --s1: #ffffff; --s2: #f5f4ee; --s3: #ebe9e1; --line: #e6e3da; --line-2: #d8d4c8;
  --text: #1f1e1b; --muted: #6b675e; --faint: #8b877c; --accent: #c4633f; --accent-ink: #fff;
  --panel: var(--s2); --panel-2: var(--s1); --good: #3f8f55;
  --sh: 0 1px 2px rgba(40,30,10,.06), 0 6px 18px rgba(40,30,10,.06);
  --sh-lg: 0 2px 6px rgba(40,30,10,.08), 0 24px 60px rgba(40,30,10,.12);
  --shadow: var(--sh); color-scheme: light;
}
html:is([data-theme="workbench"],[data-theme="paper"]) { --f-ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; --f-ser: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.2,.8,.2,1); --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--bg)); --accent-line: color-mix(in srgb, var(--accent) 45%, var(--bg)); }
html:is([data-theme="workbench"],[data-theme="paper"]) body { font: 14px/1.5 var(--f-ui); background: transparent; }   /* html keeps var(--bg): a body colour would cover the wallpaper */
html:is([data-theme="workbench"],[data-theme="paper"]) .sky { display: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) ::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
html:is([data-theme="workbench"],[data-theme="paper"]) * { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
html:is([data-theme="workbench"],[data-theme="paper"]) :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar: brand left, account pill right, like the app's top row */
html:is([data-theme="workbench"],[data-theme="paper"]) .top { display: flex; align-items: center; gap: 12px; max-width: 1180px; padding: 14px clamp(16px,3vw,28px); background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .brand { font: 600 15px var(--f-ui); letter-spacing: -.01em; }
html:is([data-theme="workbench"],[data-theme="paper"]) .brand .logo, html:is([data-theme="workbench"],[data-theme="paper"]) .logo { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); border: 0; box-shadow: none; font: 600 13px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .top .search { display: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .me { margin-left: auto; height: 34px; padding: 0 12px 0 3px; gap: 8px; border: 0; border-radius: 999px; background: var(--s1); box-shadow: var(--sh), 0 0 0 1px var(--line); font: 500 13px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .me:hover { box-shadow: var(--sh), 0 0 0 1px var(--accent-line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .av { width: 28px; height: 28px; background: var(--accent); color: var(--accent-ink); font: 600 12px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .dot { left: 22px; border-color: var(--bg); }

/* Greeting and message box, centred like the app's home */
html:is([data-theme="workbench"],[data-theme="paper"]) main { max-width: 1180px; padding: 0 clamp(16px,3vw,28px) 40px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(28px,6vh,64px) 0 22px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .when { order: -1; margin: 0 0 10px; font: 400 13px var(--f-ui); color: var(--faint); letter-spacing: 0; }
html:is([data-theme="workbench"],[data-theme="paper"]) .hero h1 { font: 400 clamp(32px,4.2vw,46px)/1.15 var(--f-ser); letter-spacing: -.015em; text-wrap: balance; margin: 0 0 22px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .hero h1 b { font-weight: 400; color: var(--accent); background: none; -webkit-text-fill-color: currentColor; }
html:is([data-theme="workbench"],[data-theme="paper"]) #wb-search { width: min(720px, 100%); }
html:is([data-theme="workbench"],[data-theme="paper"]) #wb-search .search { display: flex; width: 100%; height: 58px; padding: 0 8px 0 18px; gap: 10px; border: 0; border-radius: 20px; background: var(--s1); box-shadow: var(--sh-lg), 0 0 0 1px var(--line); backdrop-filter: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) #wb-search .search:focus-within { box-shadow: var(--sh-lg), 0 0 0 1.5px var(--accent-line); }
html:is([data-theme="workbench"],[data-theme="paper"]) #wb-search .search input { font: 400 15.5px var(--f-ui); color: var(--text); }
html:is([data-theme="workbench"],[data-theme="paper"]) #wb-search .search > svg { width: 18px; height: 18px; color: var(--faint); }
html:is([data-theme="workbench"],[data-theme="paper"]) .seg { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; padding: 3px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .seg button { min-height: 0; height: 30px; padding: 0 11px; border-radius: 9px; font: 500 12.5px var(--f-ui); color: var(--muted); }
html:is([data-theme="workbench"],[data-theme="paper"]) .seg button.on { background: var(--accent); color: var(--accent-ink); }
html:is([data-theme="workbench"],[data-theme="paper"]) .chips { justify-content: center; margin-top: 12px; gap: 6px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .chip { height: 26px; padding: 0 10px; gap: 6px; border: 0; border-radius: 999px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: none; font: 400 12.5px var(--f-ui); color: var(--muted); }
html:is([data-theme="workbench"],[data-theme="paper"]) .chip b { font-weight: 500; color: var(--text); }
html:is([data-theme="workbench"],[data-theme="paper"]) .chip .led { width: 7px; height: 7px; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }

/* Toolbar: the app's buttons, with a small "Your widgets" heading like the desk */
html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools { justify-content: center; gap: 6px; margin-top: 18px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools button, html:is([data-theme="workbench"],[data-theme="paper"]) button.wide, html:is([data-theme="workbench"],[data-theme="paper"]) .solid { min-height: 0; height: 32px; width: auto; margin: 0; padding: 0 14px; border: 0; border-radius: 10px; background: var(--s1); color: var(--text); box-shadow: var(--sh), 0 0 0 1px var(--line); font: 500 13px var(--f-ui); transition: background .15s, transform .12s; }
html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools button:hover, html:is([data-theme="workbench"],[data-theme="paper"]) button.wide:hover { background: var(--s2); }
html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools button:active, html:is([data-theme="workbench"],[data-theme="paper"]) button.wide:active { transform: scale(.97); }
html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools .solid, html:is([data-theme="workbench"],[data-theme="paper"]) .solid { background: var(--accent); color: var(--accent-ink); box-shadow: var(--sh); }
html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools .solid:hover { filter: brightness(1.06); background: var(--accent); }
html:is([data-theme="workbench"],[data-theme="paper"]) #edit-layout[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .hint { color: var(--faint); font-size: 12.5px; }
html:is([data-theme="workbench"],[data-theme="paper"]) #layout-hint { text-align: center; margin: 0 0 10px; }

/* Widgets: the app's cards (.bub): flat surface, 16px corners, small quiet title */
html:is([data-theme="workbench"],[data-theme="paper"]) .widget, html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget { padding: 14px; border: 0; border-radius: 16px; background: var(--s1); box-shadow: var(--sh), 0 0 0 1px var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; scrollbar-gutter: auto; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget { overflow: hidden; display: flex; flex-direction: column; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget > :not(.layout-controls):not(.widget-resize) { min-height: 0; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget .shelf, html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget .apps, html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget .together, html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows > .widget .people { overflow: auto; }
html:is([data-theme="workbench"],[data-theme="paper"]) .widget .head { margin: 0 0 10px; align-items: center; }
html:is([data-theme="workbench"],[data-theme="paper"]) .widget .head h2 { font: 500 13px var(--f-ui); color: var(--text); letter-spacing: 0; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .layout-controls { position: static; margin: -4px -4px 8px; padding: 0; background: none; gap: 4px; min-height: 0; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget-grip, html:is([data-theme="workbench"],[data-theme="paper"]) .layout-controls button { min-height: 0; height: 26px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--faint); font: 500 13px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget-grip span { font: 500 13px var(--f-ui); color: var(--text); }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget-grip:hover, html:is([data-theme="workbench"],[data-theme="paper"]) .layout-controls button:hover { background: var(--s2); color: var(--text); }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget-grip { cursor: grab; }
/* a window already titled by the bar: drop the second title */
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget .head h2 { display: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget .head { justify-content: flex-end; margin-top: -34px; margin-bottom: 8px; padding-right: 30px; pointer-events: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget .head > * { pointer-events: auto; }
html:is([data-theme="workbench"],[data-theme="paper"]) .widget-resize { width: 22px; height: 22px; min-height: 0; bottom: 4px; right: 4px; border-radius: 6px; background: none; color: var(--faint); font-size: 12px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .widget-resize:hover { background: var(--s2); color: var(--text); }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget.manipulating { box-shadow: var(--sh-lg), 0 0 0 1px var(--line-2); transform: scale(1.01); border-color: transparent; }
html:is([data-theme="workbench"],[data-theme="paper"]) .free-windows .widget:hover { box-shadow: var(--sh), 0 0 0 1px var(--line-2); }
html:is([data-theme="workbench"],[data-theme="paper"]) .ghost { min-height: 0; height: 26px; padding: 0 9px; border-radius: 8px; font: 500 12.5px var(--f-ui); color: var(--muted); }
html:is([data-theme="workbench"],[data-theme="paper"]) .ghost:hover { background: var(--s2); color: var(--text); }
/* Same spacing as the app's desk; cards are measured at least as tall as a window, so seeded windows never touch */
html:is([data-theme="workbench"],[data-theme="paper"]) .widget-grid { gap: 12px; }
@media (min-width: 761px) { html:is([data-theme="workbench"],[data-theme="paper"]) .widget-grid:not(.free-windows) > .widget { min-height: 180px; } }
html:is([data-theme="workbench"],[data-theme="paper"]) .app-content h2 { font: 500 15px var(--f-ui); letter-spacing: 0; }
/* Edit layout: the app's dotted desk */
html:is([data-theme="workbench"],[data-theme="paper"]) .arranging .free-windows, html:is([data-theme="workbench"],[data-theme="paper"]) body.arranging .free-windows { background-image: radial-gradient(var(--line-2) 1.3px, transparent 1.7px); background-size: 24px 24px; border-radius: 14px; outline: 1.5px dashed var(--line-2); outline-offset: 8px; }

/* App windows: icon, short line, open link, like the app's connector widgets */
html:is([data-theme="workbench"],[data-theme="paper"]) .app-content { min-height: 0; flex: 1; gap: 8px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .app-symbol { width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--c) 22%, var(--s1)); }
html:is([data-theme="workbench"],[data-theme="paper"]) .app-symbol svg { width: 17px; height: 17px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .app-content p { font-size: 13px; color: var(--muted); line-height: 1.45; }
html:is([data-theme="workbench"],[data-theme="paper"]) .open-app { margin-top: auto; padding: 0; height: 28px; gap: 6px; font: 500 13px var(--f-ui); color: var(--accent); }
html:is([data-theme="workbench"],[data-theme="paper"]) .open-app:hover { color: var(--text); }

/* Inside widgets */
html:is([data-theme="workbench"],[data-theme="paper"]) .app { border-radius: 14px; min-height: 112px; padding: 14px; gap: 14px; background: var(--s2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .app::after { display: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .app:hover { transform: translateY(-2px); background: var(--s3); box-shadow: var(--sh), inset 0 0 0 1px var(--accent-line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .app .ic { width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--c) 24%, var(--s2)); color: var(--c); border: 0; backdrop-filter: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .app .ic svg { width: 17px; height: 17px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .app b { font: 500 14px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .app small { color: var(--muted); opacity: 1; font-size: 12.5px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .mylink, html:is([data-theme="workbench"],[data-theme="paper"]) .panel { background: var(--s2); border: 0; box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: none; border-radius: 12px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .mylink:hover { box-shadow: inset 0 0 0 1px var(--accent-line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .mylink .fav { background: var(--accent); color: var(--accent-ink); border-radius: 8px; width: 28px; height: 28px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .panel { padding: 12px 14px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .panel h3 { font: 500 13px var(--f-ui); color: var(--muted); }
html:is([data-theme="workbench"],[data-theme="paper"]) .panel dl div { background: var(--bg); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; padding: 9px 11px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .panel dd { font: 500 14px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .panel dd.big { font: 600 22px var(--f-ui); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
html:is([data-theme="workbench"],[data-theme="paper"]) .panel dt { font: 400 12px var(--f-ui); color: var(--faint); }
html:is([data-theme="workbench"],[data-theme="paper"]) .more { font: 500 13px var(--f-ui); color: var(--accent); }
html:is([data-theme="workbench"],[data-theme="paper"]) .cover { border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--s2); }
html:is([data-theme="workbench"],[data-theme="paper"]) .card b { font: 500 13px/1.3 var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .card small { font-size: 12px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .clock-time { font: 400 clamp(36px,4vw,52px)/1.1 var(--f-ser); letter-spacing: -.02em; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
html:is([data-theme="workbench"],[data-theme="paper"]) .eyebrow, html:is([data-theme="workbench"],[data-theme="paper"]) .admin-label { font: 500 11px var(--f-ui); letter-spacing: .04em; color: var(--faint); }
html:is([data-theme="workbench"],[data-theme="paper"]) .admin-count, html:is([data-theme="workbench"],[data-theme="paper"]) .access-stats strong { font: 600 30px var(--f-ui); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
html:is([data-theme="workbench"],[data-theme="paper"]) .empty { color: var(--faint); font-size: 13px; }

/* Drawer: the app's settings sheet */
html:is([data-theme="workbench"],[data-theme="paper"]) .scrim { background: rgba(0,0,0,.35); backdrop-filter: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .drawer { border: 0; border-radius: 18px; background: var(--s1); box-shadow: var(--sh-lg), 0 0 0 1px var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .d-head h2 { font: 400 26px var(--f-ser); letter-spacing: -.01em; }
html:is([data-theme="workbench"],[data-theme="paper"]) .d-kicker { font-size: 12.5px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .x { width: 32px; height: 32px; min-height: 0; border: 0; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .tabs { background: var(--s2); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .tabs { padding: 3px; gap: 2px; flex: none; overflow-y: hidden; }
html:is([data-theme="workbench"],[data-theme="paper"]) .tabs button { min-height: 0; height: auto; padding: 7px 10px; line-height: 18px; font: 500 12.5px/18px var(--f-ui); border-radius: 9px; }
html:is([data-theme="workbench"],[data-theme="paper"]) input[type="range"], html:is([data-theme="workbench"],[data-theme="paper"]) input[type="checkbox"] { accent-color: var(--accent); }
html:is([data-theme="workbench"],[data-theme="paper"]) .tabs button.on { background: var(--s1); box-shadow: var(--sh); }
html:is([data-theme="workbench"],[data-theme="paper"]) .d-body h4 { font: 500 12.5px var(--f-ui); color: var(--faint); }
html:is([data-theme="workbench"],[data-theme="paper"]) .d-body input:not(.switch):not([type="range"]):not([type="checkbox"]) { border: 0; border-radius: 10px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); font: 400 14px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .d-body input:focus { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
html:is([data-theme="workbench"],[data-theme="paper"]) .theme { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); font: 500 13px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .theme.on { box-shadow: 0 0 0 2px var(--accent); }
html:is([data-theme="workbench"],[data-theme="paper"]) .mini { min-height: 0; border: 0; border-radius: 8px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); font: 500 12.5px var(--f-ui); }
html:is([data-theme="workbench"],[data-theme="paper"]) .mini.yes { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
html:is([data-theme="workbench"],[data-theme="paper"]) .foot { font-size: 12.5px; }
html:is([data-theme="workbench"],[data-theme="paper"]) .foot a, html:is([data-theme="workbench"],[data-theme="paper"]) .foot button { min-height: 0; font-weight: 500; }

@media (max-width: 760px) {
  html:is([data-theme="workbench"],[data-theme="paper"]) .me { padding: 0; background: none; box-shadow: none; }
  html:is([data-theme="workbench"],[data-theme="paper"]) .hero { padding-top: 22px; }
  html:is([data-theme="workbench"],[data-theme="paper"]) .hero h1 { font-size: 32px; }
  html:is([data-theme="workbench"],[data-theme="paper"]) #wb-search .search { height: 54px; padding-left: 14px; }
  html:is([data-theme="workbench"],[data-theme="paper"]) .seg button { padding: 0 8px; font-size: 12px; }
  html:is([data-theme="workbench"],[data-theme="paper"]) .canvas-tools { margin-top: 14px; }
}
