/* The website chat on every page (assets/chat.js): docked to the bottom of the window, or undocked
   and moved like a window. Uses site.css's tokens. */
.lc {
  --lc-size: 15px;
  position: fixed; z-index: 90; display: flex; flex-direction: column; font: 15px/1.4 var(--body); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(0, 0, 0, .45);
}
.lc [hidden], .lc-menu[hidden] { display: none !important; }
.lc.docked { left: 0; right: 0; bottom: 0; border-width: 1px 0 0; }
.lc.floating { border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.lc.snap { outline: 2px dashed var(--flame); outline-offset: -2px; }
.lc input[type="password"], .lc input[type="text"] {
  width: 100%; font: inherit; color: var(--text); background: #120e19; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 11px;
}
.lc input:focus { outline: none; border-color: var(--flame); box-shadow: 0 0 0 3px rgba(255, 138, 42, .18); }

.lc-head { flex: none; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); cursor: grab; user-select: none; touch-action: none; }
.lc:not(.open) .lc-head { border-bottom: 0; }
.lc-ticker { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; font: inherit; color: var(--muted); background: none; border: 0; padding: 0 4px; cursor: pointer; text-align: left; }
.lc-title { color: var(--flame-2); font-family: var(--heading); letter-spacing: .06em; flex: none; }
.lc-online { flex: none; font-size: .8rem; color: var(--good); }
.lc-last { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .88rem; }
.lc.open .lc-last { display: none; }
.lc-tools { display: none; gap: 4px; }
.lc.open .lc-tools { display: flex; }
.lc-body { flex: 1; min-height: 0; display: none; flex-direction: column; }
.lc.open .lc-body { display: flex; }
.lc-tabrow { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.lc-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; min-width: 0; flex: 1; }
.lc-tool { padding: 6px 9px !important; font-size: .8rem !important; }
.lc-grip-top { display: none; position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; touch-action: none; }
.lc.docked.open .lc-grip-top { display: block; }
.lc-grip-corner { display: none; position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--line) 50%, var(--line) 60%, transparent 60%, transparent 70%, var(--line) 70%, var(--line) 80%, transparent 80%); }
.lc.floating.open .lc-grip-corner { display: block; }
.lc-signin { display: grid; gap: 10px; }
.lc-signin label { display: grid; gap: 4px; font-size: .84rem; color: var(--muted); }

.lc-tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 600 .86rem/1 var(--body); color: var(--muted); background: none; border: 1px solid transparent;
  border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
