:root {
  --pwa-bg: #020911;
  --pwa-panel: rgba(5, 19, 30, .88);
  --pwa-panel-strong: rgba(7, 27, 41, .96);
  --pwa-line: rgba(111, 235, 235, .2);
  --pwa-cyan: #00f0ff;
  --pwa-mint: #00ffcc;
  --pwa-pink: #ff5ca8;
  --pwa-text: #e9ffff;
  --pwa-muted: #7ea0aa;
  --pwa-mono: "JetBrains Mono", "Courier New", monospace;
  --pwa-display: "Arial Narrow", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--pwa-bg); scroll-behavior: smooth; }
body {
  min-width: 320px; min-height: 100vh; margin: 0; color: var(--pwa-text);
  font-family: var(--pwa-mono);
  background:
    radial-gradient(circle at 76% 8%, rgba(0, 238, 255, .14), transparent 30rem),
    radial-gradient(circle at 18% 88%, rgba(255, 92, 168, .08), transparent 24rem),
    linear-gradient(rgba(0, 238, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 238, 255, .035) 1px, transparent 1px), var(--pwa-bg);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
}
body::before, body::after {
  position: fixed; z-index: -1; pointer-events: none; content: ""; opacity: .28;
}
body::before { inset: 0; background: linear-gradient(118deg, transparent 0 42%, rgba(0, 238, 255, .08) 50%, transparent 58%); animation: pwa-sweep 13s linear infinite; }
body::after { left: 0; right: 0; bottom: 0; height: 35vh; background: linear-gradient(transparent, rgba(0, 0, 0, .35)); }
@keyframes pwa-sweep { from { transform: translateX(-48%); } to { transform: translateX(48%); } }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
[hidden] { display: none !important; }

