/* Webspace im Stil des Bot-Managers (gleiche Farben wie app.css) */
:root { --bg:#12151c; --panel:#1b2030; --panel2:#222a3d; --line:#2f3a54; --text:#e6e9f2; --muted:#8e99b3; --accent:#4aa3ff; --ok:#3ecf8e; --bad:#ff5d6c; --warn:#f5b84a; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
code { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 13px; }
.muted { color: var(--muted); } .accent { color: var(--accent); }
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { color: var(--text); font-weight: 700; } .topbar nav a { color: var(--muted); padding: 6px 8px; border-radius: 6px; } .topbar nav a:hover { color: var(--text); background: var(--panel2); }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-size: 24px; margin: 0 0 4px; }
.head { margin-bottom: 16px; } .head p { margin: 0 0 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tab, .chip { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: var(--panel); }
.tabs.small .tab { padding: 3px 10px; font-size: 13px; }
.tab:hover, .chip:hover { color: var(--text); border-color: var(--accent); }
.tab.on, .chip.on { background: var(--accent); border-color: var(--accent); color: #0b1220; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rank { width: 100%; border-collapse: collapse; }
.rank th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rank td { padding: 8px; border-bottom: 1px solid var(--line); }
.rank tr:last-child td { border-bottom: 0; }
.rank .num { text-align: right; } .rank .pl { width: 48px; font-variant-numeric: tabular-nums; }
.rank tr.top1 td { font-size: 17px; } .rank tr.top1 strong { color: var(--warn); }
.empty { text-align: center; padding: 20px 0; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 30px; }

/* Kopfzeile: angemeldet */
.topbar nav { display: flex; gap: 4px; flex: 1; }
.acct { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); } .acct img { width: 26px; height: 26px; border-radius: 50%; }
.btn.twitch { background: #9146ff; border-color: #9146ff; color: #fff; font-weight: 600; }
.btn { display: inline-block; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.btn:hover:not(:disabled) { border-color: var(--accent); } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b1220; font-weight: 600; }
.btn.small { padding: 3px 9px; font-size: 13px; }
.small { font-size: 13px; }

/* Stream-Place: Fläche füllt alles unter dem Kopf, Bedienung schwebt darüber */
body.full { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
main.full { flex: 1; min-height: 0; position: relative; }
.pl { position: absolute; inset: 0; }
.pl-stage { position: absolute; inset: 0; overflow: hidden; background: #0b0e14; cursor: crosshair; touch-action: none; user-select: none; }
.pl-stage.dragging { cursor: grabbing; }
.pl-stage canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; image-rendering: pixelated; image-rendering: crisp-edges; box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgba(0,0,0,.6); }
.pl-grid { position: absolute; pointer-events: none; background-image: linear-gradient(to right, rgba(0,0,0,.12) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,.12) 1px, transparent 1px); }
.pl-grid[hidden], .pl-sel[hidden], .pl-tip[hidden] { display: none; }
.pl-sel { position: absolute; box-shadow: 0 0 0 2px #000, 0 0 0 4px #fff; pointer-events: none; }
.pl-tip { position: absolute; pointer-events: none; background: rgba(15,19,27,.92); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 12px; white-space: nowrap; z-index: 3; }
.pl-info, .pl-mini, .pl-bar { position: absolute; z-index: 2; background: rgba(27,32,48,.92); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.45); backdrop-filter: blur(4px); }
.pl-info { left: 12px; top: 12px; padding: 7px 12px; font-size: 13px; max-width: calc(100% - 230px); }
.pl-closed { color: var(--warn); margin-top: 2px; }
.pl-mini { right: 12px; top: 12px; padding: 6px; line-height: 0; cursor: pointer; }
.pl-mini canvas { image-rendering: pixelated; display: block; }
.pl-mini-v { position: absolute; margin: 6px; left: 0; top: 0; border: 2px solid var(--accent); box-shadow: 0 0 0 1px #000; pointer-events: none; }
.pl-mini.all .pl-mini-v { display: none; }
.pl-bar { left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 12px; max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
.pl-zoom { display: flex; align-items: center; gap: 4px; } .pl-zoom span { min-width: 46px; text-align: center; color: var(--muted); font-size: 13px; }
.pl-pal { display: grid; grid-template-columns: repeat(8, 26px); gap: 4px; }
.pl-color { width: 26px; height: 26px; border-radius: 5px; border: 2px solid rgba(255,255,255,.15); cursor: pointer; padding: 0; }
.pl-color.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); transform: scale(1.1); }
.pl-status { min-width: 150px; font-size: 13px; line-height: 1.35; } .pl-status .muted { font-size: 12px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-act { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; } .pl-act .btn { min-width: 110px; }
@media (max-width: 760px) { .pl-mini { display: none; } .pl-info { max-width: calc(100% - 24px); } .pl-status { min-width: 0; } }
html:has(body.pl-obs), body.pl-obs { background: transparent; overflow: hidden; }
.pl-obs-wrap { display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; }
.pl-obs canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }

/* Zeitraffer */
.tl-stage { cursor: default; display: flex; align-items: center; justify-content: center; }
.tl-stage canvas { position: static; transform: none; box-shadow: none; width: 100%; height: 100%; object-fit: contain; }
.tl-bar { gap: 10px; } .tl-range { width: min(420px, 40vw); } .tl-bar select { width: auto; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.tl-obs canvas { width: 100vw; height: 100vh; object-fit: contain; display: block; }

/* Stream-Place: Moderation */
.pl-area { position: absolute; pointer-events: none; background: rgba(255,93,108,.18); outline: 2px dashed var(--bad); }
.pl-area[hidden] { display: none; }
.pl-stage.modding { cursor: cell; }
.pl-modpanel { position: absolute; z-index: 2; right: 12px; top: 200px; width: 280px; max-height: calc(100% - 300px); overflow: auto; padding: 10px 12px; background: rgba(27,32,48,.95); border: 1px solid var(--bad); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 8px; }
.pl-modpanel[hidden] { display: none; }
.pl-mod-head { display: flex; align-items: center; justify-content: space-between; }
.pl-modpanel p { margin: 0; }
.pl-mod-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-mod-list li { font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.pl-mod-list li.undone { opacity: .55; }
.pl-mod-list li .btn { align-self: flex-start; }
#pl-mod.on { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Archiv der Malflächen */
.wrap:has(.arch-grid) { max-width: 1280px; }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.arch-card { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.arch-card h3 { margin: 4px 0 0; font-size: 16px; }
.arch-card p { margin: 0; }
.arch-card .btn { align-self: flex-start; }
.arch-img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; background: #0b0e14; border-radius: 6px; border: 1px solid var(--line); }
.arch-priv { font-size: 11px; font-weight: 500; color: var(--warn); border: 1px solid var(--warn); border-radius: 8px; padding: 0 6px; vertical-align: middle; }

/* Sammelkarten */
.wrap:has(.tcw) { max-width: 1280px; }
.tc-common { --rc: #9aa4b8; } .tc-rare { --rc: #4aa3ff; } .tc-epic { --rc: #b46cff; } .tc-legendary { --rc: #f5b84a; } .tc-mythic { --rc: #ff5d6c; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tc { position: relative; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 3px solid var(--rc); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px #0006, 0 6px 18px #0006; }
.tc-legendary, .tc-mythic { box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 55%, transparent), 0 6px 18px #0006; }
.tc-mythic { background: linear-gradient(160deg, #3a1c2a, var(--panel) 60%, #1c2a3a); }
.tc-img { aspect-ratio: 1; background: #0b0e14; display: flex; align-items: center; justify-content: center; font-size: 48px; border-bottom: 2px solid var(--rc); }
.tc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.tc-rar { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--rc); display: flex; justify-content: space-between; gap: 6px; }
.tc-rar span { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.tc h3 { margin: 0; font-size: 16px; }
.tc-title { font-size: 13px; color: var(--accent); }
.tc p { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.35; }
.tc-count { position: absolute; top: 8px; right: 8px; background: #000c; color: #fff; font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--rc); }
.tc-dim { filter: grayscale(1) brightness(.45); }
.tc-act { padding: 0 10px 10px; font-size: 13px; }
.tc-act summary { cursor: pointer; color: var(--accent); margin-bottom: 6px; }
.tc-act form { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.tc-act input, .tc-act select { background: #0f131b; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 13px; }
.tc-flash { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); } .tc-flash.ok { border-color: var(--ok); color: var(--ok); } .tc-flash.err { border-color: var(--bad); color: var(--bad); }
.tc-drawn { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px 0; } .tc-drawn .tc { width: 240px; animation: tc-in .8s ease-out; }
@keyframes tc-in { from { transform: rotateY(90deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.tc-daily { margin: 6px 0 12px; }
.tc-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.tc-offer { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.tc-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; } .tc-arrow { font-size: 26px; color: var(--muted); }
.tc-offer .row { display: flex; gap: 8px; align-items: center; } .tc-offer form { margin: 0; }
.tc-hist { font-size: 13px; padding-left: 18px; } .tc-hist li { margin: 3px 0; }

/* Sammelkarten: verdeckt (nicht in der Sammlung) und deaktiviert */
.tc-hidden .tc-img { position: relative; }
.tc-blur { position: absolute; inset: -14px; background: radial-gradient(circle at 30% 35%, var(--rc), transparent 45%), radial-gradient(circle at 72% 68%, color-mix(in srgb, var(--rc) 65%, #000), transparent 55%), radial-gradient(circle at 60% 20%, color-mix(in srgb, var(--rc) 40%, #fff), transparent 35%), #12151c; opacity: .55; filter: blur(14px); }
.tc-hidden .tc-img { overflow: hidden; }
.tc-hidden .tc-img > span { position: relative; font-size: 64px; font-weight: 800; color: #fff; opacity: .5; filter: blur(1.5px); }
.tc-hidden h3 { letter-spacing: .15em; color: var(--muted); }
.tc-off { filter: grayscale(1) brightness(.55); }
.tc-off.tc-hidden .tc-hidden .tc-img { position: relative; }
.tc-blur { position: absolute; inset: -12px; background: #1a1d24; }
.tc-own { font-size: 11px; color: var(--muted); margin-top: 4px; }