@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Oswald:wght@300;400;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --black: #0a0a09;
  --charcoal: #141412;
  --dark: #1a1a17;
  --mid: #2a2a24;
  --gold: #d4a017;
  --gold-dim: #8b6914;
  --gold-bright: #f0c040;
  --red: #8b1a1a;
  --red-bright: #c0392b;
  --bone: #c8b89a;
  --bone-dim: #7a6f5d;
  --rust: #6b3a2a;
  --green-dim: #2a3a1a;
  --text: #b0a890;
  --text-dim: #706858;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--charcoal);
}

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Noise texture */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9998;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10,10,9,0.97) 0%, rgba(10,10,9,0.85) 100%);
  border-bottom: 1px solid var(--gold-dim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 48px;
}

.nav-brand {
  font-family: 'Special Elite', monospace;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  transition: color 0.2s, background 0.2s;
  font-weight: 400;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(212,160,23,0.06);
}

/* ── MAIN CONTENT ── */
.page-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.proselyzer-container {
  max-width: 700px;
  width: 450px;
  position: absolute;
  background: #3a3a30;
  resize: both;
  overflow: hidden;
  min-width: 300px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

/* ── TITLE BAR ── */
.proselyzer-titlebar {
  background: none;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  cursor: grab;
}

.proselyzer-titlebar:active {
  cursor: grabbing;
}

.titlebar-title {
  font-family: 'Share Tech Mono', monospace;
  color: #e0e0d0;
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-weight: 700;
  padding-left: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar-buttons {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.titlebar-btn {
  width: 16px;
  height: 16px;
  background: #c0c0b0;
  border: 1px solid;
  border-top-color: #e0e0d0;
  border-left-color: #e0e0d0;
  border-bottom-color: #606050;
  border-right-color: #606050;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  line-height: 14px;
  text-align: center;
  color: #1a1a14;
  cursor: default;
}

/* ── WINDOW BODY ── */
.proselyzer-body {
  padding: 8px;
  background: var(--charcoal);
  border: 2px solid;
  border-top-color: #2a2a20;
  border-left-color: #2a2a20;
  border-bottom-color: #5a5a4a;
  border-right-color: #5a5a4a;
  margin: 3px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ── STATUS BAR (bottom) ── */
.window-statusbar {
  background: #3a3a30;
  border-top: 1px solid #5a5a4a;
  padding: 2px 8px;
  margin: 0 3px 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.statusbar-cell {
  background: var(--charcoal);
  border: 1px solid;
  border-top-color: #2a2a20;
  border-left-color: #2a2a20;
  border-bottom-color: #5a5a4a;
  border-right-color: #5a5a4a;
  padding: 1px 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.statusbar-cell:first-child {
  flex: 1;
}

/* ── ROLE SELECTION ── */
.role-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,10,9,0.95);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.role-select {
  text-align: center;
}

.role-select h2 {
  font-family: 'Special Elite', monospace;
  color: var(--gold);
  font-size: 1.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.role-select .role-sub {
  font-family: 'Share Tech Mono', monospace;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 2px;
  margin-bottom: 40px;
}

.role-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.role-btn {
  background: var(--charcoal);
  border: 2px solid var(--mid);
  border-radius: 0;
  padding: 36px 44px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  min-width: 200px;
}

.role-btn:hover {
  border-color: var(--gold-dim);
  background: rgba(212,160,23,0.06);
  box-shadow: 0 0 24px rgba(212,160,23,0.1);
}

.role-btn .role-icon {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.role-btn .role-name {
  display: block;
  font-family: 'Special Elite', monospace;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.role-btn .role-desc {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  color: var(--text-dim);
  font-size: 0.6rem;
  letter-spacing: 1px;
}

.role-btn.warden-btn:hover {
  border-color: var(--gold);
}

.role-btn.prisoner-btn:hover {
  border-color: var(--red-bright);
}

/* ── SAVED SESSIONS ── */
.saved-sessions {
  margin-top: 40px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.saved-sessions-header {
  font-family: 'Share Tech Mono', monospace;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--mid);
  padding-bottom: 6px;
}

.saved-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--charcoal);
  border: 1px solid var(--mid);
  padding: 10px 14px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.saved-session-item:hover {
  border-color: var(--gold-dim);
  background: rgba(212,160,23,0.06);
}

.saved-session-info {
  text-align: left;
}

.saved-session-name {
  font-family: 'Special Elite', monospace;
  color: var(--bone);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.saved-session-meta {
  font-family: 'Share Tech Mono', monospace;
  color: var(--text-dim);
  font-size: 0.6rem;
  letter-spacing: 1px;
  margin-top: 2px;
}

.saved-session-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.saved-session-btn {
  background: none;
  border: 1px solid var(--mid);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.saved-session-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.saved-session-btn.delete:hover {
  border-color: var(--red-bright);
  color: var(--red-bright);
}

.save-session-btn {
  background: none;
  border: 1px solid var(--mid);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.save-session-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ── STATUS BAR ── */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-bright);
  transition: background 0.3s;
  vertical-align: middle;
}

.status-dot.connected {
  background: #4a9;
  box-shadow: 0 0 6px rgba(68, 170, 153, 0.5);
}

/* ══════════════════════════════════════
   WARDEN VIEW
   ══════════════════════════════════════ */

.player-card {
  background: var(--charcoal);
  border: 1px solid var(--mid);
  border-radius: 0;
  padding: 28px 24px;
  margin-bottom: 24px;
}

.now-playing {
  font-family: 'Special Elite', monospace;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin-bottom: 4px;
  min-height: 1.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing.empty {
  color: var(--text-dim);
  font-style: italic;
}

.track-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.progress-container {
  position: relative;
  height: 6px;
  background: var(--mid);
  border-radius: 0;
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
}

.progress-container:hover { height: 10px; }

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 0;
  width: 0%;
  transition: width 0.3s linear;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.ctrl-btn {
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,160,23,0.08);
}

.ctrl-btn.play-btn {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  border-color: var(--gold-dim);
  color: var(--gold);
}

.ctrl-btn.play-btn:hover {
  background: rgba(212,160,23,0.15);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(212,160,23,0.15);
}

/* Volume (shared between views) */
.volume-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--mid);
}

.volume-icon {
  color: var(--bone-dim);
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
}

.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--mid);
  border-radius: 0;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-dim);
  cursor: pointer;
  border: none;
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-dim);
  cursor: pointer;
  border: none;
}

input[type="file"] { display: none; }

/* Beep control panel */
.beep-panel {
  background: var(--charcoal);
  border: 1px solid var(--mid);
  border-radius: 0;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.beep-panel-header {
  font-family: 'Special Elite', monospace;
  color: var(--red-bright);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.beep-panel-header .beep-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mid);
  transition: background 0.2s;
}

.beep-panel-header .beep-indicator.active {
  background: var(--red-bright);
  box-shadow: 0 0 8px rgba(192,57,43,0.6);
  animation: beep-pulse 0.5s ease-in-out infinite;
}

@keyframes beep-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.beep-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.beep-controls-row:last-child {
  margin-bottom: 0;
}

.beep-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  min-width: 60px;
  text-transform: uppercase;
}

.beep-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--mid);
  border-radius: 0;
  outline: none;
}

