/* The launcher shell: sign-in screens, top bar, library, settings, admin.
   Colours come from the tokens in /social/social.css. */
html, body { margin: 0; height: 100%; background: var(--ls-bg); color: var(--ls-text); font-family: var(--ls-font); }
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
#app { height: 100%; }
button, input, select, textarea { font: inherit; }
a { color: var(--ls-accent); }
h1, h2, h3 { color: var(--ls-strong); margin: 0 0 10px; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 700; margin-top: 26px; }

.lx-loading { height: 100%; display: grid; place-items: center; }
.lx-loading .lx-logo { font-size: 40px; animation: lx-pulse 1.2s ease-in-out infinite; }
@keyframes lx-pulse { 50% { opacity: 0.35; } }
.lx-logo { color: var(--ls-accent); }
.lx-brand { display: flex; align-items: center; gap: 8px; color: var(--ls-strong); font-weight: 800; letter-spacing: 0.14em; text-decoration: none; font-size: 15px; }
.lx-brand.big { font-size: 18px; justify-content: center; margin-bottom: 18px; }
.lx-banner { background: linear-gradient(90deg, #1a6fa8, #2c4f7c); color: #fff; padding: 9px 16px; text-align: center; font-size: 13.5px; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }

/* signed-out screens */
.lx-auth { min-height: 100%; display: flex; flex-direction: column; align-items: stretch;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(102, 192, 244, 0.16), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(92, 158, 31, 0.14), transparent 60%), var(--ls-bg); }
.lx-auth-card { width: min(420px, calc(100% - 32px)); margin: auto; padding: 30px 30px 22px; background: var(--ls-panel); border: 1px solid var(--ls-line); border-radius: 10px; box-shadow: var(--ls-shadow); }
.lx-auth-card h1 { font-size: 22px; text-align: center; }
.lx-auth-card > .ls-sub { text-align: center; margin: 0 0 6px; font-size: 13.5px; }
.lx-auth-form { padding: 10px 0 0; }
.lx-big { padding: 12px 16px; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; margin-top: 4px; }
.lx-auth-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* shell */
.lx-shell { min-height: 100%; display: flex; flex-direction: column; }
.lx-shell.full { height: 100%; }
.lx-top { display: flex; align-items: center; gap: 22px; padding: 0 18px; height: 56px; flex: none; background: var(--ls-bg2); border-bottom: 1px solid var(--ls-line); }
.lx-nav { display: flex; align-items: stretch; height: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.lx-nav-item { display: flex; align-items: center; gap: 6px; padding: 0 14px; color: var(--ls-text); text-decoration: none; font-weight: 700; font-size: 13.5px; letter-spacing: 0.08em; border-bottom: 3px solid transparent; white-space: nowrap; }
.lx-nav-item:hover { color: var(--ls-strong); }
.lx-nav-item.on { color: var(--ls-accent); border-bottom-color: var(--ls-accent); }
.lx-user { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.lx-user:hover, .lx-user:focus-visible { background: var(--ls-hover); outline: none; }
.lx-user-text { line-height: 1.2; }
.lx-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lx-social-host { flex: 1; min-height: 0; display: flex; }
.lx-social-host > .ls-social { flex: 1; }
.lx-hr { border: 0; border-top: 1px solid var(--ls-line); margin: 6px 0; }

/* library */
.lx-library { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; }
.lx-lib-side { background: var(--ls-bg2); border-right: 1px solid var(--ls-line); padding: 12px; overflow-y: auto; }
.lx-search { margin-bottom: 10px; }
.lx-lib-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; color: var(--ls-text); text-decoration: none; }
.lx-lib-row:hover { background: var(--ls-hover); color: var(--ls-strong); }
.lx-lib-row.on { background: var(--ls-active); color: var(--ls-strong); }
.lx-lib-row.dim { opacity: 0.6; }
.lx-lib-main { overflow-y: auto; min-width: 0; }
.lx-art { position: relative; display: grid; place-items: center; overflow: hidden; flex: none; }
.lx-art svg { image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.lx-art-icon { width: 30px; height: 30px; border-radius: 4px; }
.lx-art-icon svg { filter: none; }
.lx-art-hero { height: 300px; }
.lx-art-card { height: 140px; border-radius: 6px; }
.lx-art-letter { font-size: 64px; font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.lx-art-icon .lx-art-letter { font-size: 15px; }
.lx-art-title { position: absolute; left: 28px; bottom: 22px; font-size: 40px; font-weight: 800; color: #fff; letter-spacing: 0.02em; text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55); }
.lx-art-card .lx-art-title { font-size: 18px; left: 12px; bottom: 10px; }
.lx-hero .lx-art-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45)); pointer-events: none; }
.lx-playbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 28px; background: var(--ls-panel); border-bottom: 1px solid var(--ls-line); }
.lx-play { min-width: 170px; padding: 13px 22px; font-size: 16px; font-weight: 800; letter-spacing: 0.08em; text-decoration: none; }
.lx-play[aria-disabled] { cursor: default; opacity: 0.75; }
.lx-playbar-friends { text-align: right; }
.lx-face-row { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.lx-lib-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding: 22px 28px 40px; }
.lx-about p { line-height: 1.55; margin: 0 0 12px; }
.lx-disclaimer { font-size: 11px; color: var(--ls-muted); letter-spacing: 0.03em; }
.lx-friend-activity { background: var(--ls-panel); border: 1px solid var(--ls-line); border-radius: 8px; padding: 14px; align-self: start; }
.lx-friend-activity h3 { margin-top: 0; }

/* settings and admin */
.lx-split { flex: 1; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 0; }
.lx-sub-nav { background: var(--ls-bg2); border-right: 1px solid var(--ls-line); padding: 16px 10px; overflow-y: auto; display: flex; flex-direction: column; }
.lx-sub-nav .ls-side-row { text-decoration: none; }
.lx-sub-nav .ls-side-row.on { background: var(--ls-active); color: var(--ls-strong); }
.lx-sub-nav button.ls-side-row { border: 0; background: none; text-align: left; font: inherit; width: 100%; }
.lx-sub-nav .ls-side-row.danger { color: var(--ls-red); }
.lx-pane { padding: 26px 34px 60px; overflow-y: auto; max-width: 980px; width: 100%; }
.lx-pane > .ls-perm, .lx-pane > .ls-seg { max-width: 640px; }
.lx-narrow { max-width: 420px; }
.lx-flush { padding: 0; }
.lx-account-card { display: flex; align-items: center; gap: 20px; padding: 20px; max-width: 640px; background: var(--ls-panel); border: 1px solid var(--ls-line); border-radius: 8px; }
.lx-account-name { font-size: 22px; font-weight: 700; color: var(--ls-strong); }
.lx-device-ic { width: 32px; text-align: center; font-size: 20px; }
.lx-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 10px; background: var(--ls-active); color: var(--ls-accent); font-size: 11px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.lx-tag.bad { background: rgba(217, 68, 63, 0.15); color: var(--ls-red); }
.lx-meter { width: 200px; height: 8px; border-radius: 4px; background: var(--ls-panel3); overflow: hidden; }
.lx-meter > span { display: block; height: 100%; width: 0; background: var(--ls-green2); transition: width 80ms linear; }
.lx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 760px; }
.lx-stat { background: var(--ls-panel); border: 1px solid var(--ls-line); border-radius: 8px; padding: 14px 16px; }
.lx-stat-n { font-size: 28px; font-weight: 700; color: var(--ls-strong); }
.lx-perm-list { margin: 0; padding-left: 20px; line-height: 1.7; }
.lx-admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.lx-table { display: flex; flex-direction: column; }
.lx-trow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--ls-line); border-radius: 4px; }
.lx-trow.ls-click:hover { background: var(--ls-hover); }
.lx-trow.on { background: var(--ls-active); }
.lx-detail { position: sticky; top: 0; background: var(--ls-panel); border: 1px solid var(--ls-line); border-radius: 8px; padding: 16px; min-height: 120px; }
.lx-detail .ls-row-gap { padding: 4px 0; }
.lx-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.lx-detail-head h3 { margin: 0; }
.lx-facts { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px 12px; margin: 10px 0; }
.lx-facts dt { color: var(--ls-muted); font-size: 12.5px; }
.lx-facts dd { margin: 0; overflow-wrap: anywhere; }
.lx-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-inline-select { width: auto; padding: 5px 8px; }
.lx-code { font: 700 22px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 0.08em; text-align: center; padding: 16px; border-radius: 6px; background: var(--ls-bg); color: var(--ls-strong); user-select: all; overflow-wrap: anywhere; }
.lx-audit-time { width: 150px; flex: none; }
.lx-pane code { font: 12.5px ui-monospace, Consolas, monospace; background: var(--ls-panel3); padding: 1px 5px; border-radius: 3px; }
.lx-pane textarea.ls-input { max-width: 640px; }
.lx-pane > .ls-input, .lx-pane > .ls-row-gap { max-width: 640px; margin-bottom: 8px; }

