/* Canvas (Albert Live, 30.10.2026): the live map of everything that runs (public/canvas.js), only on /canvas
   (sidebar entry "Canvas"). Black, quiet, system font like minimal.css. The chat is a dock at the bottom:
   the last lines fade out upward, the input stays where it was. Eine Kugel (30.10.2026): no head button, no
   buttons on the right, no layer behind the call; Albert's core is the page's one orb (minimal.css hides #call). */

/* ---------- full-window canvas, the chat as a dock ---------- */
.cvs-stage {
  position: absolute; inset: 0; z-index: 0; display: none; overflow: hidden; background: #000;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
body.canvas-on .cvs-stage { display: block; }
.cvs-2d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.cvs-2d.panning { cursor: grabbing; }
.cvs-stage.paused .cvs-orb { display: none; }
.cvs-orb { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; transform-origin: 50% 50%; transition: opacity 0.6s ease; }

body.canvas-on .main-head, body.canvas-on .conversation, body.canvas-on .composer-wrap { position: relative; z-index: 1; }
body.canvas-on .main-head { border-bottom-color: transparent !important; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0)); }
body.canvas-on .conversation {
  flex: 0 1 auto; margin-top: auto; max-height: 23vh; overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 52px); mask-image: linear-gradient(to bottom, transparent 0, #000 52px);
}
body.canvas-on .conversation .inner { padding-top: 40px; padding-bottom: 6px; gap: 16px; }
body.canvas-on .conversation .msg .text { font-size: 14.5px; line-height: 1.5; }
body.canvas-on .main .empty-state { display: none; }
body.canvas-on .main.empty .conversation { flex: 0 1 auto; margin-top: auto; }
body.canvas-on .main.empty .composer-wrap { margin-bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
body.canvas-on .composer-wrap { background: linear-gradient(to top, #000 62%, rgba(0, 0, 0, 0)); }

/* ---------- list fallback: keyboard and screen readers; visible while it has the focus ---------- */
.cvs-list {
  position: absolute; z-index: 2; left: 14px; top: 64px; width: min(330px, calc(100% - 28px)); max-height: calc(100% - 230px); overflow-y: auto;
  background: rgba(28, 28, 30, 0.9); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px; padding: 10px 8px 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: cvsIn 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.cvs-list:not(.open):not(:focus-within) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; animation: none;
}
.cvs-list h2 { margin: 0; padding: 2px 10px 0; font-size: 13px; font-weight: 600; color: #f5f5f7; }
.cvs-list .cvs-sum { margin: 2px 10px 8px; font-size: 12px; color: #8e8e93; }
.cvs-list ul { list-style: none; margin: 0; padding: 0; }
.cvs-item {
  width: 100%; display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; align-items: baseline; text-align: left; border: 0; background: none;
  color: #f5f5f7; padding: 7px 10px; border-radius: 11px; cursor: pointer; font: inherit;
}
.cvs-item:hover, .cvs-item:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
.cvs-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); align-self: center; grid-row: 1 / 3; }
.cvs-item .t { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvs-item .s { grid-column: 2; font-size: 11.5px; color: #8e8e93; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvs-none { padding: 6px 10px; color: #8e8e93; font-size: 13px; }

/* ---------- detail card: glass, follows its agent ---------- */
.cvs-card {
  position: absolute; z-index: 3; left: 0; top: 0; width: 322px; max-width: calc(100% - 24px); pointer-events: none; opacity: 0;
  transition: opacity 0.14s ease; will-change: transform;
}
.cvs-card.open { opacity: 1; pointer-events: auto; }
.cvs-card-in {
  padding: 14px 16px 12px; border-radius: 18px; color: #f5f5f7; font-size: 13px; line-height: 1.4;
  background: rgba(28, 28, 30, 0.9); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.04) inset;
  animation: cvsIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.15); transform-origin: 0 50%;
}
@keyframes cvsIn { from { opacity: 0; transform: scale(0.94) translateY(4px); } to { opacity: 1; transform: none; } }
.cvs-card-head { display: flex; align-items: center; gap: 9px; }
.cvs-card-head .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c); box-shadow: 0 0 12px var(--c); }
.cvs-card h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.cvs-card p { margin: 6px 0 0; }
.cvs-card .what { color: #a1a1a6; }
.cvs-card .state { color: #f5f5f7; font-weight: 500; }
.cvs-card .meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.cvs-card .meta span { font-size: 11.5px; color: #a1a1a6; background: rgba(255, 255, 255, 0.06); border-radius: 999px; padding: 2px 8px; }
.cvs-card .when { color: #8e8e93; font-size: 12px; }
.cvs-card .line {
  font: 11.5px/1.45 var(--mono, ui-monospace, Menlo, monospace); color: #a1a1a6; background: rgba(0, 0, 0, 0.35); border-radius: 9px; padding: 6px 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cvs-card .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cvs-btn {
  border: 0; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer;
  background: rgba(255, 255, 255, 0.09); color: #f5f5f7; transition: background 0.15s, transform 0.1s;
}
.cvs-btn:hover { background: rgba(255, 255, 255, 0.15); }
.cvs-btn:active { transform: scale(0.97); }
.cvs-btn.primary { background: #f5f5f7; color: #000; }
.cvs-btn.primary:hover { background: #fff; }
.cvs-btn.armed { background: #ff453a; color: #fff; }
.cvs-btn:disabled { opacity: 0.5; cursor: default; }
.cvs-btn:focus-visible { outline: 2px solid var(--orb-em, #10b981); outline-offset: 2px; }
.cvs-card .reroute { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.cvs-card .reroute[hidden] { display: none; }
.cvs-card .reroute label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: #8e8e93; }
.cvs-card .reroute select {
  font: inherit; font-size: 13px; color: #f5f5f7; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px; padding: 6px 8px; -webkit-appearance: none; appearance: none;
}
.cvs-card .reroute .cvs-btn { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .cvs-list { left: 10px; top: 62px; max-height: calc(100% - 250px); }
  body.canvas-on .conversation { max-height: 18vh; }
  body.canvas-on .conversation .inner { padding-top: 34px; }
  .cvs-card { width: 290px; }
}
@media (prefers-reduced-motion: reduce) {
  .cvs-card-in, .cvs-list { animation: none; }
  .cvs-orb { transition: none; }
}

/* ---------- research results: strip on the card, panel with players (results.mjs) ---------- */
.cvs-res { margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.cvs-res .res-wait { color: #8e8e93; font-size: 12px; margin: 0; }
.cvs-res .res-head { display: flex; justify-content: space-between; font-size: 11.5px; color: #a1a1a6; margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.04em; }
.cvs-res .res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.res-tile { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; border-radius: 10px; }
.res-tile .t { font-size: 11px; line-height: 1.25; color: #d1d1d6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-tile:focus-visible, .pt:focus-visible { outline: 2px solid var(--orb-em, #10b981); outline-offset: 2px; }
.res-all { all: unset; cursor: pointer; display: block; margin-top: 9px; font-size: 12.5px; font-weight: 500; color: var(--orb-em, #10b981); }
.res-all:hover { text-decoration: underline; }
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--pc) 45%, #1c1c1e), #111 70%); }
.thumb.big { border-radius: 12px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.75); letter-spacing: 0.02em; }
.thumb .play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
.thumb .chip { position: absolute; left: 5px; bottom: 5px; font-size: 9.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; color: #fff; background: color-mix(in srgb, var(--pc) 70%, #000); }
.cvs-res .thumb .chip { display: none; }
.cvs-res .thumb .play { width: 22px; height: 22px; }
.cvs-res .thumb .play svg { width: 12px; height: 12px; }

.cvs-panel { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; padding: 28px; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cvs-panel.open { display: flex; }
.cvs-panel-in {
  width: min(1080px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; padding: 18px 20px 22px; border-radius: 22px; color: #f5f5f7;
  background: rgba(24, 24, 26, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  animation: cvsIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.15); font-size: 13.5px; line-height: 1.45;
}
.cvs-panel .ph-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: -18px; margin: -18px -20px 12px; padding: 16px 20px 10px; background: inherit; border-radius: 22px 22px 0 0; z-index: 1; }
.cvs-panel .ph-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.cvs-panel .ph-head p { margin: 3px 0 0; color: #a1a1a6; font-size: 12.5px; }
.cvs-panel .ph-btns { display: flex; gap: 8px; align-items: center; flex: none; }
.cvs-panel .pclose { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #d1d1d6; background: rgba(255, 255, 255, 0.08); }
.cvs-panel .pclose:hover { background: rgba(255, 255, 255, 0.16); }
.cvs-panel .pr { display: none; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); color: #d1d1d6; }
.cvs-panel .pr.open { display: block; }
.cvs-panel .pr h4 { margin: 10px 0 4px; font-size: 13.5px; color: #f5f5f7; }
.cvs-panel .pr p { margin: 4px 0; }
.cvs-panel .pr ul, .cvs-panel .pr ol { margin: 4px 0; padding-left: 20px; }
.cvs-panel .pr code { font: 12px var(--mono, ui-monospace, Menlo, monospace); background: rgba(0, 0, 0, 0.35); padding: 0 4px; border-radius: 4px; }
.cvs-panel .pv-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.cvs-panel .pv { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: #000; }
.cvs-panel .pv iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cvs-panel .pv.r169 { aspect-ratio: 16 / 9; }
.cvs-panel .pv.r916 { aspect-ratio: 9 / 16; max-height: 72vh; width: auto; height: 72vh; max-width: 100%; margin: 0 auto; }
.cvs-panel .pv.r11 { aspect-ratio: 1; }
.cvs-panel .pv.rcard { height: min(640px, 70vh); background: #fff; }
.cvs-panel .pv.rspot { height: 152px; background: transparent; }
.cvs-panel .pv-img { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.cvs-panel .pv-img img { width: 100%; height: 100%; object-fit: contain; }
.cvs-panel .ph.big { font-size: 22px; font-weight: 700; color: #fff; padding: 40px; }
.cvs-panel .pv-info h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.cvs-panel .pv-info .by { margin: 5px 0 0; color: #a1a1a6; font-size: 12.5px; }
.cvs-panel .pv-info .note { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(16, 185, 129, 0.12); color: #d1fae5; }
.cvs-panel .pv-info .desc { margin: 10px 0 0; color: #c7c7cc; }
.cvs-panel .pv-acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.cvs-panel a.cvs-btn { text-decoration: none; }
.cvs-panel .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cvs-panel .pt { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 6px; margin: -6px; border-radius: 16px; transition: background 0.12s ease; }
.cvs-panel .pt:hover, .cvs-panel .pt.on { background: rgba(255, 255, 255, 0.06); }
.cvs-panel .pt-t { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cvs-panel .pt-s { font-size: 12px; color: #a1a1a6; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cvs-panel .pempty { color: #a1a1a6; }
@media (max-width: 720px) {
  .cvs-panel { padding: 10px; }
  .cvs-panel .pv-wrap { grid-template-columns: 1fr; }
  .cvs-panel .pv.r916 { height: 62vh; }
  .cvs-panel .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .cvs-panel-in { animation: none; } }
.thumb .ph.low { place-items: end center; padding-bottom: 8%; }
.cvs-panel .thumb .ph.low { display: none; }