.beep-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red-bright);
  cursor: pointer;
  border: none;
}

.beep-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red-bright);
  cursor: pointer;
  border: none;
}

.beep-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--red-bright);
  min-width: 56px;
  text-align: right;
}

.beep-presets {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.beep-preset-btn {
  flex: 1;
  padding: 6px 0;
  background: var(--dark);
  border: 1px solid var(--mid);
  border-radius: 0;
  color: var(--bone-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.beep-preset-btn:hover {
  border-color: var(--red);
  color: var(--red-bright);
  background: rgba(192,57,43,0.06);
}

.beep-btn {
  width: 100%;
  padding: 10px;
  margin-top: 14px;
  background: var(--dark);
  border: 1px solid var(--red);
  border-radius: 0;
  color: var(--red-bright);
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.beep-btn:hover {
  background: rgba(192,57,43,0.1);
  border-color: var(--red-bright);
}

.beep-btn.active {
  background: rgba(192,57,43,0.15);
  border-color: var(--red-bright);
  color: #fff;
  box-shadow: 0 0 12px rgba(192,57,43,0.2);
}

.queue-section {
  background: var(--charcoal);
  border: 1px solid var(--mid);
  border-radius: 0;
  overflow: hidden;
}

.queue-header {
  font-family: 'Special Elite', monospace;
  color: var(--gold-dim);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-list {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
}

.queue-list:empty::after {
  content: 'NO TRACKS LOADED';
  display: block;
  padding: 24px 16px;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(42,42,36,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.queue-item:last-child { border-bottom: none; }
.queue-item:hover { background: rgba(212,160,23,0.04); }

.queue-item.active {
  background: rgba(212,160,23,0.08);
  border-left: 3px solid var(--gold-dim);
}

.queue-item .track-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 24px;
}

.queue-item .track-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item.active .track-name { color: var(--gold); }

.queue-item .track-dur {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.queue-item .remove-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 0;
  transition: all 0.2s;
}

.queue-item .remove-btn:hover {
  color: var(--red-bright);
  background: rgba(192,57,43,0.1);
}

/* ══════════════════════════════════════
   PRISONER VIEW — FM RADIO TUNER
   ══════════════════════════════════════ */

.radio-casing {
  background: linear-gradient(180deg, #1c1c18 0%, #121210 60%, #0e0e0c 100%);
  border: none;
  padding: 36px 32px 28px;
  position: relative;
  overflow: hidden;
}

#prisonerView {
  margin: -8px -8px 0;
}

.radio-casing::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,160,23,0.2), transparent);
}

.radio-beacon-light {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2a1010;
  border: 1px solid #3a1a1a;
  transition: background 0.05s, box-shadow 0.05s;
}

.radio-beacon-light.on {
  background: var(--red-bright);
  border-color: var(--red-bright);
  box-shadow: 0 0 6px rgba(192,57,43,0.8), 0 0 14px rgba(192,57,43,0.3);
}

.radio-label {
  font-family: 'Special Elite', monospace;
  color: var(--gold-dim);
  font-size: 0.65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 24px;
  opacity: 0.7;
}

/* Station display */
.radio-display {
  background: #0c0c0a;
  border: 1px solid var(--mid);
  border-radius: 0;
  padding: 20px 24px 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.radio-display::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(212,160,23,0.02) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

.radio-frequency {
  font-family: 'Share Tech Mono', monospace;
  color: var(--gold-bright);
  font-size: 2.6rem;
  text-align: center;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(212,160,23,0.3);
  transition: opacity 0.15s;
  line-height: 1.2;
}

.radio-frequency.tuning {
  opacity: 0.4;
}

.radio-station-name {
  font-family: 'Special Elite', monospace;
  color: var(--bone);
  font-size: 0.95rem;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
  min-height: 1.4em;
  transition: opacity 0.15s;
}

.radio-station-name.tuning {
  opacity: 0;
}

.radio-status-line {
  font-family: 'Share Tech Mono', monospace;
  color: var(--text-dim);
  font-size: 0.6rem;
  text-align: center;
  letter-spacing: 2px;
  margin-top: 8px;
}

/* FM dial / tuner band */
.tuner-band {
  position: relative;
  height: 48px;
  margin-bottom: 24px;
  background: #0c0c0a;
  border: 1px solid var(--mid);
  border-radius: 0;
  overflow: hidden;
  padding: 0 16px;
}

.tuner-scale {
  position: absolute;
  top: 0; left: 16px; right: 16px; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tuner-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.tuner-mark .tick {
  width: 1px;
  height: 12px;
  background: var(--bone-dim);
  opacity: 0.4;
}

.tuner-mark .freq-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.5rem;
  color: var(--bone-dim);
  opacity: 0.5;
  white-space: nowrap;
}

.tuner-mark.active .tick {
  background: var(--gold);
  opacity: 1;
  height: 16px;
  width: 2px;
}

.tuner-mark.active .freq-label {
  color: var(--gold);
  opacity: 1;
}

/* Tuner needle */
.tuner-needle {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--red-bright);
  box-shadow: 0 0 8px rgba(192,57,43,0.5);
  z-index: 10;
  transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  left: 16px;
}

.tuner-needle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(192,57,43,0.6);
}

/* Static noise overlay during tuning */
.radio-static {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.1s;
  mix-blend-mode: overlay;
}

.radio-static.active {
  opacity: 0.3;
  animation: static-flicker 0.08s steps(2) infinite;
}

@keyframes static-flicker {
  0% { background-position: 0 0; }
  50% { background-position: 37px 51px; }
  100% { background-position: -19px 73px; }
}

/* Prisoner volume (standalone, no border-top) */
.radio-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

/* EQ indicator for prisoner */
.radio-eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 24px;
  margin-bottom: 20px;
}

.radio-eq span {
  display: block;
  width: 4px;
  background: var(--gold);
  border-radius: 0;
  height: 4px;
  opacity: 0.5;
}

.radio-eq.playing span { opacity: 1; }
.radio-eq.playing span:nth-child(1) { animation: eq-bar 0.4s ease infinite; }
.radio-eq.playing span:nth-child(2) { animation: eq-bar 0.5s ease infinite 0.1s; }
.radio-eq.playing span:nth-child(3) { animation: eq-bar 0.35s ease infinite 0.2s; }
.radio-eq.playing span:nth-child(4) { animation: eq-bar 0.45s ease infinite 0.05s; }
.radio-eq.playing span:nth-child(5) { animation: eq-bar 0.38s ease infinite 0.15s; }

/* ── SNAP GUIDE ── */
.snap-guide {
  display: none;
  position: absolute;
  border: 2px dashed var(--gold);
  background: rgba(212,160,23,0.06);
  pointer-events: none;
  z-index: 8999;
  box-shadow: 0 0 12px rgba(212,160,23,0.15);
}

/* ── TASKBAR ── */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #3a3a30;
  border-top: 2px solid;
  border-top-color: #6a6a5a;
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  z-index: 9000;
}