.pwa-app { width: min(1480px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 34px; }
.sidebar-toggle { display: none; }
.pwa-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 62px; padding: 10px 14px; border: 1px solid var(--pwa-line);
  background: rgba(2, 13, 22, .8); box-shadow: 0 0 28px rgba(0, 238, 255, .08);
}
.pwa-brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; color: #031119;
  background: var(--pwa-mint); border: 1px solid #b1fff0; border-radius: 9px;
  font: 900 19px var(--pwa-display); box-shadow: 0 0 16px rgba(0, 255, 204, .3);
}
.pwa-brand strong, .pwa-brand small { display: block; }
.pwa-brand strong { color: white; font: 900 15px var(--pwa-display); letter-spacing: 3px; }
.pwa-brand small { margin-top: 3px; color: var(--pwa-cyan); font-size: 8px; letter-spacing: 1.4px; }
.pwa-top-actions { display: flex; align-items: center; gap: 14px; }
.connection, .live-pill, .result-count {
  color: var(--pwa-muted); font-size: 9px; font-weight: 800; letter-spacing: 1px;
}
.connection { display: inline-flex; align-items: center; gap: 6px; }
.connection i, .live-pill i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pwa-mint); box-shadow: 0 0 10px var(--pwa-mint); }
.install-button, .avatar-chip {
  border: 1px solid rgba(0, 255, 204, .38); border-radius: 999px; background: rgba(0, 44, 48, .44);
  color: #bffff1; padding: 8px 11px; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: 1px;
}
.avatar-chip { cursor: pointer; }
.avatar-chip.has-image { background-size: 24px 24px; background-position: 4px center; background-repeat: no-repeat; padding-left: 36px; }
.avatar-chip.has-image span { visibility: hidden; }
.avatar-chip span.has-image { background-size: cover; background-position: center; background-repeat: no-repeat; color: transparent; }
.install-button:hover, .install-button:focus-visible { color: #031119; background: var(--pwa-mint); outline: none; }
.avatar-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 9px 4px 4px; }
.avatar-chip span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pwa-pink); color: #220719; font-size: 8px; }
.avatar-chip b { color: #ffd5e8; font-size: 8px; }

.pwa-layout { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 22px; margin-top: 22px; }
.pwa-rail { display: flex; min-height: 700px; flex-direction: column; gap: 8px; padding: 15px 10px; border: 1px solid var(--pwa-line); background: rgba(2, 15, 25, .72); }
.rail-head { display: flex; align-items: center; justify-content: space-between; }
.rail-close { display: none; border: 1px solid rgba(0, 255, 204, .32); border-radius: 7px; padding: 2px 8px; color: var(--pwa-mint); background: transparent; cursor: pointer; font-size: 20px; line-height: 1; }
.rail-label, .pwa-kicker { color: var(--pwa-pink); font-size: 9px; font-weight: 900; letter-spacing: 1.8px; }
.rail-label { padding: 5px 9px 10px; color: #668991; }
.rail-link {
  display: flex; align-items: center; gap: 9px; width: 100%; border: 1px solid transparent; border-radius: 6px;
  padding: 11px 9px; background: transparent; color: #9dbec2; cursor: pointer; text-align: left;
  font-size: 9px; font-weight: 900; letter-spacing: .7px;
}
.rail-link:hover, .rail-link:focus-visible, .rail-link.is-active { border-color: rgba(0, 255, 204, .5); color: var(--pwa-mint); background: rgba(0, 255, 204, .08); outline: none; }
.rail-icon { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid currentColor; border-radius: 6px; font-size: 13px; }
.rail-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(119, 221, 220, .14); }
.session-code { display: block; padding: 0 9px; color: #71929a; font-size: 9px; line-height: 1.8; }
.session-code b { color: var(--pwa-mint); letter-spacing: 1px; }

.pwa-main { min-width: 0; }
.pwa-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 230px 150px; align-items: center; gap: 18px;
  min-height: 266px; overflow: hidden; padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--pwa-line); background: linear-gradient(125deg, rgba(7, 36, 51, .96), rgba(4, 16, 27, .92));
}
.pwa-hero::after { position: absolute; inset: 0; pointer-events: none; content: ""; border: 1px solid rgba(0, 255, 204, .08); transform: translate(7px, 7px); }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { margin: 10px 0 12px; font: 900 clamp(31px, 5vw, 69px)/.9 var(--pwa-display); letter-spacing: 2px; }
.hero-copy h1 em { color: var(--pwa-cyan); font-style: normal; text-shadow: 0 0 24px rgba(0, 238, 255, .35); }
.hero-copy p { max-width: 610px; margin: 0; color: var(--pwa-muted); font-size: 11px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.primary-action, .secondary-action {
  display: inline-flex; align-items: center; gap: 14px; border-radius: 5px; padding: 11px 14px; cursor: pointer;
  font-size: 9px; font-weight: 900; letter-spacing: 1px;
}
.primary-action { border: 1px solid var(--pwa-mint); color: #031119; background: var(--pwa-mint); box-shadow: 0 0 22px rgba(0, 255, 204, .15); }
.primary-action:hover, .primary-action:focus-visible { background: white; outline: none; }
.secondary-action { border: 1px solid rgba(214, 255, 255, .27); color: #bce3e5; background: rgba(2, 16, 28, .5); }
.secondary-action:hover, .secondary-action:focus-visible { border-color: var(--pwa-cyan); color: var(--pwa-cyan); outline: none; }
.hero-orbit { position: relative; width: 190px; height: 190px; margin: auto; opacity: .82; }
.orbit { position: absolute; inset: 15px; border: 1px solid rgba(0, 238, 255, .42); border-radius: 50%; transform: rotate(-25deg) scaleX(.68); }
.orbit-two { inset: 31px; border-color: rgba(255, 92, 168, .48); transform: rotate(55deg) scaleX(.68); }
.orbit-core { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 76px; height: 76px; transform: translate(-50%, -50%); border: 1px solid var(--pwa-mint); border-radius: 50%; color: white; background: rgba(2, 19, 29, .9); box-shadow: 0 0 30px rgba(0, 255, 204, .24); font: 900 22px var(--pwa-display); }
.orbit-core span { display: block; margin-top: -16px; color: var(--pwa-cyan); font-size: 7px; letter-spacing: 2px; }
.orbit-dot { position: absolute; width: 7px; height: 7px; border: 1px solid white; border-radius: 50%; background: var(--pwa-pink); box-shadow: 0 0 12px var(--pwa-pink); }
.dot-one { top: 19px; right: 31px; }.dot-two { left: 21px; bottom: 35px; background: var(--pwa-cyan); box-shadow: 0 0 12px var(--pwa-cyan); }
.hero-stat { align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid rgba(158, 255, 246, .2); padding-left: 18px; }
.hero-stat span, .hero-stat small { color: #789da4; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.hero-stat strong { margin: 10px 0 4px; color: white; font: 900 58px var(--pwa-display); }

.workspace-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 30px 0 13px; }
.workspace-head h2 { margin: 7px 0 0; color: white; font: 900 21px var(--pwa-display); letter-spacing: 2px; }
.workspace-tools { display: flex; align-items: center; gap: 14px; padding-bottom: 2px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--pwa-mint); }
.launcher-panel { border: 1px solid rgba(124, 227, 230, .18); background: rgba(2, 13, 23, .55); }
.panel-ribbon { display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid rgba(124, 227, 230, .16); color: #7599a1; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.panel-ribbon span:first-child { color: var(--pwa-cyan); }
.pwa-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.pwa-card {
  display: flex; min-width: 0; min-height: 238px; flex-direction: column; justify-content: space-between; gap: 12px;
  overflow: hidden; border: 1px solid rgba(140, 221, 224, .23); border-top: 2px solid var(--accent);
  background: rgba(5, 22, 34, .82); transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.pwa-card:hover, .pwa-card:focus-visible { transform: translateY(-3px); border-color: var(--accent); background: rgba(10, 39, 53, .98); outline: none; }
.pwa-card-image { display: block; width: 100%; height: 106px; object-fit: cover; filter: saturate(.88) contrast(1.08); border-bottom: 1px solid color-mix(in srgb, var(--accent) 52%, transparent); }
.pwa-card-copy { padding: 0 12px; }
.pwa-card-kicker { color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.pwa-card-title { margin: 8px 0 6px; color: white; font: 900 14px var(--pwa-display); letter-spacing: .7px; }
.pwa-card-copy p { min-height: 29px; margin: 0; color: var(--pwa-muted); font-size: 9px; line-height: 1.5; }
.pwa-card-action { display: flex; justify-content: space-between; align-items: center; margin: 0 12px; border-top: 1px solid rgba(130, 216, 220, .17); padding: 10px 0 12px; color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .8px; }
.pwa-card-action span { color: white; font-size: 15px; }
.pwa-card-audit { border-color: rgba(255, 53, 93, .5); background: linear-gradient(145deg, rgba(75, 8, 26, .62), rgba(5, 22, 34, .86)); }
.pwa-card-audit .pwa-card-action { color: #ff7189; }
.pwa-card-arcade { min-height: 258px; }
.pwa-card-arcade .pwa-card-image { height: 118px; }
.pwa-card-status {
  display: inline-flex; align-items: center; width: fit-content; margin-top: 9px; border: 1px solid currentColor;
  border-radius: 999px; padding: 3px 7px; color: #99b6bd; background: rgba(1, 10, 17, .68);
  font-size: 7px; font-weight: 900; letter-spacing: .8px;
}
.pwa-card--featured { border-color: rgba(0, 255, 204, .44); }
.pwa-card--featured .pwa-card-status { color: var(--pwa-mint); }
.pwa-card--ready { border-color: rgba(126, 255, 226, .34); }
.pwa-card--ready .pwa-card-status { color: #7effe2; }
.pwa-card--sound .pwa-card-status { color: #00d9ff; }
.pwa-card--qa .pwa-card-status { color: #ffd27a; }
.pwa-card--hold { border-color: rgba(255, 83, 112, .42); background: linear-gradient(145deg, rgba(47, 8, 21, .52), rgba(5, 22, 34, .82)); }
.pwa-card--hold:hover, .pwa-card--hold:focus-visible { transform: none; border-color: rgba(255, 83, 112, .62); outline: none; }
.pwa-card--hold .pwa-card-status, .pwa-card--hold .pwa-card-action { color: #ff758b; }
.pwa-card--hold .pwa-card-action span:first-child { font-size: 8px; letter-spacing: .55px; }
.pwa-card--library { border-color: rgba(255, 92, 168, .48); }
.pwa-card--library .pwa-card-status { color: #ff8bc2; }
.pwa-card--online { border-color: rgba(255, 194, 94, .46); }
.pwa-card--online .pwa-card-status { color: #ffd27a; }
.arcade-review-note { border-color: rgba(255, 210, 122, .28); border-left-color: #ffd27a; background: rgba(66, 43, 13, .18); }
.arcade-review-note strong { color: #ffd27a; }
.chatbot-review-note {
  display: flex; align-items: baseline; gap: 12px; margin: 12px 12px 0; padding: 10px 12px;
  border: 1px solid rgba(255, 203, 107, .3); border-left: 2px solid #ffcb6b; background: rgba(74, 47, 11, .23);
  color: #c6a979; font-size: 9px; line-height: 1.5;
}
.chatbot-review-note strong { flex: 0 0 auto; color: #ffcb6b; font-size: 8px; letter-spacing: 1px; }
.catalog-note {
  display: flex; align-items: baseline; gap: 12px; margin: 12px 12px 0; padding: 10px 12px;
  border: 1px solid rgba(0, 240, 255, .25); border-left: 2px solid var(--pwa-cyan);
  background: rgba(0, 52, 66, .2); color: #9fc2c8; font-size: 9px; line-height: 1.5;
}
.catalog-note strong { flex: 0 0 auto; color: var(--pwa-cyan); font-size: 8px; letter-spacing: 1px; }
.pwa-bottom-strip { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-top: 15px; padding: 13px 15px; border: 1px solid rgba(255, 92, 168, .22); background: rgba(31, 8, 28, .35); }
.pwa-bottom-strip strong { display: block; margin-top: 6px; color: white; font-size: 10px; letter-spacing: 1px; }
.strip-metrics { display: flex; align-items: center; justify-content: center; gap: 18px; color: #b77698; font-size: 8px; letter-spacing: 1px; }
.strip-metrics b { display: block; margin-top: 4px; color: white; font-size: 12px; }
.strip-note { align-self: center; color: #b77698; font-size: 8px; line-height: 1.5; text-align: right; }
.pwa-bottom-nav { display: none; }
.profile-modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px;
  background: rgba(0, 5, 11, .78); backdrop-filter: blur(8px);
}
.profile-dialog {
  width: min(500px, 100%); border: 1px solid rgba(0,255,204,.55); background: linear-gradient(145deg, rgba(8,34,45,.98), rgba(3,14,24,.98));
  box-shadow: 0 0 55px rgba(0,255,204,.16); padding: 22px; color: var(--pwa-text);
}
.profile-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(124,227,230,.18); padding-bottom: 14px; }
.profile-dialog h2 { margin: 7px 0 0; color: white; font: 900 22px var(--pwa-display); letter-spacing: 1px; }
.profile-close { border: 1px solid rgba(0,255,204,.4); border-radius: 6px; padding: 2px 9px; color: var(--pwa-mint); background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }
.profile-dialog form { display: grid; gap: 13px; padding-top: 18px; }
.profile-dialog label { display: grid; gap: 6px; color: #8eb2b7; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.profile-dialog input { width: 100%; border: 1px solid rgba(124,227,230,.25); border-radius: 4px; padding: 11px; color: white; background: rgba(2,14,23,.78); font: 11px var(--pwa-mono); }
.profile-dialog input:focus { border-color: var(--pwa-mint); outline: none; box-shadow: 0 0 0 2px rgba(0,255,204,.1); }
.profile-help { margin: 0; color: #7599a1; font-size: 9px; line-height: 1.5; }
.profile-form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.profile-form-actions .primary-action, .profile-form-actions .secondary-action { border-radius: 4px; padding: 10px 12px; }
.profile-form-actions .primary-action span { color: inherit; font-size: 14px; }

@media (max-width: 1050px) {
  .pwa-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pwa-hero { grid-template-columns: minmax(0, 1fr) 170px; }
  .hero-stat { display: none; }
}
@media (max-width: 760px) {
  .pwa-app { width: min(100% - 16px, 620px); padding: 8px 0 78px; }
  .pwa-topbar { position: relative; z-index: 42; min-height: 54px; padding: 8px 10px; }
  .sidebar-toggle {
    display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(0, 255, 204, .48);
    border-radius: 8px; padding: 7px 8px; color: var(--pwa-mint); background: rgba(0, 255, 204, .07);
    cursor: pointer; font-size: 8px; font-weight: 900; letter-spacing: 1px;
  }
  .sidebar-toggle:hover, .sidebar-toggle:focus-visible, body.sidebar-open .sidebar-toggle { color: #031119; background: var(--pwa-mint); outline: none; }
  .hamburger-icon { display: grid; gap: 3px; width: 15px; }
  .hamburger-icon i { display: block; height: 1px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
  body.sidebar-open .hamburger-icon i:first-child { transform: translateY(4px) rotate(45deg); }
  body.sidebar-open .hamburger-icon i:nth-child(2) { opacity: 0; }
  body.sidebar-open .hamburger-icon i:last-child { transform: translateY(-4px) rotate(-45deg); }
  .pwa-top-actions { gap: 8px; }.connection { display: none; }.avatar-chip b { display: none; }
  .install-button { padding: 8px; font-size: 8px; }
  .pwa-layout { display: block; margin-top: 12px; }
  .pwa-layout::before {
    position: fixed; inset: 0; z-index: 30; content: ""; visibility: hidden; opacity: 0;
    background: rgba(0, 5, 11, .7); backdrop-filter: blur(3px); transition: opacity .2s ease, visibility .2s ease;
  }
  .pwa-rail {
    position: fixed; z-index: 41; inset: 0 auto 0 0; display: flex; width: min(286px, 82vw); min-height: 100vh;
    transform: translateX(-104%); padding: max(18px, env(safe-area-inset-top)) 15px 24px;
    border-width: 0 1px 0 0; background: rgba(2, 15, 25, .98); box-shadow: 18px 0 45px rgba(0, 0, 0, .45);
    transition: transform .22s cubic-bezier(.22, .61, .36, 1);
  }
  .rail-head { margin-bottom: 4px; }.rail-close { display: block; }
  body.sidebar-open .pwa-layout::before { visibility: visible; opacity: 1; }
  body.sidebar-open .pwa-rail { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  .pwa-hero { display: block; min-height: 0; padding: 25px 20px 22px; }
  .hero-copy p { font-size: 10px; }.hero-orbit { position: absolute; top: 10px; right: -39px; width: 170px; height: 170px; opacity: .35; }
  .hero-actions { margin-top: 18px; }.primary-action, .secondary-action { padding: 10px; font-size: 8px; }
  .workspace-head { align-items: start; flex-direction: column; gap: 10px; margin: 22px 2px 11px; }
  .workspace-tools { width: 100%; justify-content: space-between; }.pwa-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
   .pwa-card { min-height: 215px; }.pwa-card-image { height: 86px; }.pwa-card-copy { padding: 0 9px; }
   .pwa-card-arcade { min-height: 246px; }.pwa-card-arcade .pwa-card-image { height: 100px; }
  .pwa-card-title { font-size: 12px; }.pwa-card-copy p { font-size: 8px; }.pwa-card-action { margin: 0 9px; padding: 9px 0 10px; font-size: 7px; }
  .pwa-bottom-strip { grid-template-columns: 1fr; gap: 12px; }.strip-metrics { justify-content: flex-start; }.strip-note { text-align: left; }
  .pwa-bottom-nav {
    position: fixed; z-index: 20; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px;
     display: grid; grid-template-columns: repeat(var(--mobile-nav-items, 4), 1fr); gap: 3px; padding: 5px;
    border: 1px solid rgba(0, 255, 204, .28); border-radius: 12px; background: rgba(2, 14, 23, .94); box-shadow: 0 0 25px rgba(0, 0, 0, .4);
  }
  .pwa-bottom-nav button, .pwa-bottom-nav a { border: 1px solid transparent; border-radius: 8px; padding: 8px 2px; background: transparent; color: #8aaeb5; font-size: 7px; font-weight: 900; letter-spacing: .35px; text-align: center; }
  .pwa-bottom-nav span { display: block; margin-bottom: 3px; color: currentColor; font-size: 14px; }
  .pwa-bottom-nav button.is-active, .pwa-bottom-nav button:hover, .pwa-bottom-nav a:hover { border-color: rgba(0, 255, 204, .42); color: var(--pwa-mint); background: rgba(0, 255, 204, .08); }
  .chatbot-review-note { align-items: flex-start; flex-direction: column; gap: 5px; margin: 9px 8px 0; font-size: 8px; }
  .catalog-note { align-items: flex-start; flex-direction: column; gap: 5px; margin: 9px 8px 0; font-size: 8px; }
  .profile-dialog { padding: 17px; }.profile-form-actions { flex-direction: column-reverse; }.profile-form-actions button { justify-content: center; }
}
.pwa-nav-export { --mobile-nav-items: 3; }
@media (max-width: 400px) {
  .pwa-card-grid { grid-template-columns: 1fr; }.pwa-card { min-height: 190px; }.pwa-card-image { height: 118px; }
}