/* FOMO CAT round 5 — VTUBER WORKBENCH.
   Premium minimalist, pink/black: left-justified stream stage, frosted
   floating pills with a pink outline, squircle dock stacked above the
   square facecam PiP. Inter, deep blacks, one pink accent (--pink); the
   drawer keeps the green lab chrome so the workbench still reads as the
   same tool family. */

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --bg: #050505;
  --panel: rgba(16, 16, 20, 0.55);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.16);
  --pink: #ff6eb4;
  --pink-line: rgba(255, 110, 180, 0.5);
  --pink-line-hi: rgba(255, 110, 180, 0.85);
  --pink-glow: rgba(255, 110, 180, 0.16);
  --txt: #f4f4f4;
  --dim: #9a9aa2;
  --faint: #5a5a62;
  --accent: #55f585;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --frost: blur(22px) saturate(1.5);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--txt); overflow: hidden; }

/* ---- left-justified stream stage ---- */
#stage {
  position: fixed; left: 14px; top: 14px; /* size + vertical centering set by JS */
  background: #0a0a0c; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  z-index: 1;
}
#stream { width: 100%; height: 100%; display: block; object-fit: contain; background: #0a0a0c; }
#stream-status {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #6a6a72; font-size: 12px; letter-spacing: 0.22em;
  pointer-events: none;
}
#stream-status[hidden] { display: none; }