.taskbar-start {
  background: #c0c0b0;
  border: 1px solid;
  border-top-color: #e0e0d0;
  border-left-color: #e0e0d0;
  border-bottom-color: #606050;
  border-right-color: #606050;
  padding: 2px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #1a1a14;
  cursor: default;
  height: 24px;
  display: flex;
  align-items: center;
}

.taskbar-divider {
  width: 2px;
  height: 22px;
  border-left: 1px solid #2a2a20;
  border-right: 1px solid #5a5a4a;
  margin: 0 2px;
}

.taskbar-item {
  background: #c0c0b0;
  border: 1px solid;
  border-top-color: #e0e0d0;
  border-left-color: #e0e0d0;
  border-bottom-color: #606050;
  border-right-color: #606050;
  padding: 2px 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: #1a1a14;
  cursor: pointer;
  height: 24px;
  display: flex;
  align-items: center;
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.taskbar-item.active {
  border-top-color: #606050;
  border-left-color: #606050;
  border-bottom-color: #e0e0d0;
  border-right-color: #e0e0d0;
  background: #a8a898;
}

.taskbar-item.minimized {
  border-top-color: #e0e0d0;
  border-left-color: #e0e0d0;
  border-bottom-color: #606050;
  border-right-color: #606050;
  background: #c0c0b0;
}

.taskbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.taskbar-layout-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  color: #a0a090;
  letter-spacing: 1px;
  margin-right: 2px;
}