.lc-tab:hover { color: var(--text); border-color: var(--line); }
.lc-tab[aria-selected="true"] { color: #1d0d00; background: var(--flame-2); }
.lc-tab-leave { opacity: .6; padding: 0 2px; }
.lc-tab-leave:hover { opacity: 1; }
.lc-count { font: 700 .7rem/1 var(--body); color: #1d0d00; background: var(--flame); border-radius: 999px; padding: 3px 6px; }
.lc-top-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.lc-tool, .lc-icon, .lc-link {
  font: 600 .84rem/1 var(--body); color: var(--muted); background: rgba(255, 255, 255, .02);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer;
}
.lc-tool:hover, .lc-icon:hover, .lc-link:hover { color: var(--text); border-color: var(--flame); }
.lc-tool[aria-pressed="true"] { color: var(--text); border-color: var(--flame); background: rgba(255, 138, 42, .1); }
.lc-tool b { color: var(--flame-2); margin-left: 2px; }
.lc-icon { padding: 6px 9px; }
.lc-link { border-color: transparent; background: none; }
.lc-link.on { color: var(--gold); border-color: var(--gold); }

.lc-main { flex: 1; display: flex; min-height: 0; }
.lc-center { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.lc-log { flex: 1; overflow-y: auto; margin: 0; padding: 12px 14px; list-style: none; font-size: var(--lc-size); line-height: 1.45; }
.lc-line { padding: 3px 0; overflow-wrap: anywhere; }
.lc.compact .lc-line { padding: 0; line-height: 1.3; }
.lc-time { font-size: .8em; margin-right: 8px; font-variant-numeric: tabular-nums; }
.lc-tag { font-size: .78em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-right: 6px; }
.lc-badge { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.22em; margin-right: 3px; }
.lc-name { font: inherit; font-weight: 700; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; }
.lc-name:hover { text-decoration: underline; }
.lc-sep { color: var(--faint); }
.lc-emote { font-style: italic; }
.lc-error { font-weight: 600; }
.lc-jump { position: absolute; right: 14px; bottom: 62px; font: 600 .82rem/1 var(--body); color: #1d0d00; background: var(--flame-2); border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.lc-form { display: flex; gap: 8px; align-items: center; padding: 10px; border-top: 1px solid var(--line); }
.lc-form input { flex: 1; min-width: 0; }
.lc-target, .lc-status { flex: none; font: 600 .8rem/1 var(--body); border-radius: 999px; padding: 7px 10px; white-space: nowrap; }
.lc-target { color: #10200c; background: #8cd973; border: 0; cursor: pointer; }
.lc-status { color: var(--gold); border: 1px solid var(--gold); }
.lc-suggest { position: absolute; left: 8px; right: 8px; bottom: 54px; max-height: min(300px, 70%); overflow-y: auto; background: #120e19; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 5; }
.lc-suggestion { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 12px; width: 100%; text-align: left; font: .86rem/1.35 var(--body); color: var(--muted); background: none; border: 0; border-bottom: 1px solid var(--line-soft); padding: 8px 12px; cursor: pointer; }
.lc-suggestion code { color: var(--flame-2); }
.lc-suggestion:hover, .lc-suggestion[aria-selected="true"] { background: rgba(255, 138, 42, .1); color: var(--text); }

.lc-side { width: 300px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: #130f1a; }
.lc-side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.lc-side-body { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; font-size: .9rem; }
.lc-side-body h4 { margin: 8px 0 0; font: 700 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--flame); }
.lc-note { color: var(--faint); font-size: .82rem; margin: 0; }
.lc-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lc-people li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.lc-people small { flex-basis: 100%; color: var(--muted); }
.lc-friends small { flex-basis: 100%; padding-left: 34px; }
.lc-friend-note { color: var(--gold) !important; }
.lc-pill { font: 700 .66rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; }
.lc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.lc-dot.on { background: var(--good); box-shadow: 0 0 6px var(--good); }
.lc-place { font: 700 .8rem/1 var(--body); color: var(--faint); min-width: 14px; }
.lc-row-tools { margin-left: auto; display: flex; gap: 4px; }
.lc-inline { display: flex; gap: 8px; }
.lc-inline input { flex: 1; min-width: 0; padding: 8px 10px !important; }
.lc-badges { display: grid; gap: 8px; }
.lc-badge-card { display: grid; grid-template-columns: auto 48px 1fr; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.lc-badge-card.locked { opacity: .55; cursor: default; }
.lc-badge-card input { accent-color: var(--flame); width: 18px; height: 18px; }
.lc-badge-card span { display: grid; gap: 2px; }
.lc-badge-card q { color: var(--gold); font-style: italic; }
.lc-badge-card small { color: var(--muted); }
.lc-commands { margin: 0; display: grid; gap: 4px; }
.lc-commands dd { margin: 0 0 6px; color: var(--muted); font-size: .84rem; }
.lc-code { font: .84rem/1.2 ui-monospace, Consolas, monospace; color: var(--flame-2); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.lc-code:hover { text-decoration: underline; }
.lc-setting { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.lc-setting input[type="range"] { flex: 1; accent-color: var(--flame); }
.lc-setting input[type="color"] { width: 44px; height: 28px; border: 1px solid var(--line); border-radius: 4px; background: none; padding: 0; }

.lc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 12px; border-top: 1px solid var(--line); color: var(--faint); font-size: .84rem; }
.lc-foot-tools { display: flex; gap: 4px; }
.lc-menu { position: fixed; z-index: 95; min-width: 200px; background: #120e19; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; display: grid; }
.lc-menu-item { text-align: left; font: 500 .9rem/1 var(--body); color: var(--text); background: none; border: 0; border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; }
.lc-menu-item:hover, .lc-menu-item:focus { background: rgba(255, 138, 42, .12); outline: none; }


@media (max-width: 960px) { .lc-tool { font-size: .74rem !important; padding: 6px 7px !important; } }
@media (max-width: 720px) {
  .lc-head { cursor: default; }
  .lc.open .lc-head { height: auto; min-height: 44px; flex-wrap: wrap; padding: 4px 8px; }
  .lc.open .lc-tools { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .lc.open .lc-ticker { height: 36px; }
  .lc-side { position: absolute; inset: 0; width: auto; z-index: 10; }
  .lc-main { position: relative; }
  .lc-suggestion { grid-template-columns: 1fr; gap: 2px; }
  .lc-foot-tools .lc-link { padding: 6px 7px; }
}