/* ---- pills (bigger, pink outline) ---- */
.pill {
  position: fixed; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1.5px solid var(--pink-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 26px var(--pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 14px; letter-spacing: 0.02em;
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none;
  transform-origin: center; will-change: transform, opacity;
}
.pill.dragging { cursor: grabbing; border-color: var(--pink-line-hi); }
.pill.morphing { pointer-events: none; backface-visibility: hidden; }
.pill[hidden] { display: none; }

.x-logo { fill: currentColor; }
.pill-label-ico { width: 14px; height: 14px; color: var(--faint); flex: none; }
.pill:hover .pill-label-ico { color: var(--dim); }

.ico-btn {
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  color: var(--dim); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ico-btn svg { width: 14px; height: 14px; }
.ico-btn:hover { color: var(--txt); border-color: var(--pink-line); background: rgba(255, 110, 180, 0.08); }

.cta {
  display: block; text-align: center; text-decoration: none; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; border: 0; font: inherit;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; color: #22060f;
  background: linear-gradient(135deg, #ff9ccf, var(--pink));
  box-shadow: 0 6px 22px rgba(255, 110, 180, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}
.cta:hover { filter: brightness(1.07); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }

/* CA card (expanded pill = squircle) */
#pill-ca { border-radius: 20px; min-width: 316px; gap: 10px; }
#pill-ca .ca-row {
  justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 10px 9px 12px;
}
#ca-text { font-size: 11px; letter-spacing: 0.02em; text-align: left; overflow-wrap: anywhere; }

/* ---- persistent right-column cards (balance + leaderboard) ---- */
#board, #balwin {
  position: fixed; z-index: 28; width: 224px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 16px; border-radius: 20px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1.5px solid var(--pink-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 26px var(--pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none;
}
#board.dragging, #balwin.dragging { cursor: grabbing; border-color: var(--pink-line-hi); }
#balwin .pill-row { padding: 0; }
#balwin .bar { margin-top: 2px; }
.board-head { font-size: 9px; letter-spacing: 0.24em; color: var(--faint); font-weight: 700; }
#board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
#board-list li {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 550; color: var(--txt);
}
#board-list .rank {
  width: 20px; height: 20px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: var(--dim);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
}
#board-list li:first-child .rank {
  color: #22060f; background: linear-gradient(135deg, #ff9ccf, var(--pink));
  border-color: transparent; box-shadow: 0 0 12px rgba(255, 110, 180, 0.5);
}
#board-list .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.who { color: var(--txt); text-decoration: none; }
a.who:hover { color: var(--pink); }
#board-list .amt { font-variant-numeric: tabular-nums; color: var(--pink); font-weight: 700; font-size: 12px; }
#board-list .board-empty {
  min-height: 74px; /* fill the reserved 3-row geometry */
  justify-content: center; text-align: center;
  font-size: 9.5px; letter-spacing: 0.2em; font-weight: 700; color: var(--faint);
}
#bal-live { color: var(--pink); letter-spacing: 0.18em; }

/* ---- floating emote reactions (fluent 3D emoji in glass bubbles) ---- */
#emote-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.emote-bubble {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--size); height: var(--size);
  margin-left: calc(var(--size) / -2); margin-top: calc(var(--size) / -2);
  /* keyframes carry their own per-segment easing (spring pop, smooth float) */
  animation: emote-life var(--dur) linear forwards;
  will-change: transform, opacity;
}
.emote-glass {
  position: relative;
  width: 100%; height: 100%;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.05) 62%);
  border: 1px solid var(--pink-line);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.42),
    0 0 20px var(--pink-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
/* soft halo that blooms behind the emoji on the pop, then fades with it */
.emote-glass::before {
  content: ""; position: absolute; inset: -32%; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 110, 180, 0.36), transparent 68%);
  animation: emote-halo var(--dur) ease-out forwards;
}
.emote-glass img { width: 66%; height: 66%; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); }
/* pop (spring overshoot) -> settle -> hold ~2 beats -> float up & fade */
@keyframes emote-life {
  0%   { opacity: 0; transform: translateY(10px) scale(0.35); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
  14%  { opacity: 1; transform: translateY(0) scale(1.06); animation-timing-function: cubic-bezier(0.2, 0, 0.2, 1); }
  22%  { transform: translateY(0) scale(1); }
  55%  { opacity: 1; transform: translateY(-2px) scale(1); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
  100% { opacity: 0; transform: translateY(calc(-1 * var(--lift))) scale(0.94); }
}
@keyframes emote-halo {
  0%   { opacity: 0; transform: scale(0.6); }
  16%  { opacity: 1; transform: scale(1); }
  55%  { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .emote-bubble { animation: emote-fade var(--dur) ease-out forwards; }
  .emote-glass::before { animation: none; opacity: 0; }
  @keyframes emote-fade { 0% { opacity: 0; } 14% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
}

/* ---- viewer counter (bottom middle) ---- */
#viewers {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(10, 8, 14, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.22em; color: var(--faint);
  z-index: 55; user-select: none;
}
#viewers .v-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--faint);
}
#viewers.live .v-dot {
  background: var(--pink);
  box-shadow: 0 0 8px rgba(255, 110, 180, 0.85);
  animation: v-pulse 2.4s ease-in-out infinite;
}
#v-count { color: var(--txt); font-size: 11.5px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
@keyframes v-pulse { 50% { opacity: 0.4; } }
#viewers:not(.placed) { opacity: 0; transform: translateX(-50%) translateY(10px); }
#viewers { transition: opacity 0.5s ease, transform 0.5s ease; }

/* ---- donate modal ---- */
#donate-modal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(5, 5, 5, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
#donate-modal[hidden] { display: none; }
.dm-card {
  position: relative; width: min(92vw, 452px);
  display: flex; flex-direction: column; gap: 12px; padding: 24px 22px 20px;
  border-radius: 22px; background: rgba(16, 16, 20, 0.85);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1.5px solid var(--pink-line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 30px var(--pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.dm-card .pill-x { position: absolute; top: 12px; right: 12px; opacity: 1; transform: scale(1); }
.dm-logos { display: flex; gap: 12px; justify-content: center; padding-top: 2px; }
.dm-logos img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); }
.dm-head { text-align: center; }
.dm-addr-row { display: flex; align-items: center; gap: 10px; }
.dm-heart { color: var(--pink); font-size: 15px; flex: none; text-shadow: 0 0 10px rgba(255, 110, 180, 0.6); }
.dm-addr {
  display: flex; align-items: center; flex: 1; min-width: 0;
  justify-content: space-between; gap: 8px; flex-wrap: nowrap;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 9px 9px 11px;
}
#dm-addr { font-size: 10.5px; letter-spacing: 0; white-space: nowrap; text-align: left; }
.dm-input {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; color: var(--txt);
  font: inherit; font-size: 12.5px; width: 100%; outline: none;
}
.dm-input:focus { border-color: var(--pink-line-hi); }
.dm-input:disabled { opacity: 0.45; }
.dm-input::-webkit-outer-spin-button, .dm-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dm-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.dm-anon {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 11.5px; letter-spacing: 0.04em; color: #bbb;
}
.dm-anon input { accent-color: var(--pink); }
.dm-note { font-size: 10.5px; letter-spacing: 0.05em; color: #8a8a92; line-height: 1.55; }
.dm-card .pill-flash { border-radius: 22px; }

.pill-label {
  font-size: 10px; letter-spacing: 0.24em; color: var(--faint); font-weight: 700;
  translate: 0 0.5px;
}
.pill-value {
  color: var(--txt); font-weight: 550; text-decoration: none;
  background: none; border: 0; padding: 0; font: inherit; font-weight: 550;
  cursor: pointer; letter-spacing: 0.02em;
}
a.pill-value:hover { color: var(--pink); }
button.pill-value:hover { color: #fff; }
.mono { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: 0.03em; }
.pill-ico { width: 14px; height: 14px; color: var(--faint); flex: none; }
.pill:hover .pill-ico { color: var(--dim); }

.pill-flash {
  position: absolute; inset: 0; display: grid; place-items: center;
  border-radius: inherit; background: rgba(12, 10, 11, 0.84);
  color: var(--pink); font-size: 11px; letter-spacing: 0.3em; font-weight: 650;
  opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease);
}
.pill-flash.on { opacity: 1; }

.pill-x {
  position: absolute; top: -8px; right: -8px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  background: #17131a; color: var(--dim);
  border: 1px solid var(--pink-line); font-size: 12px; line-height: 1; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: scale(0.55); transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), color 0.16s, background 0.16s;
}
.pill:hover .pill-x { opacity: 1; transform: scale(1); }
.pill-x:hover { color: #fff; background: #2b2130; }

/* balance pill stacks a progress bar under the row */
.pill-stack {
  flex-direction: column; align-items: stretch; gap: 10px;
  border-radius: 20px; padding: 14px 21px 16px; min-width: 292px;
}
.pill-row { display: flex; align-items: center; gap: 12px; }
#bal-text { font-variant-numeric: tabular-nums; }
#bal-text .goal { color: var(--faint); font-weight: 500; }
.bar { position: relative; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; min-width: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #ff8cc8, var(--pink));
  box-shadow: 0 0 12px rgba(255, 110, 180, 0.8);
  transition: width 0.8s var(--ease);
}

/* ---- perpetual dock: fixed horizontal row, top right ---- */
#dock {
  position: fixed; top: 16px; right: 16px;
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  z-index: 40;
}
.dock-btn .x-logo { width: 22px; height: 22px; }
a.dock-btn { text-decoration: none; }
.dock-btn img { width: 44px; height: auto; display: block; }
.dock-btn {
  width: 64px; height: 64px; border-radius: 23px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1.5px solid var(--pink-line); color: var(--dim);
  font: inherit; font-size: 14px; letter-spacing: 0.16em; font-weight: 700;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 20px var(--pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
  animation: dock-float 5.2s ease-in-out infinite;
}
.dock-btn:nth-child(2) { animation-delay: -1.7s; }
.dock-btn:nth-child(3) { animation-delay: -3.4s; }
@keyframes dock-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}
.dock-btn:hover { color: var(--txt); border-color: var(--pink-line-hi); }
.dock-btn.pop { animation: dock-pop 0.34s var(--ease); }
@keyframes dock-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.dock-btn.fading { transform: scale(0.4); opacity: 0; pointer-events: none; }

/* ---- vtuber facecam PiP ---- */
#pip {
  position: fixed; z-index: 41; aspect-ratio: 1 / 1; /* above the hub/donate (operator 2026-08-11) */
  border-radius: 18px; overflow: hidden;
  background: #0a0a0c; border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
#pip.dragging { cursor: grabbing; border-color: var(--line-hi); }
#pip video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0a0a0c; }
#pip-note {
  position: absolute; inset: 12px; display: grid; place-items: center; text-align: center;
  border: 1px dashed #2a2a2e; border-radius: 12px;
  color: #66666e; font-size: 10px; letter-spacing: 0.16em; padding: 10px;
  pointer-events: none;
}
#pip-note[hidden] { display: none; }
#pip-hud {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  opacity: 0; transition: opacity 0.2s var(--ease);
}
#pip:hover #pip-hud { opacity: 1; }
#pip-picker { display: flex; gap: 6px; }
#pip-picker button {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 9px;
  background: rgba(20, 20, 25, 0.72); color: var(--dim);
  border: 1px solid var(--line); font: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