.taskbar-layout-btn {
  background: #4a4a40;
  border: 1px solid;
  border-top-color: #6a6a5a;
  border-left-color: #6a6a5a;
  border-bottom-color: #2a2a20;
  border-right-color: #2a2a20;
  padding: 1px 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  color: #c0c0b0;
  cursor: pointer;
  height: 20px;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
  transition: background 0.15s, color 0.15s;
}

.taskbar-layout-btn:hover {
  background: #5a5a50;
  color: var(--gold);
}

.taskbar-layout-btn:active {
  border-top-color: #2a2a20;
  border-left-color: #2a2a20;
  border-bottom-color: #6a6a5a;
  border-right-color: #6a6a5a;
  background: #3a3a30;
}

.window-card.minimized {
  display: none;
}

.mobile-dots {
  display: none;
}

.taskbar-items-row {
  display: contents;
}

.proselyzer-container::-webkit-resizer,
.prisoner-container::-webkit-resizer {
  background: #5a5a4a;
}

/* ── PRISONER GENERATOR WINDOW ── */
.prisoner-container {
  max-width: none;
  width: 1380px;
  position: absolute;
  background: #3a3a30;
  resize: both;
  overflow: hidden;
  min-width: 320px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.prisoner-body {
  padding: 8px;
  background: var(--charcoal);
  border: 2px solid;
  border-top-color: #2a2a20;
  border-left-color: #2a2a20;
  border-bottom-color: #5a5a4a;
  border-right-color: #5a5a4a;
  margin: 3px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.gen-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.gen-controls label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--bone-dim);
  text-transform: uppercase;
}

.gen-select {
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  padding: 6px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a6f5d'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.gen-btn {
  background: var(--gold-dim);
  border: none;
  color: var(--black);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.gen-btn:hover {
  background: var(--gold);
}

.gen-btn-secondary {
  background: transparent;
  border: 1px solid var(--mid);
  color: var(--bone-dim);
  font-size: 0.65rem;
  padding: 6px 12px;
}

.gen-btn-secondary:hover {
  background: rgba(212,160,23,0.08);
  border-color: var(--gold-dim);
  color: var(--gold);
}

.gen-output {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.char-card {
  border: 1px solid var(--mid);
  background: rgba(20,20,18,0.85);
  padding: 0;
  position: relative;
  transition: border-color 0.2s;
  animation: cardIn 0.35s ease-out both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.char-card:hover {
  border-color: var(--gold-dim);
}

.char-card.master-collar {
  border-color: var(--red);
  box-shadow: 0 0 20px rgba(139,26,26,0.2), inset 0 0 30px rgba(139,26,26,0.05);
}

.char-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--mid);
  background: rgba(26,26,23,0.6);
}

.char-number {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--gold-dim);
  letter-spacing: 2px;
  cursor: text;
  padding: 2px 4px;
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  min-width: 60px;
}

.char-number:hover {
  border-color: var(--mid);
  color: var(--gold);
}

.char-number:focus {
  outline: none;
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,160,23,0.05);
}

.char-type-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 1px;
  padding: 2px 6px;
  border: 1px solid;
}

.char-type-tag.human {
  color: var(--bone-dim);
  border-color: var(--mid);
}

.char-type-tag.android {
  color: #5a7a3a;
  border-color: rgba(42,58,26,0.5);
  background: rgba(42,58,26,0.2);
}

.master-badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 1px;
  padding: 2px 6px;
  color: var(--red-bright);
  border: 1px solid var(--red);
  background: rgba(139,26,26,0.15);
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 rgba(192,57,43,0); }
  50% { box-shadow: 0 0 8px rgba(192,57,43,0.3); }
}

.char-body {
  padding: 10px 12px;
}

.char-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.char-stat {
  text-align: center;
  padding: 4px 2px;
  background: rgba(10,10,9,0.5);
  border: 1px solid rgba(42,42,36,0.3);
}

.char-stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.45rem;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
}

.char-stat-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  color: var(--bone);
  display: block;
  line-height: 1.3;
}

.char-saves {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.char-save {
  text-align: center;
  padding: 4px 2px;
  background: rgba(10,10,9,0.3);
  border: 1px solid rgba(42,42,36,0.2);
}

.char-save-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.45rem;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
}

