/* ROT.IT — side panels: lore, TTS, soundboard, up next, comments, modal, ADHD, mobile bar. */
.side-panel { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.mobile-panel-header { display: none; }
.card-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; scroll-margin-top: 8px; }
.card-box.flash { animation: flash 0.9s; }
.card-header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-tag { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); }
.subtle-meta { font-size: 11px; color: var(--muted); }
.power-badge, .synth-badge, .voice-badge {
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  background: rgba(255, 204, 51, 0.15); color: var(--gold); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.synth-badge { background: rgba(25, 227, 194, 0.15); color: var(--accent-2); }
.voice-badge { background: rgba(0, 196, 106, 0.15); color: var(--green); }

/* Lore */
.lore-card.pulse { animation: lorePulse 0.6s; }
.char-identity { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.char-avatar {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, rgba(0, 196, 106, 0.25), rgba(255, 45, 85, 0.25)); border: 1px solid var(--line);
}
.char-titles h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.15; }
.char-hybrid { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.35; }
.char-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.meta-item { background: var(--bg-2); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.meta-item strong { font-size: 12px; }
.stat-bars { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.stat-row { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 8px; font-size: 11px; }
.stat-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-track { height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.stat-fill { height: 100%; width: var(--w); background: linear-gradient(90deg, var(--green), var(--accent-2), var(--accent)); border-radius: 99px; animation: grow 0.8s ease-out; }
.stat-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Chant + captions */
.chant-box { background: var(--bg-2); border-radius: 12px; padding: 12px; border: 1px dashed #3b3660; }
.chant-header { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; }
.chant-title { font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.chant-text { margin: 0 0 8px; font-size: 13px; font-style: italic; line-height: 1.45; color: #e3defa; }
.tts-captions {
  min-height: 48px; padding: 8px 10px; border-radius: 8px; background: #000; font-size: 14px; font-weight: 700; line-height: 1.5; margin-bottom: 10px;
}
.caption-placeholder { color: #6f6a8f; font-weight: 500; font-size: 12px; }
.cap-word { transition: color 0.15s, background 0.15s; border-radius: 4px; padding: 0 1px; color: #77729a; }
.cap-word.said { color: #fff; }
.cap-word.active { color: #0b0a12; background: var(--gold); }
.chant-controls { display: flex; gap: 8px; }
.btn-chant { flex: 1; background: linear-gradient(135deg, var(--green), #0a8f52); border-color: transparent; color: #fff; }
body.is-chanting .btn-chant { animation: nudge 0.6s infinite; }

/* Soundboard */
.sfx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sfx-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); transition: transform 0.1s, border-color 0.2s;
}
.sfx-btn:hover { border-color: var(--accent-2); }
.sfx-btn.hit { animation: sfxHit 0.35s; }
.sfx-emoji { font-size: 22px; }
.sfx-name { font-size: 11px; font-weight: 700; }
.btn-phonk { width: 100%; border-radius: 12px; padding: 10px; }
.phonk-dot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.btn-phonk.active { background: linear-gradient(135deg, #7b2ff7, #f107a3); color: #fff; border-color: transparent; }
.btn-phonk.active .phonk-dot { background: #fff; animation: blink 0.46s infinite; }

/* Up next */
.upnext-list { display: flex; flex-direction: column; gap: 8px; }
.upnext-item {
  display: grid; grid-template-columns: 18px 72px 1fr; align-items: center; gap: 10px; text-align: left;
  padding: 6px; border-radius: 10px; background: var(--bg-2); border: 1px solid transparent; transition: border-color 0.2s, transform 0.12s;
}
.upnext-item:hover { border-color: var(--accent); transform: translateX(-2px); }
.upnext-pos { font-size: 12px; font-weight: 900; color: var(--muted); text-align: center; }
.upnext-item img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #000; }
.upnext-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upnext-text strong { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upnext-text small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Comments */
.comments-card { display: flex; flex-direction: column; min-height: 280px; }
.comments-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; max-height: 300px; margin-bottom: 10px; padding-right: 4px; }
.comment { display: flex; gap: 8px; }
.comment-avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; background: linear-gradient(135deg, var(--accent), var(--gold)); color: #111; }
.comment.mine .comment-avatar { background: linear-gradient(135deg, var(--green), var(--accent-2)); }
.comment-body { min-width: 0; }
.comment-head { display: flex; gap: 6px; align-items: baseline; }
.comment-head strong { font-size: 12px; }
.comment-head small { font-size: 10px; color: var(--muted); }
.comment-body p { margin: 2px 0 0; font-size: 13px; line-height: 1.35; word-wrap: break-word; }
.comment.mine { animation: slideIn 0.3s; }
.comment-form { display: flex; flex-direction: column; gap: 6px; }
.comment-form input { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; outline: none; font-size: 13px; }
.comment-form input:focus { border-color: var(--accent-2); }
.comment-input-row { display: flex; gap: 6px; }
.comment-input-row input { flex: 1; min-width: 0; }

/* Dual-Watch Companion YouTube Player (Family Guy / Subway Surfers / AI Slop) */
.btn-sludge.active {
  background: linear-gradient(135deg, #ffcc33, #ff6b3d);
  color: #111;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(255, 204, 51, 0.45);
}
.btn-mini { padding: 4px 10px; font-size: 11px; border-radius: 999px; }
.btn-mini.active { background: var(--green); color: #04140c; border-color: var(--green); }
.sludge-container {
  flex: 0 0 auto; height: 42%; min-height: 210px; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.sludge-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.sludge-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sludge-tab {
  flex-shrink: 0; padding: 5px 10px; font-size: 11px; font-weight: 700; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
}
.sludge-tab.active { background: var(--gold); color: #111; border-color: var(--gold); }
.sludge-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sludge-player-wrap { position: relative; flex: 1; min-height: 0; background: #000; display: flex; flex-direction: column; }
.sludge-video-slot { position: relative; flex: 1; min-height: 0; width: 100%; }
.sludge-yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sludge-caption-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 4px 10px; background: rgba(11, 10, 18, 0.9); font-size: 11px; color: var(--muted);
}
.sludge-clip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sludge-yt-link { color: var(--accent-2); font-weight: 700; text-decoration: none; flex-shrink: 0; }

/* ADHD split */
.adhd-container { flex: 0 0 auto; height: 38%; min-height: 190px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.adhd-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.adhd-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.adhd-tab { flex-shrink: 0; padding: 5px 10px; font-size: 11px; font-weight: 700; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.adhd-tab.active { background: var(--gold); color: #111; border-color: var(--gold); }
.adhd-hud { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.adhd-canvas-wrap { position: relative; flex: 1; min-height: 0; background: #000; display: flex; justify-content: center; }
#adhdCanvas { height: 100%; max-width: 100%; aspect-ratio: 460 / 240; display: block; touch-action: none; cursor: pointer; }
.adhd-hint { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10px; color: rgba(255, 255, 255, 0.7); pointer-events: none; text-shadow: 0 1px 2px #000; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(480px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; animation: modalIn 0.25s; }
.modal-header { display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-desc { color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.form-field input, .form-field select { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--text); font-weight: 500; outline: none; font-size: 14px; }
.form-field input:focus, .form-field select:focus { border-color: var(--accent-2); }
.modal-status { min-height: 20px; font-size: 13px; margin-bottom: 10px; color: var(--accent-2); }
.modal-status.error { color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .btn:disabled { opacity: 0.6; pointer-events: none; }

/* Toast */
.toast-banner {
  position: fixed; left: 50%; bottom: 26px; z-index: 120; transform: translate(-50%, 20px); opacity: 0;
  background: rgba(24, 22, 41, 0.96); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100vw - 32px); text-align: center; pointer-events: none;
}
.toast-banner.show { opacity: 1; transform: translate(-50%, 0); display: block !important; }

/* Mobile bottom bar (shown via responsive.css) */
.mobile-bottom-bar { display: none; }
