/* StaxOS — shared 56px strip + side card + main canvas
   (Customer Service, Records, Forms, ClawBot terminal) */
.sc-app {
  display: flex;
  height: 100%;
  font-family: var(--os-font, 'DM Sans', sans-serif);
  overflow: hidden;
  background: #0c0c0e;
  color: #e8e4dc;
}
.sc-strip {
  width: 56px;
  background: #141416;
  border-right: 1px solid #2a2a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  flex-shrink: 0;
  overflow: hidden;
}
.sc-strip-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.sc-strip-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 2px;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  color: #888;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
  border-radius: 6px;
}
.sc-strip-btn:hover { color: #e8e4dc; background: rgba(255, 255, 255, 0.06); }
.sc-strip-btn.active { background: #c8a44a; color: #0c0c0e; font-weight: 700; }
.sc-strip-ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc-strip-ic svg { width: 22px; height: 22px; }
.sc-strip-lbl { font-size: 9px; font-weight: 600; letter-spacing: 0.03em; line-height: 1; }
.sc-card--off {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  opacity: 0;
  border: none;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Beta 1: the side card follows the theme (it was dark in light mode). */
.sc-card {
  width: 28%;
  min-width: 240px;
  max-width: 360px;
  background: var(--stax-surface, #141416);
  border-right: 1px solid var(--stax-border, #2a2a2e);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
.sc-card-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stax-border, #2a2a2e);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stax-text-dim, #7a7364);
  flex-shrink: 0;
  min-height: 40px;
}
.sc-card-toggle {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: var(--stax-surface-2, rgba(255, 255, 255, 0.06));
  color: var(--stax-text-dim, #888);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.sc-card-toggle:hover {
  background: var(--stax-surface-3, rgba(255, 255, 255, 0.1));
  color: var(--stax-text, #e8e4dc);
}
.sc-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--stax-text, #e8e4dc);
  text-transform: none;
  letter-spacing: 0.02em;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-card-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sc-card-body::-webkit-scrollbar { width: 4px; }
.sc-card-body::-webkit-scrollbar-thumb { background: var(--stax-border, rgba(255, 255, 255, 0.08)); border-radius: 2px; }
.sc-main { flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 768px) {
  .sc-card {
    position: absolute !important;
    top: 0;
    left: 56px;
    bottom: 0;
    width: calc(100% - 56px) !important;
    min-width: 0;
    max-width: none;
    z-index: 12;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  }
  .sc-strip { width: 52px; }
  .sc-strip-lbl { font-size: 8px; }
}

/* RX.1v2 (2026-07-22) — ONE mobile navigation convention: the SIDE RAIL.
   (The 2026-07-21 bottom-tab experiment is reverted — the artist wants
   the same side strip + side-card live-preview feel as desktop.)
   Apps opt in by adding `sc-mobile-tabs` to their root and the shared
   sc-strip/sc-strip-nav/sc-strip-btn/sc-card/sc-main aliases to their
   existing prefixed elements. At phone width the strip KEEPS its 56px
   vertical rail on the left; the card overlays the canvas beside it. */
@media (max-width: 640px) {
  .sc-mobile-tabs {
    position: relative;
    box-sizing: border-box;
  }
  .sc-mobile-tabs > .sc-strip {
    position: relative !important;
    inset: auto !important;
    width: 56px !important;
    height: 100% !important;
    flex-direction: column !important;
    border-right: 1px solid var(--stax-border, #2a2a2e) !important;
    border-top: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 30 !important;
  }
  .sc-mobile-tabs > .sc-strip > .sc-strip-nav {
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    gap: 2px !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
  .sc-mobile-tabs .sc-strip-btn {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 7px 2px !important;
    border-radius: 0 !important;
    justify-content: center !important;
  }
  /* Card = side-car live preview: overlays the canvas, anchored to the rail. */
  .sc-mobile-tabs > .sc-card {
    position: absolute !important;
    top: 0 !important;
    left: 56px !important;
    right: 0 !important;
    bottom: 0 !important;
    width: calc(100% - 56px) !important;
    min-width: calc(100% - 56px) !important;
    max-width: calc(100% - 56px) !important;
    z-index: 20 !important;
    transition: transform 0.22s ease;
  }
  #tx-shell.tx-viewport-narrow .sc-mobile-tabs > .sc-card {
    position: absolute !important;
    top: 0 !important;
    left: 56px !important;
    right: 0 !important;
    bottom: 0 !important;
    width: calc(100% - 56px) !important;
    min-width: calc(100% - 56px) !important;
    max-width: calc(100% - 56px) !important;
  }
  .sc-mobile-tabs > .sc-card.fa-card--hidden,
  #tx-shell.tx-viewport-narrow .sc-mobile-tabs > .sc-card.fa-card--hidden {
    transform: translateX(calc(-100% - 56px)) !important;
  }
  .sc-mobile-tabs > .sc-main {
    padding-bottom: 0 !important;
  }
}

/* Beta 1 — Artist Profile uses the shared AppShell rail (mirrored in the
   drawer), not a StripCard side strip. On a phone its intro card sits above
   the form instead of covering it. */
.ap-rail-host { display: none; }
@media (max-width: 768px) {
  .sc-wrap.ap-shell { flex-direction: column; overflow-y: auto; }
  .ap-shell > .sc-card {
    position: static !important;
    width: 100% !important;
    max-width: none;
    min-width: 0;
    flex: none;
    box-shadow: none;
    border-right: 0;
    border-bottom: 1px solid var(--stax-border, #2a2a2e);
  }
  .ap-shell > .sc-card .sc-card-body { overflow: visible; }
  .ap-shell > .sc-main { flex: none; overflow: visible; }
}