.char-save-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: var(--bone-dim);
  display: block;
  line-height: 1.3;
}

.char-save-val.boosted {
  color: #5a7a3a;
}

.char-info-row {
  display: flex;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(42,42,36,0.2);
  font-size: 0.85rem;
  align-items: baseline;
}

.char-info-row:last-child {
  border-bottom: none;
}

.char-info-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  color: var(--gold-dim);
  text-transform: uppercase;
  min-width: 60px;
  flex-shrink: 0;
  padding-top: 2px;
}

.char-info-val {
  color: var(--bone);
}

.char-combat-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.char-combat-btn {
  flex: 1;
  background: var(--mid);
  border: 1px solid #3a3a30;
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  padding: 4px 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.char-combat-btn:hover {
  background: #3a3a30;
  border-color: var(--gold-dim);
  color: var(--gold);
}

.char-combat-btn.damage-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.char-combat-btn.wound-btn:hover { color: var(--red-bright); border-color: var(--red); }
.char-combat-btn.panic-btn:hover { color: #c77dff; border-color: #7b5ea7; }
.char-combat-btn.death-btn:hover { color: var(--red-bright); border-color: var(--red); background: var(--dark); }


/* ── Inventory Sections ── */
.char-inv-group {
  margin-bottom: 4px;
}

.char-inv-item {
  cursor: pointer;
  transition: color 0.15s;
}

.char-inv-item:hover .char-inv-name {
  color: var(--gold);
}

.char-inv-sub {
  color: var(--text-dim);
  font-size: 0.65rem;
}

.inv-add-btn,
.cond-add-btn,
.skill-add-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 0;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}

.inv-add-btn:hover,
.cond-add-btn:hover,
.skill-add-btn:hover {
  color: var(--gold);
}

.cd-skill-link {
  background: none;
  border: none;
  color: var(--gold);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.cd-skill-link:hover {
  color: var(--text);
}

.cd-tier-header {
  color: var(--gold);
  font-weight: bold;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-align: left;
}

.item-info-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.item-info-row {
  display: flex;
  gap: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
}

.item-info-label {
  color: var(--text-dim);
  min-width: 90px;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.5px;
  padding-top: 1px;
}

.item-info-val {
  color: var(--bone);
}

/* ── Add Item Form ── */
.add-item-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--charcoal);
}

.add-item-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-item-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 80px;
  flex-shrink: 0;
}

.add-item-input {
  flex: 1;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 6px;
  outline: none;
  min-width: 0;
}

.add-item-input:focus {
  border-color: var(--gold-dim);
}

select.add-item-input {
  cursor: pointer;
}

.char-hp-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.char-hp-block {
  text-align: center;
  padding: 4px 8px;
  background: rgba(10,10,9,0.3);
  border: 1px solid rgba(42,42,36,0.2);
  flex: 1;
}

.char-hp-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.45rem;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
}

.char-hp-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: var(--bone);
  display: block;
  line-height: 1.3;
}

.equip-remove {
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone-dim);
  font-size: 0.7rem;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s, border-color 0.2s, color 0.2s;
}

.char-equip-item:hover .equip-remove {
  opacity: 1;
}

.equip-remove:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(180,40,40,0.1);
}

.equip-input {
  cursor: text;
  min-height: 1.2em;
  min-width: 60px;
  border: 1px solid transparent;
  padding: 0 2px;
  transition: border-color 0.2s;
  color: var(--text-dim);
}

.equip-input:empty::before {
  content: attr(data-placeholder);
  color: var(--text-dim);
  opacity: 0.5;
  font-style: italic;
  font-size: 0.75rem;
}

.equip-input:hover {
  border-color: var(--mid);
}

.equip-input:focus {
  outline: none;
  border-color: var(--gold-dim);
  background: rgba(212,160,23,0.05);
  color: var(--bone);
}

.hp-editable {
  cursor: text;
  border: 1px solid transparent;
  padding: 0 2px;
  min-width: 20px;
  transition: border-color 0.2s;
}

.hp-editable:hover {
  border-color: var(--mid);
}

.hp-editable:focus {
  outline: none;
  border-color: var(--gold-dim);
  background: rgba(212,160,23,0.05);
}

.char-hp-controls {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 3px;
}

.hp-btn {
  width: 18px;
  height: 18px;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}

.hp-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,160,23,0.08);
}

/* ── CARD DIALOG (unified) ── */
.cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,5,4,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-panel {
  background: var(--charcoal);
  border: 2px solid var(--mid);
  padding: 12px 16px;
  width: calc(100% - 24px);
  max-width: 260px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--charcoal);
  font-family: 'Share Tech Mono', monospace;
}

.cd-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bone);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.cd-divider {
  height: 1px;
  background: var(--mid);
  margin: 10px 0;
}