#pip-picker button:hover:not(:disabled) { color: var(--txt); border-color: var(--line-hi); }
#pip-picker button.active { color: var(--pink); border-color: var(--pink-line); }
#pip-picker button:disabled { opacity: 0.3; cursor: default; }
#pip-tag { color: #cfcfd6; font-size: 9px; letter-spacing: 0.18em; }
#pip-grip {
  position: absolute; left: 0; top: 0; width: 26px; height: 26px;
  cursor: nwse-resize; opacity: 0; transition: opacity 0.2s var(--ease);
}
#pip-grip::before {
  content: ""; position: absolute; left: 8px; top: 8px; width: 9px; height: 9px;
  border-left: 1.5px solid #bdbdc4; border-top: 1.5px solid #bdbdc4; border-radius: 2px 0 0 0;
}
#pip:hover #pip-grip { opacity: 0.85; }

/* directed-clips mode: dual crossfade layers under the hud chrome */
.vt-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #0a0a0c;
  opacity: 0; transition: opacity 0.12s linear; z-index: 0;
}
#pip-note, #pip-hud, #pip-grip { z-index: 2; }
#pip[data-mode="directed"] #pip-video { display: none; }
#pip[data-mode="directed"] #pip-picker { display: none; }
#soundboard { margin-top: 8px; }
#soundboard button { font-size: 8.5px; letter-spacing: 0.06em; padding: 6px 2px; }
#soundboard button:disabled { opacity: 0.3; cursor: default; }
.dw-check {
  display: flex; align-items: center; gap: 7px; margin-top: 9px;
  font-size: 11px; letter-spacing: 0.06em; color: #bbb; cursor: pointer;
}
input[type="checkbox"] { accent-color: var(--accent); }
.dw-lbl { display: block; font-size: 10px; letter-spacing: 0.1em; color: #999; margin: 10px 0 6px; }
.dw-lbl span { color: #bbb; }
.dw-delay-row { display: flex; align-items: center; gap: 8px; }
.dw-delay-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.dw-delay-row button {
  background: #131317; color: #bbb; border: 1px solid #242428; border-radius: 6px;
  font: inherit; font-size: 9px; letter-spacing: 0.12em; padding: 5px 8px; cursor: pointer;
}
.dw-delay-row button:hover { color: var(--txt); border-color: #3a3a3f; }

/* ---- drawer (lab chrome, unchanged palette) ---- */
#drawer-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 50; background: #101014; color: #999; border: 1px solid #242428;
  border-right: none; border-radius: 8px 0 0 8px; padding: 10px 7px;
  font-size: 13px; cursor: pointer;
}
#drawer-tab:hover { color: var(--txt); }
#drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 306px; z-index: 49;
  background: #0d0d10ee; border-left: 1px solid #242428;
  transform: translateX(100%); transition: transform 0.18s ease;
  overflow-y: auto; padding: 14px 16px 24px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
#drawer.open { transform: translateX(0); }
body.drawer-open #drawer-tab { right: 306px; transition: right 0.18s ease; }
.dw-header { font-size: 11px; letter-spacing: 0.18em; font-weight: 650; color: var(--txt); margin: 2px 0 6px; }
.dw-sec { border-top: 1px solid #1c1c20; margin-top: 12px; padding-top: 10px; }
.dw-sec h3 { margin: 0 0 8px; font-size: 10px; letter-spacing: 0.16em; color: #777; font-weight: 600; }
.dw-group { display: flex; flex-direction: column; gap: 5px; }
.dw-group label { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.06em; color: #bbb; cursor: pointer; }
.dw-note { font-size: 9.5px; letter-spacing: 0.05em; color: #55555c; margin-top: 8px; line-height: 1.55; }
.dw-note a { color: #8a8a92; }
.dw-wait { color: #55555c; font-size: 9px; letter-spacing: 0.08em; }
.dw-board { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dw-board button {
  background: #131317; color: #bbb; border: 1px solid #242428; border-radius: 6px;
  font: inherit; font-size: 9.5px; letter-spacing: 0.1em; padding: 7px 4px; cursor: pointer;
}
.dw-board button:hover { color: var(--txt); border-color: #3a3a3f; }
input[type="radio"] { accent-color: var(--accent); }

/* paint gating: JS-positioned elements stay invisible until their
   coordinates are set, then enter with one soft rise — no corner-jump on
   load (an app-level guarantee, carries into any production shell) */
#stage:not(.placed), .pill:not(.placed), #board:not(.placed),
#balwin:not(.placed), #pip:not(.placed) { visibility: hidden; }
.placed { animation: ui-in 0.4s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes ui-in {
  from { opacity: 0; translate: 0 6px; }
  to { opacity: 1; translate: 0 0; }
}
#board-list { min-height: 74px; } /* reserve 3 rows so geometry is stable pre-data */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- operator 2026-08-10: merged hub + tweet + donation bubbles ---------- */
.doki-face { margin-left: auto; font-size: 10.5px; color: #ff9ecb; opacity: .85; letter-spacing: 0; }
.doki-div { text-align: center; font-size: 11px; letter-spacing: 1px; color: #ff9ecb;
  opacity: .65; margin: 5px 0 4px; user-select: none;
  text-shadow: 0 0 8px rgba(255, 158, 203, .35); }
#board .board-head { display: flex; align-items: center; gap: 6px; }
#tweet-box { display: block; margin-top: 4px; padding: 8px 11px; border-radius: 10px;
  background: rgba(255, 158, 203, .07); border: 1px solid rgba(255, 158, 203, .18);
  color: #f3e6ee; font-size: 12.5px; line-height: 1.45; text-decoration: none;
  transition: border-color .18s, background .18s; }
#tweet-box:hover { border-color: rgba(255, 158, 203, .55); background: rgba(255, 158, 203, .12); }
#tweet-box.tweet-empty { color: #9a8a95; font-style: italic; }
.dm-amt-row { display: flex; gap: 8px; align-items: stretch; }
.dm-amt-row .dm-input { flex: 1; min-width: 0; }
.dm-mini { border: 1px solid rgba(255, 158, 203, .4); background: rgba(255, 158, 203, .1);
  color: #ffb9d9; border-radius: 9px; font: 600 10px/1 inherit; letter-spacing: .6px;
  padding: 0 10px; cursor: pointer; white-space: nowrap; }
.dm-mini:hover { background: rgba(255, 158, 203, .2); }
.dm-addmsg { align-self: flex-start; padding: 6px 10px; margin-top: 2px; }
.donation-bubble { display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 16px; border-radius: 16px; background: rgba(24, 14, 20, .88);
  border: 1px solid rgba(255, 158, 203, .55); box-shadow: 0 0 18px rgba(255, 158, 203, .35);
  position: absolute; opacity: 0; transform: translateY(0) scale(.85);
  transition: transform 4.6s cubic-bezier(.2, .6, .3, 1), opacity .5s; }
.donation-bubble.rise { opacity: 1; transform: translateY(-42vh) scale(1); }
.donation-bubble .don-amt { color: #ff9ecb; font-weight: 700; font-size: 15px; }
.donation-bubble .don-who { color: #fff; font-size: 12px; }
.donation-bubble .don-msg { color: #d9c3d0; font-size: 11px; font-style: italic; max-width: 220px;
  text-align: center; }

/* hub shrink + minimise (operator 2026-08-11) */
#board { width: 375px; font-size: 0.95em; padding: 9px 16px 10px; gap: 6px; }
.hub-btn { margin-left: auto; width: 20px; height: 20px; border-radius: 7px; flex: none;
  border: 1px solid rgba(255,158,203,.4); background: rgba(255,158,203,.1); color: #ffb9d9;
  font: 700 13px/1 inherit; cursor: pointer; padding: 0; }
.hub-btn:hover { background: rgba(255,158,203,.22); }
.doki-face { margin-left: 0; }
#board .board-head { gap: 6px; }
.hub-mini { display: none; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: 1px;
  color: #ffb9d9; white-space: nowrap; }
#board.min { width: auto; padding: 9px 13px; border-radius: 99px; }
#board.min > * { display: none; }
#board.min .hub-mini { display: flex; }
#board.min .hub-mini .hub-btn { margin-left: 2px; }

.doki-div { white-space: nowrap; overflow: hidden; }
.doki-face { white-space: nowrap; }

/* hub header alignment (operator 2026-08-11) */
.hub-head { flex-wrap: nowrap; white-space: nowrap; gap: 7px; }
.hub-title { flex: none; }
.hub-head .doki-face { flex: none; margin-left: 2px; font-size: 10px; opacity: .85; }
.hub-head .hub-btn { margin-left: auto; }