@media (max-width: 900px) {
  .lx-library { grid-template-columns: minmax(0, 1fr); }
  .lx-lib-side { border-right: 0; border-bottom: 1px solid var(--ls-line); max-height: 220px; }
  .lx-lib-cols { grid-template-columns: minmax(0, 1fr); }
  .lx-admin-cols { grid-template-columns: minmax(0, 1fr); }
  .lx-detail { position: static; }
}
@media (max-width: 640px) {
  .lx-top { gap: 10px; padding: 0 10px; }
  .lx-brand > span:last-child, .lx-user-text, .lx-user > .ls-sub { display: none; }
  .lx-nav-item { padding: 0 9px; font-size: 12.5px; letter-spacing: 0.04em; }
  .lx-split { grid-template-columns: minmax(0, 1fr); }
  .lx-sub-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--ls-line); }
  .lx-sub-nav .ls-sect, .lx-sub-nav .lx-hr { display: none; }
  .lx-sub-nav .ls-side-row { white-space: nowrap; flex: none; }
  .lx-pane { padding: 18px 16px 50px; }
  .lx-art-hero { height: 190px; }
  .lx-art-title { font-size: 28px; left: 16px; bottom: 14px; }
  .lx-playbar, .lx-lib-cols { padding-left: 16px; padding-right: 16px; }
  .lx-play { width: 100%; }
  .lx-playbar-friends { text-align: left; }
  .lx-account-card { flex-direction: column; text-align: center; }
  .lx-audit-time { width: 92px; }
}