.cd-description {
  color: var(--bone-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 4px 0;
}

.cd-search {
  width: 100%;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  padding: 6px 8px;
  outline: none;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.cd-search:focus {
  border-color: var(--gold-dim);
}

.cd-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.cd-list-item {
  background: var(--mid);
  border: 1px solid #3a3a30;
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cd-list-item:hover {
  background: #3a3a30;
  color: var(--gold);
  border-color: var(--gold-dim);
}

.cd-list-item.weapon-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 2px;
}

.cd-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cd-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cd-input {
  width: 100%;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  padding: 6px 8px;
  outline: none;
  box-sizing: border-box;
}

.cd-input:focus {
  border-color: var(--gold-dim);
}

select.cd-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23706858'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.cd-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 2px;
}

.cd-btn-save {
  font-size: 1rem;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  padding: 0;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s;
}

.cd-btn-save:hover {
  background: var(--gold);
}

.cd-btn-send {
  font-size: 1rem;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  padding: 0;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.cd-btn-send:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,160,23,0.08);
}

.cd-btn-remove {
  font-size: 1rem;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  padding: 0;
  background: var(--dark);
  border: 1px solid var(--red);
  color: var(--red-bright);
  cursor: pointer;
  transition: background 0.15s;
}

.cd-btn-remove:hover {
  background: var(--red);
  color: var(--bone);
}

.cd-btn-action {
  width: 100%;
  padding: 6px;
  background: var(--dark);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Special Elite', monospace;
  font-size: 0.85rem;
  letter-spacing: 2px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.cd-btn-action:hover {
  background: rgba(212,160,23,0.1);
  border-color: var(--gold);
}

.cd-back {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 2px;
  transition: color 0.15s;
}

.cd-back:hover {
  color: var(--bone);
}

/* ── Roll-specific (inside cd-panel) ── */
.cd-roll-value {
  font-size: 1.4rem;
  color: var(--bone);
  margin-bottom: 8px;
}

.cd-roll-skills {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}

.cd-roll-skill {
  padding: 3px 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--dark);
  border: 1px solid var(--mid);
  cursor: pointer;
  text-align: left;
  font-family: 'Share Tech Mono', monospace;
  transition: all 0.15s;
}

.cd-roll-skill:hover {
  border-color: var(--gold-dim);
  color: var(--bone);
}

.cd-roll-skill.selected {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,160,23,0.1);
}

.cd-roll-advrow {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  align-items: center;
}

.cd-roll-adv-btn {
  flex: 1;
  height: 22px;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
}

.cd-roll-adv-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.cd-roll-adv-btn.active-adv {
  border-color: #5a7a3a;
  color: #5a7a3a;
  background: rgba(90,122,58,0.1);
}

.cd-roll-adv-btn.active-dis {
  border-color: var(--red);
  color: var(--red);
  background: rgba(180,40,40,0.1);
}

.cd-roll-result {
  margin-top: 8px;
  text-align: center;
  font-size: 1.2rem;
  font-family: 'Share Tech Mono', monospace;
  min-height: 1.5em;
}

.cd-roll-result .roll-pass {
  color: #5a7a3a;
}

.cd-roll-result .roll-fail {
  color: var(--red);
}

.cd-roll-result .roll-crit {
  font-weight: bold;
  text-shadow: 0 0 6px;
}

.cd-roll-target {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 2px;
}

.char-stat.clickable,
.char-save.clickable {
  cursor: pointer;
  transition: border-color 0.15s;
}

.char-stat.clickable:hover,
.char-save.clickable:hover {
  border-color: var(--gold-dim);
}

@keyframes roster-flash {
  0% { background: rgba(212,160,23,0.3); }
  100% { background: transparent; }
}

.roster-changed {
  animation: roster-flash 1.2s ease-out;
}

@keyframes roster-card-flash {
  0% { border-color: var(--gold); }
  100% { border-color: var(--mid); }
}

.roster-card-changed {
  animation: roster-card-flash 1.2s ease-out;
}

