:root {
  color-scheme: dark;
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --text: #f0ebde; --muted: #aaa9a3; --line: #ffffff22; --brand: #929fe0;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: #101113; overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
[hidden] { display: none !important; }
#workspace { position: fixed; inset: 0; }
#welcome { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 85% 5%, #929fe01f, transparent 60%), #101113; }
#welcome h1 { font: 720 42px/1 Arial, Helvetica, sans-serif; letter-spacing: -.06em; margin: 18px 0 8px; }
#welcome p { color: var(--muted); margin: 0 0 14px; }
#welcome-message { font-size: 12px; }
#sign-in { padding: 11px 18px; border-radius: 8px; background: var(--text); color: #101113; text-decoration: none; font-size: 13px; }
#frames, .app-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #101113; }
#scrim { position: fixed; inset: 0; z-index: 5; background: #0007; }
#sheet {
  position: fixed; inset: auto 0 0; z-index: 6; height: 75dvh; width: 100%;
  display: flex; flex-direction: column; overflow: hidden; padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 80px #0005;
  background-color: #101113;
  background-image: radial-gradient(circle at 1px 1px, #ffffff1c .7px, transparent .9px), radial-gradient(ellipse at 10% 5%, #eda76322, transparent 48%), radial-gradient(ellipse at 87% 8%, #929fe02c, transparent 48%), radial-gradient(ellipse at 48% 60%, #7bc8c412, transparent 44%), radial-gradient(ellipse at 4% 95%, #a57dc521, transparent 48%), radial-gradient(ellipse at 97% 95%, #d7899c20, transparent 48%);
  background-size: 18px 18px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: 5px 5px, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}
.sheet-header, #apps, #catalog-status { width: min(100% - 64px, 920px); margin-inline: auto; }
.sheet-header { position: relative; height: 40px; flex-shrink: 0; }
#grip { position: absolute; left: calc(50% - 40px); top: 0; width: 80px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; touch-action: none; }
#grip span { width: 38px; height: 4px; background: #55585b; border-radius: 5px; }
#catalog-status { color: var(--muted); font-size: 12px; padding-bottom: 20px; }
#catalog-status:empty { display: none; }
#apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 10px 12px; padding: 0 0 24px; overflow: auto; overscroll-behavior: contain; min-height: 0; flex: 1; scrollbar-width: thin; scrollbar-color: #55585b transparent; }
.app { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; min-height: 112px; padding: 10px 4px 8px; text-align: center; border: 0; border-radius: 12px; background: transparent; }
.app:hover { background: #ffffff06; }
.app:focus { outline: none; }
.app:focus-visible .icon { border-color: var(--brand); }
.app .icon { width: 68px; height: 68px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: 15px; background: #1d1f21dd; color: var(--muted); font-size: 30px; }
.app img { width: 44px; height: 44px; object-fit: contain; }
.app strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.app[aria-pressed="true"] .icon { border-color: var(--brand); background: #929fe012; }
#handle { position: fixed; z-index: 8; bottom: 0; right: max(16px, env(safe-area-inset-right)); width: 100px; height: calc(25px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); display: grid; place-items: center; touch-action: none; border: 1px solid #55585b; border-bottom: 0; border-radius: 14px 14px 0 0; background: #18191b; }
#handle span { width: 40px; height: 4px; border-radius: 8px; background: var(--muted); }
body.sheet-open #handle { visibility: hidden; }
@media (max-width: 600px) {
  #sheet { border-radius: 20px 20px 0 0; }
  .sheet-header, #apps, #catalog-status { width: calc(100% - 32px); }
  #apps { gap: 8px 6px; }
  .app { min-height: 106px; padding: 8px 4px 6px; }
  .app .icon { width: 64px; height: 64px; }
  .app img { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: no-preference) { #sheet { animation: sheet-in .25s ease-out; } @keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } } }
