/* The common channel over the night art (the «Общий чат» tab); the home screen and the bar are in home.css.
   The scene stays dark in both themes. */
:root { --hub-text: #e9ddff; --hub-muted: #b5a3d0; --hub-panel: #130c24; --hub-line: #b995ff33; }
[hidden] { display: none !important; }
.hub-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.lc-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.lc-icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

html {
  background: var(--ds-surface-canvas);
  -webkit-tap-highlight-color: transparent;
}

/* The main screen is one picture: nothing to scroll. */
html:has(#screen-landing:not([hidden])):not([data-hub-overlay="open"]) {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: transparent;
  color: var(--ds-ink);
  font: 400 var(--ds-fs-label)/1.4 var(--lc-font);
}

/* The old screens are centered in a fixed-height box, this one scrolls with the page. */
#app:has(#screen-landing:not([hidden])) {
  display: block;
  height: auto;
}

#screen-landing.hub {
  display: block;
  width: 100%;
  height: auto;
  min-height: var(--app-height, 100svh);
  margin: 0;
  padding: 0;
  text-align: left;
  color: var(--lc-text);
  font: 400 var(--ds-fs-label)/16.8px var(--lc-font);
}

.lc-shell {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--app-height, 100svh);
}

.lc-main {
  min-width: 0;
}

/* Home: the background fills the whole page, on a computer too. */
.lc-home {
  /* Inside the already-sized visual viewport, do not reserve the hidden layout pixels again. */
  --lc-bar-space: var(--lc-bar-height);
  --hub-ink: var(--lc-home-ink);
  --hub-soft: var(--lc-home-soft);
  --hub-glow: color-mix(in srgb, var(--lc-accent) 60%, transparent);
  position: fixed;
  inset: var(--app-offset-top, 0px) 0 auto;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  color: var(--hub-ink);
}

/* The logo is part of the art, this box only names it for screen readers. */
.lc-wordmark {
  position: absolute;
  z-index: 2;
  top: 9%;
  left: 50%;
  width: min(56%, 320px);
  height: 18%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* The live count: a small glass chip in the corner. */
.lc-online {
  position: absolute;
  z-index: 5;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--lc-line);
  border-radius: var(--ds-radius-full);
  background-color: var(--lc-card);
  box-shadow: var(--lc-halo);
  color: var(--hub-ink);
  font: 600 var(--ds-fs-body)/1.2 var(--lc-font);
}

.lc-online strong {
  font-weight: 800;
}

.lc-star-glyph {
  flex: none;
  width: 15px;
  height: 15px;
  fill: var(--hub-soft);
  filter: drop-shadow(0 0 5px var(--hub-glow));
}

.hub-connection {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: calc(var(--lc-bar-space) + var(--lc-field) + 2 * var(--lc-talk-gap));
  left: 16px;
  margin: 0;
  color: var(--hub-ink);
  font-size: var(--ds-fs-label);
  text-align: center;
  text-shadow: 0 1px 8px #000;
}

.hub-connection:empty {
  display: none;
}

@media (forced-colors: active) {
  .lc-online {
    border: 1px solid ButtonText;
    background: ButtonFace;
    box-shadow: none;
    color: ButtonText;
  }
}

/* Shared by the old modals and the local concept scenes. */
.hub-eyebrow { font-size: var(--ds-fs-micro); letter-spacing: .36em; color: var(--hub-muted); }
.hub-badge { display: inline-block; padding: 3px 10px; margin-top: 14px; border-radius: var(--ds-radius-pill); color: var(--hub-muted); background: #9b65d31a; font-size: var(--ds-fs-micro); letter-spacing: .04em; }
.hub-toggle { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; }.hub-toggle small { display: block; font-size: var(--ds-fs-micro); color: var(--hub-muted); }.hub-toggle input { accent-color: #a16cdb; width: 20px; height: 20px; }
#hub-rift-controls .rift { padding: 12px 0; }#hub-rift-controls .rift-hint { color: var(--hub-muted); }#hub-rift-controls .rift-count { color: var(--hub-text); }
html[data-hub-theme="light"] { color-scheme: light; --hub-text: #2c1a43; --hub-muted: #655277; --hub-panel: #f5effc; --hub-line: #724a9d36; --bg: #eee8fa; --bg-2: #f8f4ff; --ink: #30243e; --ink-dim: #695978; --mark: #3a254f; --accent: #6c43bb; --own: #2254a0; --ok: #2254a0; --ink-soft: #74617d; --entity: #7042a0; }

.lc-sheet-row:focus-visible {
  outline: 2px solid var(--hub-ink, var(--lc-text));
  outline-offset: 4px;
}

.chat-lc-quota {
  margin: 0;
  padding: 10px 0 0;
  color: var(--lc-text);
  font-size: var(--ds-fs-micro);
}
.chat-lc-quota-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chat-lc-quota-label h3 { margin: 0; color: var(--lc-text); font: 700 var(--ds-fs-label)/1.3 var(--lc-font); }
.chat-lc-quota-label > span { color: var(--lc-muted); font-size: var(--ds-fs-label); font-variant-numeric: tabular-nums; }
.chat-lc-quota progress {
  --pollution-spectrum: linear-gradient(90deg, #46cb86 0%, #d7b84b 53%, #ee5358 100%);
  display: block; appearance: none; width: 100%; height: 5px; margin-top: 7px; overflow: hidden; border: 0;
  border-radius: var(--ds-radius-full);
  background: linear-gradient(90deg, transparent var(--chat-pollution-fill), var(--ds-surface-inset) 0), var(--pollution-spectrum);
}
.chat-lc-quota progress::-webkit-progress-bar,
.chat-lc-quota progress::-webkit-progress-value { background: transparent; }
.chat-lc-quota progress::-moz-progress-bar { background: transparent; }
@media (forced-colors: active) {
  .chat-lc-quota progress { appearance: auto; forced-color-adjust: auto; }
}
.chat-lc-quota p { margin: 6px 0 0; color: var(--lc-muted); }
.chat-lc-daily h3 { margin: 0 0 var(--ds-space-2); color: var(--lc-muted); font: 650 var(--ds-fs-label)/1.3 var(--lc-font); }
.chat-lc-daily { margin-block-start: var(--ds-space-3); padding-block-start: var(--ds-space-2); border-block-start: 1px solid var(--ds-edge); }
.chat-daily-meters { display: grid; gap: var(--ds-space-2); padding: 0; margin: 0; list-style: none; }
.chat-daily-meters > li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px var(--ds-space-2);
  font-size: var(--ds-fs-label); overflow-wrap: anywhere;
}
.chat-daily-meters small, #chat-daily-reset { color: var(--lc-muted); font-size: var(--ds-fs-micro); font-variant-numeric: tabular-nums; }
.chat-daily-meters small { text-align: end; }
.chat-daily-meters .chat-daily-meter { grid-column: 1 / -1; position: relative; }
.chat-daily-meter::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: var(--daily-used); background: var(--lc-accent); }
@media (forced-colors: active) {
  .chat-daily-meters .chat-daily-meter { border: 1px solid CanvasText; }
  .chat-daily-meter::before { forced-color-adjust: none; background: Highlight; }
}