.char-card.master-collar.roster-card-changed {
  animation: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { display: none !important; }
  .nav-links { display: none; }

  .role-overlay {
    overflow-y: auto;
    align-items: flex-start;
    padding: 20px 0;
    z-index: 9500;
    bottom: 0;
  }
  .player-card { padding: 20px 16px; }
  .ctrl-btn { width: 40px; height: 40px; font-size: 1rem; }
  .ctrl-btn.play-btn { width: 54px; height: 54px; font-size: 1.3rem; }
  .radio-casing { padding: 24px 16px 20px; }
  #prisonerView { margin: -6px -6px 0; }
  .radio-frequency { font-size: 2rem; }
  .role-buttons { flex-direction: column; align-items: center; }
  .tuner-mark .freq-label { font-size: 0.4rem; }
  .beep-panel { padding: 16px; }
  .beep-controls-row { gap: 10px; }
  .beep-label { min-width: 44px; font-size: 0.6rem; }
  .proselyzer-body { padding: 6px; }
  .titlebar-title { font-size: 0.6rem; }

  /* ── Mobile Carousel ── */
  .page-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 36px;
    overflow: hidden;
  }

  .proselyzer-container,
  .prisoner-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    resize: none !important;
    border: none !important;
    transition: transform 0.3s ease;
  }

  .proselyzer-container.mobile-hidden,
  .prisoner-container.mobile-hidden {
    transform: translateX(100vw);
    pointer-events: none;
  }

  .proselyzer-container.mobile-left,
  .prisoner-container.mobile-left {
    transform: translateX(-100vw);
    pointer-events: none;
  }

  .proselyzer-container.mobile-active,
  .prisoner-container.mobile-active {
    transform: translateX(0);
    pointer-events: auto;
  }

  .window-card.minimized {
    display: flex !important;
  }

  .proselyzer-titlebar,
  .prisoner-container .proselyzer-titlebar {
    cursor: default;
  }

  /* ── Mobile Taskbar ── */
  .taskbar {
    height: 36px;
    padding: 4px 8px;
    gap: 4px;
  }

  .taskbar-start,
  .taskbar-divider,
  .taskbar-right {
    display: none !important;
  }

  .taskbar-items-row {
    display: flex;
    width: 100%;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .taskbar-items-row::-webkit-scrollbar {
    display: none;
  }

  .taskbar-item {
    flex: 0 0 auto;
    font-size: 0.55rem;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .taskbar-item.mobile-current {
    background: var(--gold);
    color: var(--black);
    font-weight: 700;
  }

  .mobile-dots {
    display: none !important;
  }

  /* Fix gen-output for mobile */
  .gen-output {
    display: flex;
    flex-direction: column;
  }
}

/* ── ANIMATIONS ── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(68,170,153,0.3); }
  50% { box-shadow: 0 0 10px rgba(68,170,153,0.6); }
}

.status-dot.connected {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes eq-bar {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}

.eq-bars span {
  display: block;
  width: 3px;
  background: var(--gold);
  border-radius: 0;
  height: 4px;
}

.eq-bars.playing span:nth-child(1) { animation: eq-bar 0.4s ease infinite; }
.eq-bars.playing span:nth-child(2) { animation: eq-bar 0.5s ease infinite 0.1s; }
.eq-bars.playing span:nth-child(3) { animation: eq-bar 0.35s ease infinite 0.2s; }
.eq-bars.playing span:nth-child(4) { animation: eq-bar 0.45s ease infinite 0.05s; }

/* ══════════════════════════════════════
   ACTION LOG (Warden only)
   ══════════════════════════════════════ */

.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid var(--mid);
  background: rgba(10,10,9,0.4);
  flex-shrink: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.log-filters {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.log-filter-btn {
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.log-filter-btn:hover {
  border-color: var(--gold-dim);
  color: var(--bone);
}

.log-filter-btn.active {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,160,23,0.1);
}

.log-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.log-action-btn {
  background: none;
  border: 1px solid var(--mid);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.log-action-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.log-autoscroll-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.log-autoscroll-label input[type="checkbox"] {
  accent-color: var(--gold-dim);
  cursor: pointer;
}

.log-feed {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--charcoal);
}

.log-empty {
  padding: 40px 16px;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.log-entry {
  display: flex;
  gap: 8px;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(42,42,36,0.3);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  animation: log-in 0.25s ease-out;
}

.log-entry:hover {
  background: rgba(212,160,23,0.03);
}

.log-entry.filtered-out {
  display: none;
}

@keyframes log-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-time {
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 52px;
  opacity: 0.7;
}

.log-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 0.75rem;
}

.log-body {
  flex: 1;
  min-width: 0;
}

.log-actor {
  color: var(--gold);
}

.log-detail {
  color: var(--bone);
}

.log-meta {
  color: var(--text-dim);
  font-size: 0.6rem;
}

.log-entry[data-type="roll"] .log-icon { color: var(--gold-bright); }
.log-entry[data-type="hp"] .log-icon { color: var(--red-bright); }
.log-entry[data-type="equip"] .log-icon { color: var(--bone); }
.log-entry[data-type="system"] .log-icon { color: #4a9; }
.log-entry[data-type="name"] .log-icon { color: var(--gold-dim); }

.log-roll-pass { color: #5a7a3a; }
.log-roll-fail { color: var(--red-bright); }
.log-roll-crit { font-weight: bold; text-shadow: 0 0 4px; }

/* ── DICE ROLLER ── */
.dice-gear-btn {
  font-size: 0.85rem;
  transition: color 0.15s;
}

.dice-gear-btn:hover {
  color: var(--gold) !important;
}

.dice-gear-btn.active {
  color: var(--gold);
}

.dice-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--charcoal);
  position: relative;
}

.dice-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Dice Settings Panel ── */
.dice-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dice-settings-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--mid);
}

.dice-settings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dice-settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--dark);
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.dice-settings-row.enabled {
  border-color: var(--mid);
  background: var(--charcoal);
}

.dice-settings-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: var(--text-dim);
}

.dice-settings-row.enabled .dice-settings-icon {
  color: var(--text);
}

.dice-settings-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  min-width: 36px;
}

.dice-settings-row.enabled .dice-settings-name {
  color: var(--bone);
}

/* Toggle switch */
.dice-toggle-switch {
  position: relative;
  width: 32px;
  height: 16px;
  flex-shrink: 0;
}

.dice-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.dice-toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--mid);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.dice-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.dice-toggle-switch input:checked + .dice-toggle-track {
  background: var(--gold-dim);
}

.dice-toggle-switch input:checked + .dice-toggle-track::after {
  transform: translateX(16px);
  background: var(--gold-bright);
}

/* Color dots */
.dice-settings-colors {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.dice-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  padding: 0;
  background: var(--text-dim);
}

.dice-color-dot:hover {
  transform: scale(1.2);
}

.dice-color-dot.selected {
  border-color: #fff;
}

.dice-settings-done {
  padding-top: 8px;
  display: flex;
  justify-content: center;
}

.dice-results {
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 4px;
}

.dice-empty {
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
  padding: 20px 0;
}

.dice-result-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dice-result-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--bone-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bone);
  background: var(--dark);
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.dice-result-circle.rolled {
  border-color: var(--gold);
  color: var(--gold-bright);
  animation: dicePopIn 0.3s ease-out;
}

.dice-result-circle.pending {
  border-style: dashed;
  color: var(--text-dim);
  font-size: 0.7rem;
}

@keyframes dicePopIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.dice-result-type {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.dice-result-pip.private .dice-result-circle {
  border-color: var(--mid);
  color: var(--text-dim);
}

.dice-pool-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0;
}

.dice-pool-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text);
  letter-spacing: 1px;
}

.dice-pool-clear {
  background: none;
  border: 1px solid var(--mid);
  color: var(--text-dim);
  font-size: 0.85rem;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s, border-color 0.15s;
}

.dice-pool-clear:hover {
  color: var(--red-bright);
  border-color: var(--red);
}

.dice-total {
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.dice-total span {
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 1rem;
}

.dice-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dice-action-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 7px 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid;
  transition: background 0.15s, color 0.15s;
}

.dice-clear-btn {
  background: var(--mid);
  border-color: #3a3a30;
  color: var(--text);
}

.dice-clear-btn:hover {
  background: #3a3a30;
  color: var(--bone);
}

.dice-roll-btn {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--black);
}

.dice-roll-btn:hover {
  background: var(--gold);
}

.dice-roll-btn:active {
  background: var(--gold-bright);
}

.dice-toggles {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.dice-toggle-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-transform: uppercase;
}

.dice-toggle-label input[type="checkbox"] {
  accent-color: var(--gold-dim);
}

.dice-add-section {
  border-top: 1px solid var(--mid);
  padding-top: 10px;
}

.dice-add-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

.dice-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.dice-type-btn {
  background: var(--mid);
  border: 1px solid #3a3a30;
  color: var(--text);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dice-type-btn:hover {
  background: #3a3a30;
  color: var(--gold);
  border-color: var(--gold-dim);
}

.dice-type-btn:active {
  background: var(--dark);
  border-color: var(--gold);
}

.dice-type-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.dice-type-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
}

/* ── Item Edit Widgets (weapon/armor specific) ── */

.cd-circles-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin: 6px 0;
}

.cd-circle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cd-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  background: var(--dark);
  color: var(--bone);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: text;
  outline: none;
  transition: border-color 0.15s;
}

.cd-circle:focus {
  border-color: var(--gold);
}

.cd-circle-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.5rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.cd-shots-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-shots-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cd-shots-row,
.cd-damage-row {
  align-items: center;
}

.cd-damage-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 3px 0;
}

.cd-damage-d {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.2rem;
  color: var(--text-dim);
  flex-shrink: 0;
  padding: 0 2px;
}

.cd-shots-slash {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.2rem;
  color: var(--text-dim);
  flex-shrink: 0;
  padding: 0 2px;
}

.cd-blocks-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  margin: 3px 0;
}

.cd-hp-block {
  text-align: center;
  padding: 4px 8px;
  background: rgba(10,10,9,0.3);
  border: 1px solid rgba(42,42,36,0.2);
  flex: 1 1 0;
  min-width: 0;
}

.cd-hp-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.45rem;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
}

.cd-hp-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: var(--bone);
  display: block;
  line-height: 1.3;
  cursor: text;
  border: 1px solid transparent;
  padding: 0 2px;
  min-width: 20px;
  transition: border-color 0.2s;
}

.cd-hp-val:hover {
  border-color: var(--mid);
}

.cd-hp-val:focus {
  outline: none;
  border-color: var(--gold-dim);
  background: rgba(212,160,23,0.05);
}

.cd-hp-controls {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 3px;
}

.cd-hp-btn {
  width: 18px;
  height: 18px;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--bone-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}

.cd-hp-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,160,23,0.08);
}

.cd-speed-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0;
}

.cd-speed-btns {
  display: flex;
  gap: 6px;
}

.cd-speed-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  background: var(--dark);
  border: 1px solid var(--mid);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.cd-speed-btn:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}

.cd-speed-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--black);
}

