/* Theme overrides loaded after the legacy and hybrid stylesheets. */

body[data-theme="midnight"] {
  --midnight-ink: #f3ebdc;
  --midnight-muted: rgba(243, 235, 220, 0.72);
  --midnight-panel: linear-gradient(
    180deg,
    rgba(45, 56, 69, 0.96),
    rgba(34, 42, 54, 0.98)
  );
  --midnight-panel-soft: linear-gradient(
    180deg,
    rgba(38, 47, 59, 0.95),
    rgba(30, 37, 48, 0.98)
  );
  --midnight-board: linear-gradient(
    180deg,
    rgba(67, 72, 80, 0.97),
    rgba(52, 57, 64, 0.98)
  );
  --midnight-header: rgba(14, 17, 22, 0.92);
  --midnight-line: rgba(255, 255, 255, 0.08);
}

body[data-theme="midnight"].mode-home {
  background:
    radial-gradient(circle at top, rgba(147, 196, 236, 0.14), transparent 30%),
    linear-gradient(180deg, #0d1620 0%, #16273b 32%, #d4c09a 32.1%, #efe6d2 100%);
}

body[data-theme="midnight"] .site-header {
  background: rgba(11, 16, 24, 0.92);
  border-bottom-color: rgba(213, 176, 111, 0.18);
}

body[data-theme="midnight"] .header-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(213, 176, 111, 0.18);
  color: rgba(243, 235, 220, 0.82);
}

body[data-theme="midnight"] .play-topbar {
  background: var(--midnight-header);
  border-bottom: 1px solid var(--midnight-line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  color: var(--midnight-ink);
}

body[data-theme="midnight"] .topbar-block {
  border-right-color: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(255, 255, 255, 0.03);
}

body[data-theme="midnight"] .topbar-block-btn,
body[data-theme="midnight"] .topbar-icon-btn {
  background-color: rgba(255, 255, 255, 0.04);
}

body[data-theme="midnight"] .topbar-block-btn:hover,
body[data-theme="midnight"] .topbar-block-btn:focus-visible,
body[data-theme="midnight"] .topbar-icon-btn:hover,
body[data-theme="midnight"] .topbar-icon-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.09);
}

body[data-theme="midnight"] .legacy-panel,
body[data-theme="midnight"] .legacy-center-board,
body[data-theme="midnight"] .legacy-modal-card,
body[data-theme="midnight"] .game-role-detail-panel {
  background: var(--midnight-panel);
  backdrop-filter: var(--glass-blur);
  border-color: var(--midnight-line);
  box-shadow: var(--glass-shadow);
  color: var(--midnight-ink);
}

body[data-theme="midnight"] .legacy-panel-burgundy,
body[data-theme="midnight"] .legacy-panel-players,
body[data-theme="midnight"] .legacy-panel-parchment,
body[data-theme="midnight"] .legacy-action-card {
  background: var(--midnight-panel-soft) !important;
  color: var(--midnight-ink);
}

body[data-theme="midnight"] .legacy-panel-header,
body[data-theme="midnight"] .legacy-panel-header-parchment,
body[data-theme="midnight"] .legacy-panel-header-players {
  background: rgba(0, 0, 0, 0.16);
  border-bottom-color: var(--midnight-line);
}

body[data-theme="midnight"] .composition-section-title,
body:not([data-theme]) .composition-section-title {
  color: rgba(255, 220, 180, 0.82);
}

body[data-theme="midnight"] .legacy-panel-header h3,
body[data-theme="midnight"] .legacy-advanced-summary,
body[data-theme="midnight"] .legacy-rules-kicker,
body[data-theme="midnight"] .hybrid-phase-kicker,
body[data-theme="midnight"] .hybrid-stage-kicker,
body[data-theme="midnight"] .hybrid-chat-head-label,
body[data-theme="midnight"] .hybrid-topbar-phase,
body[data-theme="midnight"] .hybrid-topbar-scene {
  color: var(--premium-gold);
}

body[data-theme="midnight"] .legacy-center-board {
  background: var(--midnight-board);
  border-color: rgba(214, 221, 229, 0.16);
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-center-board,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-modal-card,
body[data-theme="midnight"][data-phase-tone="night"] .game-role-detail-panel {
  background: var(--hybrid-bg-panel);
  backdrop-filter: blur(18px) saturate(120%);
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-burgundy,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-players,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-parchment,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-action-card {
  background: var(--hybrid-bg-panel-soft) !important;
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-header,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-header-parchment,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-header-players {
  background: rgba(8, 12, 18, 0.18);
}

body[data-theme="midnight"] .legacy-rules-block {
  background: linear-gradient(
    180deg,
    rgba(14, 18, 24, 0.78),
    rgba(19, 24, 31, 0.64)
  );
  color: var(--midnight-muted);
}

body[data-theme="midnight"] .legacy-channel-note,
body[data-theme="midnight"] .legacy-panel-copy-muted,
body[data-theme="midnight"] .history-text,
body[data-theme="midnight"] .history-time,
body[data-theme="midnight"] .hybrid-chat-head-note,
body[data-theme="midnight"] .hybrid-phase-subtitle,
body[data-theme="midnight"] .hybrid-stage-player-status {
  color: var(--midnight-muted);
}

body[data-theme="midnight"] .chat-messages {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
}

body[data-theme="midnight"] .legacy-chat-form {
  background: linear-gradient(
    180deg,
    rgba(53, 61, 72, 0.92),
    rgba(45, 52, 63, 0.96)
  );
  border-top-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="midnight"] .chat-bottom-actions {
  background: linear-gradient(
    180deg,
    rgba(53, 61, 72, 0.92),
    rgba(45, 52, 63, 0.96)
  );
}

body[data-theme="midnight"] .legacy-chat-icon-btn {
  border-color: rgba(255, 244, 230, 0.14);
  background: rgba(0, 0, 0, 0.14);
  color: #f6e8cf;
}

body[data-theme="midnight"] .legacy-chat-emoji-toggle,
body:not([data-theme]) .legacy-chat-emoji-toggle {
  background: rgba(255, 213, 79, 0.18);
  border: 1px solid rgba(255, 213, 79, 0.34);
  color: #ffd54f;
}

body[data-theme="midnight"] .legacy-chat-emoji-toggle:hover,
body[data-theme="midnight"] .legacy-chat-emoji-toggle.is-open,
body:not([data-theme]) .legacy-chat-emoji-toggle:hover,
body:not([data-theme]) .legacy-chat-emoji-toggle.is-open {
  background: rgba(255, 213, 79, 0.28);
  border-color: rgba(255, 213, 79, 0.52);
  color: #ffe082;
}

body[data-theme="midnight"] .legacy-chat-send,
body:not([data-theme]) .legacy-chat-send {
  background: linear-gradient(180deg, #d36d3f, #8f2f22);
  color: #fff3e8;
}

body[data-theme="midnight"] .legacy-chat-send:hover:not(:disabled),
body[data-theme="midnight"] .legacy-chat-send:focus-visible:not(:disabled),
body:not([data-theme]) .legacy-chat-send:hover:not(:disabled),
body:not([data-theme]) .legacy-chat-send:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #e38252, #a33a29);
  box-shadow: 0 4px 14px rgba(93, 22, 13, 0.35);
}

body[data-theme="midnight"] .legacy-chat-send.is-draft-locked,
body:not([data-theme]) .legacy-chat-send.is-draft-locked {
  background: linear-gradient(180deg, #745146, #4e302d);
  color: #e9d9cd;
}

body[data-theme="midnight"] .list-player-row:hover,
body[data-theme="midnight"] .list-player-row:hover .list-player-body,
body:not([data-theme]) .list-player-row:hover,
body:not([data-theme]) .list-player-row:hover .list-player-body {
  background: rgba(106, 126, 148, 0.28);
  box-shadow: 0 1px 4px rgba(16, 24, 34, 0.22);
}

body[data-theme="midnight"] .list-player-row.is-dead:hover,
body[data-theme="midnight"] .list-player-row.is-dead:hover .list-player-body,
body:not([data-theme]) .list-player-row.is-dead:hover,
body:not([data-theme]) .list-player-row.is-dead:hover .list-player-body {
  background: rgba(86, 102, 120, 0.24);
}

body[data-theme="midnight"] .list-player-row:not(.is-dead):not(.is-vote-target):not(.is-host):hover .list-player-name,
body[data-theme="midnight"] .list-player-row:not(.is-dead):not(.is-vote-target):not(.is-host) .list-player-name:hover,
body:not([data-theme]) .list-player-row:not(.is-dead):not(.is-vote-target):not(.is-host):hover .list-player-name,
body:not([data-theme]) .list-player-row:not(.is-dead):not(.is-vote-target):not(.is-host) .list-player-name:hover {
  color: #a9bfd6;
}

body[data-theme="midnight"] .legacy-pill-btn,
body[data-theme="midnight"] .legacy-action-btn,
body[data-theme="midnight"] .legacy-ghost-btn,
body[data-theme="midnight"] .legacy-submit-btn,
body[data-theme="midnight"] .legacy-launch-btn,
body[data-theme="midnight"] .legacy-adjust-btn {
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff4e8;
}

body[data-theme="midnight"] .legacy-pill-btn,
body[data-theme="midnight"] .legacy-action-btn,
body[data-theme="midnight"] .legacy-ghost-btn,
body[data-theme="midnight"] .legacy-adjust-btn {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="midnight"] .legacy-pill-btn-twitter {
  background: linear-gradient(180deg, #4aa5f8, #2a7fc9);
}

body[data-theme="midnight"] .legacy-launch-btn {
  background: linear-gradient(180deg, #c93029, #961b18);
}

body[data-theme="midnight"] .legacy-submit-btn {
  background: linear-gradient(180deg, #e0c88b, #caa15a);
  color: #3d271d;
}

body[data-theme="midnight"] .legacy-ribbon {
  color: #4d3628;
}

body[data-theme="midnight"] .history-sidebar {
  background: rgba(20, 24, 31, 0.92);
  border-right-color: var(--midnight-line);
}

body[data-theme="midnight"] .history-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: var(--midnight-line);
}

body[data-theme="midnight"] .history-day-tag {
  background: rgba(231, 221, 198, 0.94);
  color: #5f4a38;
}

body[data-theme="midnight"] .history-arrow {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--midnight-ink);
}

body[data-theme="midnight"] .history-arrow:hover,
body[data-theme="midnight"] .history-arrow:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

body[data-theme="midnight"] .chat-author {
  color: #795223;
}

body[data-theme="grey"] {
  --midnight-ink: #f4ecdb;
  --midnight-muted: rgba(244, 236, 219, 0.72);
  --midnight-panel: linear-gradient(
    180deg,
    rgba(64, 72, 83, 0.96),
    rgba(50, 57, 67, 0.98)
  );
  --midnight-panel-soft: linear-gradient(
    180deg,
    rgba(56, 64, 74, 0.95),
    rgba(45, 52, 61, 0.98)
  );
  --midnight-board: linear-gradient(
    180deg,
    rgba(74, 81, 92, 0.97),
    rgba(61, 68, 79, 0.98)
  );
  --midnight-header: rgba(11, 12, 14, 0.94);
  --midnight-line: rgba(161, 205, 232, 0.22);
}

body[data-theme="grey"].mode-home {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #101417 0%, #171c21 30%, #8fc4df 30.1%, #e7edf1 100%);
}

body[data-theme="grey"] .site-header {
  background: rgba(10, 11, 13, 0.94);
  border-bottom-color: rgba(161, 205, 232, 0.2);
}

body[data-theme="grey"] .header-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(161, 205, 232, 0.22);
  color: rgba(244, 236, 219, 0.82);
}

body[data-theme="grey"] .play-topbar {
  background: var(--midnight-header);
  border-bottom: 1px solid var(--midnight-line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  color: var(--midnight-ink);
}

body[data-theme="grey"] .topbar-block {
  border-right-color: rgba(0, 0, 0, 0.28);
  border-left-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="grey"] .topbar-block-btn,
body[data-theme="grey"] .topbar-icon-btn {
  background-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="grey"] .topbar-block-btn:hover,
body[data-theme="grey"] .topbar-block-btn:focus-visible,
body[data-theme="grey"] .topbar-icon-btn:hover,
body[data-theme="grey"] .topbar-icon-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="grey"] .legacy-panel,
body[data-theme="grey"] .legacy-center-board,
body[data-theme="grey"] .legacy-modal-card,
body[data-theme="grey"] .game-role-detail-panel {
  background: var(--midnight-panel);
  backdrop-filter: var(--glass-blur);
  border-color: var(--midnight-line);
  box-shadow: var(--glass-shadow);
  color: var(--midnight-ink);
}

body[data-theme="grey"] .legacy-panel-burgundy,
body[data-theme="grey"] .legacy-panel-players,
body[data-theme="grey"] .legacy-panel-parchment,
body[data-theme="grey"] .legacy-action-card {
  background: var(--midnight-panel-soft) !important;
  color: var(--midnight-ink);
}

body[data-theme="grey"] .legacy-panel-header,
body[data-theme="grey"] .legacy-panel-header-parchment,
body[data-theme="grey"] .legacy-panel-header-players {
  background: rgba(0, 0, 0, 0.16);
  border-bottom-color: var(--midnight-line);
}

body[data-theme="grey"] .composition-section-title {
  color: rgba(200, 220, 240, 0.88);
}

body[data-theme="grey"] .legacy-panel-header h3,
body[data-theme="grey"] .legacy-advanced-summary,
body[data-theme="grey"] .legacy-rules-kicker,
body[data-theme="grey"] .hybrid-phase-kicker,
body[data-theme="grey"] .hybrid-stage-kicker,
body[data-theme="grey"] .hybrid-chat-head-label,
body[data-theme="grey"] .hybrid-topbar-phase,
body[data-theme="grey"] .hybrid-topbar-scene {
  color: #e6c585;
}

body[data-theme="grey"] .legacy-center-board {
  background: var(--midnight-board);
  border-color: rgba(174, 210, 231, 0.24);
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel,
body[data-theme="grey"][data-phase-tone="night"] .legacy-center-board,
body[data-theme="grey"][data-phase-tone="night"] .legacy-modal-card,
body[data-theme="grey"][data-phase-tone="night"] .game-role-detail-panel {
  background: var(--hybrid-bg-panel);
  backdrop-filter: blur(18px) saturate(120%);
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-burgundy,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-players,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-parchment,
body[data-theme="grey"][data-phase-tone="night"] .legacy-action-card {
  background: var(--hybrid-bg-panel-soft) !important;
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-header,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-header-parchment,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-header-players {
  background: rgba(10, 14, 20, 0.16);
}

body[data-theme="grey"] .legacy-rules-block {
  background: linear-gradient(
    180deg,
    rgba(28, 34, 41, 0.78),
    rgba(38, 46, 55, 0.64)
  );
  color: var(--midnight-muted);
}

body[data-theme="grey"] .legacy-channel-note,
body[data-theme="grey"] .legacy-panel-copy-muted,
body[data-theme="grey"] .history-text,
body[data-theme="grey"] .history-time,
body[data-theme="grey"] .hybrid-chat-head-note,
body[data-theme="grey"] .hybrid-phase-subtitle,
body[data-theme="grey"] .hybrid-stage-player-status {
  color: var(--midnight-muted);
}

body[data-theme="grey"] .chat-messages {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
}

body[data-theme="grey"] .legacy-chat-form {
  background: linear-gradient(
    180deg,
    rgba(63, 72, 84, 0.94),
    rgba(49, 58, 69, 0.98)
  );
  border-top-color: rgba(161, 205, 232, 0.18);
}

body[data-theme="grey"] .chat-bottom-actions {
  background: linear-gradient(
    180deg,
    rgba(63, 72, 84, 0.94),
    rgba(49, 58, 69, 0.98)
  );
}

body[data-theme="grey"] .legacy-chat-icon-btn {
  border-color: rgba(244, 236, 219, 0.14);
  background: rgba(0, 0, 0, 0.12);
  color: #f6e8cf;
}

body[data-theme="grey"] .legacy-chat-emoji-toggle {
  background: rgba(255, 213, 79, 0.18);
  border: 1px solid rgba(255, 213, 79, 0.34);
  color: #ffd54f;
}

body[data-theme="grey"] .legacy-chat-emoji-toggle:hover,
body[data-theme="grey"] .legacy-chat-emoji-toggle.is-open {
  background: rgba(255, 213, 79, 0.28);
  border-color: rgba(255, 213, 79, 0.52);
  color: #ffe082;
}

body[data-theme="grey"] .legacy-chat-send {
  background: linear-gradient(180deg, #7ca0b8, #46576d);
  color: #f3f8fc;
}

body[data-theme="grey"] .legacy-chat-send:hover:not(:disabled),
body[data-theme="grey"] .legacy-chat-send:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #8cb2cb, #536980);
  box-shadow: 0 4px 14px rgba(34, 49, 64, 0.28);
}

body[data-theme="grey"] .legacy-chat-send.is-draft-locked {
  background: linear-gradient(180deg, #66717c, #454b55);
  color: #dfe6eb;
}

body[data-theme="grey"] .list-player-row:hover,
body[data-theme="grey"] .list-player-row:hover .list-player-body {
  background: rgba(140, 160, 178, 0.24);
  box-shadow: 0 1px 4px rgba(31, 42, 54, 0.18);
}

body[data-theme="grey"] .list-player-row.is-dead:hover,
body[data-theme="grey"] .list-player-row.is-dead:hover .list-player-body {
  background: rgba(119, 136, 151, 0.2);
}

body[data-theme="grey"] .list-player-row:not(.is-dead):not(.is-vote-target):not(.is-host):hover .list-player-name,
body[data-theme="grey"] .list-player-row:not(.is-dead):not(.is-vote-target):not(.is-host) .list-player-name:hover {
  color: #b8c8d7;
}

body[data-theme="grey"] .legacy-pill-btn,
body[data-theme="grey"] .legacy-action-btn,
body[data-theme="grey"] .legacy-ghost-btn,
body[data-theme="grey"] .legacy-submit-btn,
body[data-theme="grey"] .legacy-launch-btn,
body[data-theme="grey"] .legacy-adjust-btn {
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff4e8;
}

body[data-theme="grey"] .legacy-pill-btn,
body[data-theme="grey"] .legacy-action-btn,
body[data-theme="grey"] .legacy-ghost-btn,
body[data-theme="grey"] .legacy-adjust-btn {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="grey"] .legacy-pill-btn-twitter {
  background: linear-gradient(180deg, #4aa5f8, #2a7fc9);
}

body[data-theme="grey"] .legacy-launch-btn {
  background: linear-gradient(180deg, #c93029, #961b18);
}

body[data-theme="grey"] .legacy-submit-btn {
  background: linear-gradient(180deg, #e0c88b, #caa15a);
  color: #3d271d;
}

body[data-theme="grey"] .legacy-ribbon {
  color: #4d3628;
}

body[data-theme="grey"] .history-sidebar {
  background: rgba(30, 36, 44, 0.9);
  border-right-color: var(--midnight-line);
}

body[data-theme="grey"] .history-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: var(--midnight-line);
}

body[data-theme="grey"] .history-day-tag {
  background: rgba(232, 223, 201, 0.95);
  color: #5f4a38;
}

body[data-theme="grey"] .history-arrow {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--midnight-ink);
}

body[data-theme="grey"] .history-arrow:hover,
body[data-theme="grey"] .history-arrow:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

body[data-theme="grey"] .chat-author {
  color: #e6c585;
}



body[data-theme="classic"] .history-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 227, 171, 0.12);
}

body[data-theme="classic"] .play-topbar {
  background:
    linear-gradient(180deg, rgba(132, 91, 76, 0.96), rgba(103, 69, 57, 0.99)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 55%);
  border-bottom: 1px solid rgba(35, 20, 14, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  color: #f7efe2;
}







body[data-theme="classic"] .legacy-rules-block {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 240, 236, 0.78));
  color: #4b5964;
}

body[data-theme="classic"] .legacy-rules-kicker,
body[data-theme="classic"] .hybrid-phase-kicker,
body[data-theme="classic"] .hybrid-stage-kicker,
body[data-theme="classic"] .hybrid-chat-head-label {
  color: #8a6848;
}

body[data-theme="classic"] .hybrid-phase-title,
body[data-theme="classic"] .hybrid-phase-clock-value {
  color: #fff0e2;
}

body[data-theme="classic"] .hybrid-chat-head-title,
body[data-theme="classic"] .hybrid-stage-title,
body[data-theme="classic"] .hybrid-stage-player-name {
  color: #4e352b;
}

body[data-theme="classic"] .hybrid-phase-subtitle,
body[data-theme="classic"] .hybrid-topbar-meta {
  color: rgba(255, 240, 226, 0.72);
}

body[data-theme="classic"] .hybrid-chat-head-note,
body[data-theme="classic"] .hybrid-stage-player-status {
  color: #7b6555;
}

body[data-theme="classic"] .hybrid-stage-player {
  background: rgba(255, 249, 239, 0.82);
  border-color: rgba(117, 101, 88, 0.22);
  color: #4e352b;
  box-shadow: none;
}

body[data-theme="classic"] .hybrid-stage-avatar {
  background: rgba(76, 52, 43, 0.12);
  color: #8a6848;
}

body[data-theme="classic"] .hybrid-stage-votes {
  color: #8a6848;
}

body[data-theme="classic"] .legacy-launch-btn {
  background: linear-gradient(180deg, #c62c27, #9e1d1a);
  color: #fff6ea;
  border-color: rgba(0, 0, 0, 0.35);
}

body[data-theme="classic"] .legacy-submit-btn,
body[data-theme="classic"] .legacy-ready-btn {
  background: linear-gradient(180deg, #e0c88b, #d6b36e);
  color: #4c2e21;
  border-color: rgba(0, 0, 0, 0.3);
}

body[data-theme="classic"] .legacy-pill-btn,
body[data-theme="classic"] .legacy-ghost-btn,
body[data-theme="classic"] .legacy-action-btn,
body[data-theme="classic"] .legacy-adjust-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff2e4;
}

body[data-theme="classic"] .legacy-pill-btn-twitter {
  background: linear-gradient(180deg, #3f9af3, #2477be);
  border-color: rgba(0, 0, 0, 0.25);
}

body[data-theme="classic"] .legacy-chat-form {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
}

body[data-theme="classic"] .chat-messages {
  background: #fdfaf5;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

body[data-theme="classic"] .chat-message-system.tone-danger {
  border-left-color: #b4473d;
  background: rgba(180, 71, 61, 0.12);
}

body[data-theme="classic"] .chat-message-system.tone-danger .chat-system-text,
body[data-theme="classic"] .chat-message-system.tone-danger .chat-system-icon {
  color: #7a211c;
}

body[data-theme="classic"] .chat-message-system.tone-warning {
  border-left-color: #bc8432;
  background: rgba(188, 132, 50, 0.14);
}

body[data-theme="classic"] .chat-message-system.tone-warning .chat-system-text,
body[data-theme="classic"] .chat-message-system.tone-warning .chat-system-icon {
  color: #754d12;
}

body[data-theme="classic"] .chat-message-system.tone-success {
  border-left-color: #5e8c57;
  background: rgba(94, 140, 87, 0.12);
}

body[data-theme="classic"] .chat-message-system.tone-success .chat-system-text,
body[data-theme="classic"] .chat-message-system.tone-success .chat-system-icon {
  color: #325b34;
}

body[data-theme="classic"] .chat-message-system.chat-message-role-info .chat-system-text {
  color: #5a3b28;
}

body[data-theme="classic"] .chat-role-reveal {
  background: rgba(255, 247, 234, 0.92);
  border-color: rgba(151, 112, 56, 0.22);
  border-left-color: #b88b46;
  box-shadow: 0 4px 10px rgba(73, 45, 25, 0.08);
}

body[data-theme="classic"] .chat-role-reveal .chat-role-icon-small {
  filter: drop-shadow(0 1px 3px rgba(73, 45, 25, 0.18));
}

body[data-theme="classic"] .chat-role-reveal-text {
  color: #4e352b;
}

body[data-theme="classic"] .chat-role-reveal-tag {
  color: #8a5d1f;
  background: rgba(219, 183, 120, 0.24);
  border-color: rgba(151, 112, 56, 0.3);
}

body[data-theme="classic"] .chat-role-reveal.tone-danger {
  background: rgba(255, 240, 236, 0.94);
  border-color: rgba(180, 71, 61, 0.22);
  border-left-color: #b4473d;
}

body[data-theme="classic"] .chat-role-reveal.tone-danger .chat-role-reveal-text {
  color: #71211d;
}

body[data-theme="classic"] .chat-role-reveal.tone-danger .chat-role-reveal-tag {
  color: #912e27;
  background: rgba(180, 71, 61, 0.14);
  border-color: rgba(180, 71, 61, 0.24);
}

body[data-theme="classic"] .chat-role-reveal.tone-warning {
  background: rgba(255, 246, 231, 0.94);
  border-color: rgba(188, 132, 50, 0.22);
  border-left-color: #bc8432;
}

body[data-theme="classic"] .chat-role-reveal.tone-warning .chat-role-reveal-text {
  color: #6d4714;
}

body[data-theme="classic"] .chat-role-reveal.tone-warning .chat-role-reveal-tag {
  color: #8b5b15;
  background: rgba(188, 132, 50, 0.16);
  border-color: rgba(188, 132, 50, 0.24);
}

body[data-theme="classic"] .chat-role-reveal.tone-success {
  background: rgba(241, 248, 239, 0.94);
  border-color: rgba(94, 140, 87, 0.2);
  border-left-color: #5e8c57;
}

body[data-theme="classic"] .chat-role-reveal.tone-success .chat-role-reveal-text {
  color: #315033;
}

body[data-theme="classic"] .chat-role-reveal.tone-success .chat-role-reveal-tag {
  color: #3d6a40;
  background: rgba(94, 140, 87, 0.14);
  border-color: rgba(94, 140, 87, 0.24);
}

body[data-theme="classic"] .history-role-reveal {
  color: #4e352b;
}

body[data-theme="classic"] .history-role-reveal-tag {
  color: #8a5d1f;
  background: rgba(219, 183, 120, 0.22);
  border-color: rgba(151, 112, 56, 0.28);
}

body[data-theme="classic"] .history-role-info .history-detail-line {
  color: #5a3b28;
}

body[data-theme="classic"] .chat-bottom-actions {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body[data-theme="classic"] .legacy-chat-icon-btn {
  border: 1px solid rgba(91, 67, 57, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f7efe2;
}

body[data-theme="classic"] .legacy-chat-emoji-toggle {
  background: linear-gradient(180deg, rgba(255, 226, 121, 0.95), rgba(243, 191, 78, 0.95));
  border: 1px solid rgba(133, 92, 22, 0.28);
  color: #6c4307;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 211, 0.86),
    0 2px 8px rgba(78, 52, 34, 0.16);
}

body[data-theme="classic"] .legacy-chat-emoji-toggle:hover,
body[data-theme="classic"] .legacy-chat-emoji-toggle.is-open {
  background: linear-gradient(180deg, rgba(255, 234, 148, 0.98), rgba(247, 203, 92, 0.98));
  border-color: rgba(133, 92, 22, 0.4);
  color: #5f3906;
}

body[data-theme="classic"] .chat-emoji-picker {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(241, 232, 218, 0.99));
  border-color: rgba(120, 90, 60, 0.2);
  box-shadow:
    0 18px 42px rgba(66, 43, 28, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-theme="classic"] .chat-emoji-btn {
  background: rgba(121, 82, 69, 0.18);
}

body[data-theme="classic"] .chat-emoji-btn:hover,
body[data-theme="classic"] .chat-emoji-btn:focus-visible {
  background: rgba(121, 82, 69, 0.32);
  box-shadow: inset 0 0 0 1px rgba(121, 82, 69, 0.4);
}

body[data-theme="classic"] .legacy-chat-send {
  background: linear-gradient(180deg, #c74835, #8c231d);
  color: #fff4e8;
}

body[data-theme="classic"] .legacy-chat-send:hover:not(:disabled),
body[data-theme="classic"] .legacy-chat-send:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #d95a42, #a52d21);
  box-shadow: 0 4px 14px rgba(86, 26, 20, 0.24);
}

body[data-theme="classic"] .legacy-chat-send.is-draft-locked {
  background: linear-gradient(180deg, #9f7f68, #745b48);
  border-color: rgba(116, 91, 72, 0.28);
  color: #f3e3d1;
}

body[data-theme="classic"] .hybrid-phase-masthead {
  padding: 14px 18px;
  border: 1px solid rgba(96, 54, 43, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(127, 33, 29, 0.96), rgba(99, 24, 22, 0.98)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(63, 24, 19, 0.18);
}

body[data-theme="classic"] .hybrid-phase-kicker {
  color: #d7b26f;
}

body[data-theme="classic"] .hybrid-phase-title {
  color: #fff3e7;
  letter-spacing: 0.01em;
}

body[data-theme="classic"] .hybrid-phase-subtitle {
  color: rgba(255, 240, 226, 0.82);
}

body[data-theme="classic"] .hybrid-phase-clock {
  min-width: 118px;
  padding: 10px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(89, 28, 24, 0.95), rgba(67, 20, 18, 0.98));
  border: 1px solid rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="classic"] .hybrid-phase-clock-label {
  color: rgba(242, 211, 140, 0.82);
}

body[data-theme="classic"] .hybrid-phase-clock-value {
  color: #f7dfae;
}

body[data-theme="classic"] .hybrid-chat-head {
  margin: 0;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(173, 171, 165, 0.45);
  background: #f5f1ea;
  position: relative;
  z-index: 1;
}

body[data-theme="classic"] .chat-toolbar {
  position: relative;
  z-index: 1;
}

body[data-theme="classic"] .hybrid-chat-head-main {
  display: grid;
  gap: 2px;
}

body[data-theme="classic"] .hybrid-chat-head-label {
  color: #8a6848;
}

body[data-theme="classic"] .hybrid-chat-head-title {
  color: #4e352b;
  font-size: 1.15rem;
}

body[data-theme="classic"] .hybrid-chat-head-note {
  color: #7b6555;
  font-size: 0.86rem;
}

body[data-theme="classic"] .chat-toolbar {
  margin: 0;
  padding: 8px 14px 10px;
  background: #f5f1ea;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body[data-theme="classic"] .chat-tab {
  border-radius: 4px;
  padding: 5px 12px;
  background: #fdfaf5;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #6c4b3d;
}

body[data-theme="classic"] .chat-tab:hover,
body[data-theme="classic"] .chat-tab:focus-visible {
  background: #ffffff;
  color: #58392d;
}

body[data-theme="classic"] .chat-tab.is-active {
  background: #c53029;
  border-color: #9e1d1a;
  color: #fff4e8;
}

body[data-theme="classic"] .hybrid-stage-shell {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fdfaf5;
}

body[data-theme="classic"] .hybrid-stage-head {
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(173, 171, 165, 0.34);
}

body[data-theme="classic"] .hybrid-stage-kicker {
  color: #8a6848;
}

body[data-theme="classic"] .hybrid-stage-title {
  color: #5a3d31;
  font-size: 1.12rem;
}

body[data-theme="classic"] .hybrid-stage-board {
  gap: 8px;
}

body[data-theme="classic"] .hybrid-stage-player {
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(241, 232, 216, 0.98));
  border: 1px solid rgba(124, 98, 77, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body[data-theme="classic"] .hybrid-stage-player.is-targetable:not(:disabled):hover,
body[data-theme="classic"] .hybrid-stage-player.is-targetable:not(:disabled):focus-visible {
  background: linear-gradient(180deg, rgba(255, 249, 239, 1), rgba(246, 236, 218, 1));
  border-color: rgba(193, 149, 70, 0.46);
  box-shadow: 0 4px 10px rgba(102, 74, 49, 0.12);
}

body[data-theme="classic"] .hybrid-stage-player.is-focus {
  border-color: rgba(165, 45, 36, 0.44);
  box-shadow: 0 0 0 1px rgba(165, 45, 36, 0.16);
}

body[data-theme="classic"] .hybrid-stage-avatar {
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(112, 77, 63, 0.14), rgba(89, 59, 48, 0.18));
  border: 1px solid rgba(124, 98, 77, 0.18);
}

body[data-theme="classic"] .hybrid-stage-badge {
  background: rgba(120, 82, 67, 0.1);
  color: #6c4b3d;
}

body[data-theme="classic"] .hybrid-stage-badge.tone-highlight {
  background: rgba(214, 179, 106, 0.22);
  color: #7a582f;
}

body[data-theme="classic"] .hybrid-stage-badge.tone-success {
  background: rgba(125, 207, 145, 0.18);
  color: #396347;
}

body[data-theme="classic"] .hybrid-stage-badge.tone-danger {
  background: rgba(198, 44, 39, 0.16);
  color: #8f2622;
}

body[data-theme="classic"] .hybrid-role-meta {
  background: linear-gradient(180deg, rgba(246, 238, 226, 0.94), rgba(239, 229, 212, 0.94));
  border: 1px solid rgba(124, 98, 77, 0.18);
  border-radius: 10px;
}

body[data-theme="classic"] .hybrid-role-meta-label {
  color: #8a6848;
}

body[data-theme="classic"] .hybrid-role-team,
body[data-theme="classic"] .hybrid-role-win,
body[data-theme="classic"] .hybrid-role-power-summary,
body[data-theme="classic"] .hybrid-role-reminder-text {
  color: #4e352b;
}

/* ═══════════════════════════════════════════════
   MIDNIGHT THEME — Style Wolfy (dark purple-navy)
   ═══════════════════════════════════════════════ */

body[data-theme="midnight"] .legacy-panel,
body[data-theme="midnight"] .legacy-panel-burgundy,
body[data-theme="midnight"] .legacy-panel-players,
body:not([data-theme]) .legacy-panel,
body:not([data-theme]) .legacy-panel-burgundy {
  background: linear-gradient(180deg, rgba(22, 24, 46, 0.96), rgba(16, 18, 36, 0.98)) !important;
  border-color: rgba(120, 100, 220, 0.14) !important;
  color: #d8d4f0;
}

body[data-theme="midnight"] .legacy-panel-parchment,
body:not([data-theme]) .legacy-panel-parchment {
  background: linear-gradient(180deg, rgba(30, 32, 58, 0.97), rgba(22, 24, 46, 0.99)) !important;
  border-color: rgba(120, 100, 220, 0.18) !important;
  color: #d8d4f0;
}

body[data-theme="midnight"] .legacy-center-board,
body:not([data-theme]) .legacy-center-board {
  background: linear-gradient(180deg, rgba(34, 37, 64, 0.98), rgba(26, 28, 52, 0.99)) !important;
  border-color: rgba(140, 120, 230, 0.2) !important;
  color: #d8d4f0;
}

/* Chat text in midnight */
body[data-theme="midnight"] .chat-author {
  color: #a89ee0;
}
body[data-theme="midnight"] .chat-text,
body[data-theme="midnight"] .chat-system-text {
  color: #c8c4e4;
}
body[data-theme="midnight"] .chat-time,
body[data-theme="midnight"] .chat-vote-time {
  color: rgba(168, 158, 224, 0.55);
}
body[data-theme="midnight"] .chat-message-wolves .chat-author {
  color: #ff7c7c;
}

/* Phase separators → pill violet Wolfy */
body[data-theme="midnight"] .chat-phase-separator,
body:not([data-theme]) .chat-phase-separator {
  background: linear-gradient(90deg, #2c1e6a, #3a2880);
  color: #c8baff;
  border: none;
  border-radius: 20px;
  margin: 4px 18px;
  align-self: center;
  width: auto;
  padding: 6px 18px;
}

/* Elimination → contextual card (midnight) */
body[data-theme="midnight"] .chat-elimination,
body:not([data-theme]) .chat-elimination {
  margin: 6px 10px;
}

/* System messages danger → red pill */
body[data-theme="midnight"] .chat-message-system.is-danger,
body:not([data-theme]) .chat-message-system.is-danger {
  background: rgba(100, 18, 22, 0.6);
  border-radius: 8px;
  color: #ffaaaa;
  margin: 2px 10px;
  font-style: normal;
  font-weight: 600;
}

/* Night banner midnight adjustments */
body[data-theme="midnight"] .legacy-chat-form,
body:not([data-theme]) .legacy-chat-form {
  background: rgba(14, 15, 30, 0.95);
  border-top-color: rgba(120, 100, 220, 0.18);
}
body[data-theme="midnight"] .legacy-chat-input,
body:not([data-theme]) .legacy-chat-input {
  color: #d8d4f0;
}
body[data-theme="midnight"] .legacy-chat-input::placeholder {
  color: rgba(168, 158, 224, 0.45);
}

/* ═══════════════════════════════════════════════
   CLASSIC THEME — Style LGEL (sombre, bordeaux/bois)
   ═══════════════════════════════════════════════ */

/* Grey theme — old grey-blue Midnight */
body[data-theme="grey"] .legacy-panel,
body[data-theme="grey"] .legacy-panel-burgundy,
body[data-theme="grey"] .legacy-panel-players {
  background: linear-gradient(180deg, rgba(54, 62, 72, 0.96), rgba(41, 48, 58, 0.98)) !important;
  border-color: rgba(159, 206, 234, 0.22) !important;
  color: #f2ede3;
}

body[data-theme="grey"] .legacy-panel-parchment {
  background: linear-gradient(180deg, rgba(64, 73, 84, 0.97), rgba(50, 58, 68, 0.99)) !important;
  border-color: rgba(159, 206, 234, 0.24) !important;
  color: #f2ede3;
}

body[data-theme="grey"] .legacy-center-board {
  background: linear-gradient(180deg, rgba(72, 79, 90, 0.98), rgba(58, 65, 75, 0.99)) !important;
  border-color: rgba(159, 206, 234, 0.28) !important;
  color: #f2ede3;
}

body[data-theme="grey"] .chat-author {
  color: #e6c585;
}

body[data-theme="grey"] .chat-text,
body[data-theme="grey"] .chat-system-text {
  color: #f0ece4;
}

body[data-theme="grey"] .chat-time,
body[data-theme="grey"] .chat-vote-time {
  color: rgba(230, 220, 197, 0.72);
}

body[data-theme="grey"] .chat-message-dead .chat-text {
  opacity: 1;
}

body[data-theme="grey"] .chat-message-wolves .chat-author {
  color: #ff8a7f;
}

body[data-theme="grey"] .chat-phase-separator {
  background: linear-gradient(90deg, #4a5a6c, #55667b);
  color: #f3ebda;
  border: none;
  border-radius: 20px;
  margin: 4px 18px;
  align-self: center;
  width: auto;
  padding: 6px 18px;
}

/* Elimination → contextual card (grey) */
body[data-theme="grey"] .chat-elimination {
  margin: 6px 10px;
}

body[data-theme="grey"] .chat-message-system.is-danger {
  background: rgba(110, 26, 30, 0.62);
  border-radius: 8px;
  color: #ffb0b0;
  margin: 2px 10px;
  font-style: normal;
  font-weight: 600;
}

body[data-theme="grey"] .legacy-chat-form {
  background: rgba(41, 48, 58, 0.95);
  border-top-color: rgba(159, 206, 234, 0.22);
}

body[data-theme="grey"] .legacy-chat-input {
  color: #f2ede3;
}

body[data-theme="grey"] .legacy-chat-input::placeholder {
  color: rgba(230, 220, 197, 0.48);
}

body[data-theme="classic"] .legacy-panel,
body[data-theme="classic"] .legacy-panel-burgundy {
  background:
    linear-gradient(180deg, rgba(113, 24, 25, 0.96), rgba(88, 21, 20, 0.98)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 48%) !important;
  border-color: rgba(255, 227, 171, 0.3) !important;
  color: #fff0e2 !important;
}



/* Chat text in classic — LGEL uses #eee bg with #000 text */
body[data-theme="classic"] .chat-author {
  color: #67100c;
  font-weight: 700;
}
body[data-theme="classic"] .chat-text,
body[data-theme="classic"] .chat-system-text {
  color: #000;
}
body[data-theme="classic"] .chat-mention-picker {
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(241, 232, 218, 0.99));
  border-color: rgba(120, 90, 60, 0.2);
  box-shadow:
    0 18px 42px rgba(66, 43, 28, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
body[data-theme="classic"] .chat-mention-option {
  background: rgba(120, 90, 60, 0.05);
  color: #362116;
}
body[data-theme="classic"] .chat-mention-option:hover,
body[data-theme="classic"] .chat-mention-option:focus-visible,
body[data-theme="classic"] .chat-mention-option.is-selected {
  background: rgba(219, 183, 120, 0.22);
}
body[data-theme="classic"] .chat-mention-option-at {
  color: #8a5d1f;
}
body[data-theme="classic"] .chat-mention {
  background: rgba(219, 183, 120, 0.24);
  color: #7b4f12;
  border-color: rgba(151, 112, 56, 0.22);
}
body[data-theme="classic"] .chat-mention.is-targeted {
  background: rgba(180, 71, 61, 0.16);
  color: #8d2e26;
  border-color: rgba(180, 71, 61, 0.24);
}
body[data-theme="classic"] .chat-time,
body[data-theme="classic"] .chat-vote-time {
  color: #a08060;
}
body[data-theme="classic"] .chat-message-system {
  color: #6b5038;
}
body[data-theme="classic"] .chat-message-wolves .chat-author {
  color: #8b1c1c;
}
body[data-theme="classic"] .chat-message-dead .chat-author,
body[data-theme="classic"] .chat-message-dead .chat-text {
  color: #5e4f42;
}

/* Phase separator classic → trait horizontal discret */
body[data-theme="classic"] .chat-phase-separator {
  background: transparent;
  color: #7a5c3e;
  border-top: 1px solid rgba(120, 90, 60, 0.2);
  border-bottom: 1px solid rgba(120, 90, 60, 0.2);
  border-radius: 0;
  margin: 4px 0;
  width: 100%;
  align-self: stretch;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

/* Elimination classic → contextual card */
body[data-theme="classic"] .chat-elimination {
  margin: 6px 10px;
}

/* Vote cast classic */
body[data-theme="classic"] .chat-vote-cast {
  color: #7a5c3e;
  border-left-color: rgba(120, 90, 60, 0.3);
  background: transparent;
}
body[data-theme="classic"] .chat-vote-text {
  color: #3a2410;
}

/* Input classique */
body[data-theme="classic"] .legacy-chat-input {
  color: #2e2016;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(244, 235, 222, 0.98)) !important;
  border: 1px solid rgba(120, 90, 60, 0.26) !important;
  border-radius: 7px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(79, 55, 38, 0.08) !important;
  padding: 0 12px !important;
}
body[data-theme="classic"] .legacy-chat-input::placeholder {
  color: #a08060;
}
body[data-theme="classic"] .legacy-chat-input:focus {
  border-color: rgba(158, 92, 49, 0.46) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 2px rgba(217, 181, 121, 0.22),
    0 2px 6px rgba(79, 55, 38, 0.12) !important;
}
body[data-theme="classic"] .legacy-chat-icon-btn {
  color: #7a5c3e;
  border-color: rgba(120, 90, 60, 0.2);
  background: transparent;
}

/* Boutons fin de partie dans le chat (fond clair) */
body[data-theme="classic"] .chat-bottom-actions .legacy-ghost-btn {
  background: linear-gradient(180deg, #c62c27, #9e1d1a);
  color: #fff6ea;
  border: 1px solid rgba(0, 0, 0, 0.3);
  font-weight: 600;
}
body[data-theme="classic"] .chat-bottom-actions .legacy-ghost-btn:hover {
  background: linear-gradient(180deg, #d43330, #b22220);
}

/* Panel header classic sombre */
body[data-theme="classic"] .legacy-panel-header {
  background: rgba(0, 0, 0, 0.18) !important;
  border-bottom-color: rgba(255, 227, 171, 0.18) !important;
}
body[data-theme="classic"] .legacy-panel-header-parchment {
  background: rgba(0, 0, 0, 0.12) !important;
  border-bottom-color: rgba(94, 23, 23, 0.2) !important;
}
body[data-theme="classic"] .legacy-panel-header-parchment h3 {
  color: #5e1717 !important;
}
body[data-theme="classic"] .legacy-panel-header-players {
  background: rgba(60, 38, 30, 0.72) !important;
  border-bottom-color: rgba(180, 140, 100, 0.22) !important;
}
body[data-theme="classic"] .legacy-panel-header h3 {
  color: #f2d38c !important;
}
body[data-theme="classic"] .legacy-panel-header-players h3 {
  color: #f2d38c !important;
}

/* Player list text on dark background */
body[data-theme="classic"] .list-player-name {
  color: #fff0e2 !important;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}
body[data-theme="classic"] .list-player-row:hover {
  background: rgba(255, 255, 255, 0.1);
}
body[data-theme="classic"] .list-player-row.is-dead .list-player-name {
  color: rgba(255, 240, 226, 0.4) !important;
}
body[data-theme="classic"] .list-player-row.is-vote-target .list-player-name {
  color: #ef3a3a !important;
}

/* Night banner classic adapté */
body[data-theme="classic"] .chat-message-banner.chat-banner-night p {
  color: #d4c88a;
}
body[data-theme="classic"] .chat-message-banner.chat-banner-day p {
  color: #3a6628;
  background: rgba(255, 255, 255, 0.88);
}

/* Victory banner classic adapté — p et boutons lisibles sur fond image */
body[data-theme="classic"] .chat-message-banner[class*="chat-banner-victory"] p {
  background: rgba(18, 10, 4, 0.90);
  color: #fffce8;
}
body[data-theme="classic"] .chat-message-banner[class*="chat-banner-victory"] .chat-inline-name {
  color: #fffce8;
}
body[data-theme="classic"] .chat-victory-endgame-label {
  background: rgba(0, 0, 0, 0.60);
  color: rgba(255, 255, 255, 0.92);
}
body[data-theme="classic"] .chat-victory-btn-reset {
  background: rgba(40, 28, 10, 0.85);
  color: #fff;
  border-color: rgba(200, 160, 80, 0.55);
}
body[data-theme="classic"] .chat-victory-btn-next {
  background: linear-gradient(180deg, rgba(212, 165, 60, 0.97), rgba(184, 134, 46, 0.97));
  color: #1a1000;
}

/* Night translucency should affect the chat shell, not every panel. */
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel:not(.legacy-center-board),
body:not([data-theme])[data-phase-tone="night"] .legacy-panel:not(.legacy-center-board),
body[data-theme="midnight"][data-phase-tone="night"] .legacy-modal-card,
body:not([data-theme])[data-phase-tone="night"] .legacy-modal-card,
body[data-theme="midnight"][data-phase-tone="night"] .game-role-detail-panel,
body:not([data-theme])[data-phase-tone="night"] .game-role-detail-panel {
  background: linear-gradient(180deg, rgba(22, 24, 46, 0.96), rgba(16, 18, 36, 0.98)) !important;
  backdrop-filter: var(--glass-blur);
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-burgundy,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-players,
body:not([data-theme])[data-phase-tone="night"] .legacy-panel-burgundy,
body:not([data-theme])[data-phase-tone="night"] .legacy-panel-players,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-action-card,
body:not([data-theme])[data-phase-tone="night"] .legacy-action-card {
  background: linear-gradient(180deg, rgba(22, 24, 46, 0.96), rgba(16, 18, 36, 0.98)) !important;
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-parchment,
body:not([data-theme])[data-phase-tone="night"] .legacy-panel-parchment {
  background: linear-gradient(180deg, rgba(30, 32, 58, 0.97), rgba(22, 24, 46, 0.99)) !important;
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-header,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-header-parchment,
body[data-theme="midnight"][data-phase-tone="night"] .legacy-panel-header-players,
body:not([data-theme])[data-phase-tone="night"] .legacy-panel-header,
body:not([data-theme])[data-phase-tone="night"] .legacy-panel-header-parchment,
body:not([data-theme])[data-phase-tone="night"] .legacy-panel-header-players {
  background: rgba(0, 0, 0, 0.16) !important;
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-center-board,
body:not([data-theme])[data-phase-tone="night"] .legacy-center-board {
  background: linear-gradient(180deg, rgba(34, 37, 64, 0.8), rgba(26, 28, 52, 0.84)) !important;
  backdrop-filter: blur(18px) saturate(120%);
}

body[data-theme="midnight"][data-phase-tone="night"] .legacy-chat-form,
body[data-theme="midnight"][data-phase-tone="night"] .chat-bottom-actions,
body:not([data-theme])[data-phase-tone="night"] .legacy-chat-form,
body:not([data-theme])[data-phase-tone="night"] .chat-bottom-actions {
  background: linear-gradient(180deg, rgba(14, 15, 30, 0.82), rgba(11, 13, 26, 0.88)) !important;
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel:not(.legacy-center-board),
body[data-theme="grey"][data-phase-tone="night"] .legacy-modal-card,
body[data-theme="grey"][data-phase-tone="night"] .game-role-detail-panel {
  background: linear-gradient(180deg, rgba(54, 62, 72, 0.96), rgba(41, 48, 58, 0.98)) !important;
  backdrop-filter: var(--glass-blur);
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-burgundy,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-players,
body[data-theme="grey"][data-phase-tone="night"] .legacy-action-card {
  background: linear-gradient(180deg, rgba(54, 62, 72, 0.96), rgba(41, 48, 58, 0.98)) !important;
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-parchment {
  background: linear-gradient(180deg, rgba(64, 73, 84, 0.97), rgba(50, 58, 68, 0.99)) !important;
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-header,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-header-parchment,
body[data-theme="grey"][data-phase-tone="night"] .legacy-panel-header-players {
  background: rgba(0, 0, 0, 0.16) !important;
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-center-board {
  background: linear-gradient(180deg, rgba(72, 79, 90, 0.8), rgba(58, 65, 75, 0.84)) !important;
  backdrop-filter: blur(18px) saturate(120%);
}

body[data-theme="grey"][data-phase-tone="night"] .legacy-chat-form,
body[data-theme="grey"][data-phase-tone="night"] .chat-bottom-actions {
  background: linear-gradient(180deg, rgba(41, 48, 58, 0.82), rgba(34, 40, 49, 0.88)) !important;
}

/* Archive classic recalibration */
body[data-theme="classic"] {
  --classic-archive-brown: #795245;
  --classic-archive-brown-light: #9a6858;
  --classic-archive-red-dark: #5e1717;
  --classic-archive-red: #982626;
  --classic-archive-red-button: #67100c;
  --classic-archive-gold: #e6c585;
  --classic-archive-chat: #eeeeee;
  --classic-archive-header-overlay: rgba(0, 0, 0, 0.2);
  --classic-archive-hover: rgba(255, 255, 255, 0.1);
  --classic-archive-open: rgba(0, 0, 0, 0.1);
  --classic-archive-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
  --classic-archive-radius: 5px;
  --classic-archive-text-dark: #000000;
  --classic-archive-text-red: #5e1717;
  --classic-archive-text-gold: #e6c585;
  --classic-archive-grain: url("img/textures/noise.png");
  --classic-archive-bevel: none;
}

body[data-theme="classic"] .play-topbar {
  background:
    var(--classic-archive-grain),
    linear-gradient(
      180deg,
      rgba(98, 66, 53, 0.98),
      rgba(82, 53, 40, 0.99)
    );
  border-bottom: 1px solid rgba(29, 16, 12, 0.68);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  color: #f7efe2;
}

body[data-theme="classic"] .topbar-block {
  border-right-color: rgba(0, 0, 0, 0.28);
  border-left-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="classic"] .topbar-block-room strong {
  color: var(--classic-archive-gold);
  font-size: 0.88rem;
}

body[data-theme="classic"] .topbar-block-count {
  color: rgba(255, 241, 223, 0.9);
}

body[data-theme="classic"] .topbar-block-btn,
body[data-theme="classic"] .topbar-icon-btn {
  background-color: transparent;
  color: #f7efe2;
}

body[data-theme="classic"] .topbar-block-btn:hover,
body[data-theme="classic"] .topbar-block-btn:focus-visible,
body[data-theme="classic"] .topbar-icon-btn:hover,
body[data-theme="classic"] .topbar-icon-btn:focus-visible {
  background-color: var(--classic-archive-hover);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"].history-open .topbar-histo,
body[data-theme="classic"] .topbar-block-btn.is-active,
body[data-theme="classic"] .topbar-block-btn[aria-expanded="true"] {
  background-color: var(--classic-archive-open);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .topbar-block-btn.is-disabled,
body[data-theme="classic"] .topbar-block-btn[aria-disabled="true"],
body[data-theme="classic"] .topbar-block-btn:disabled,
body[data-theme="classic"] .topbar-icon-btn.is-disabled,
body[data-theme="classic"] .topbar-icon-btn[aria-disabled="true"],
body[data-theme="classic"] .topbar-icon-btn:disabled {
  background-color: rgba(0, 0, 0, 0.08);
  color: rgba(247, 239, 226, 0.56);
  opacity: 0.72;
  filter: grayscale(0.28);
}

body[data-theme="classic"] .topbar-block-btn.is-disabled:hover,
body[data-theme="classic"] .topbar-block-btn[aria-disabled="true"]:hover,
body[data-theme="classic"] .topbar-block-btn:disabled:hover,
body[data-theme="classic"] .topbar-icon-btn.is-disabled:hover,
body[data-theme="classic"] .topbar-icon-btn[aria-disabled="true"]:hover,
body[data-theme="classic"] .topbar-icon-btn:disabled:hover {
  background-color: rgba(0, 0, 0, 0.08);
  color: rgba(247, 239, 226, 0.56);
}

body[data-theme="classic"] .history-sidebar {
  background:
    var(--classic-archive-grain),
    linear-gradient(
      180deg,
      rgba(121, 82, 69, 0.98),
      rgba(114, 77, 65, 0.99)
    );
  border-right: 1px solid rgba(40, 23, 18, 0.68);
  box-shadow: 10px 0 20px rgba(0, 0, 0, 0.28);
}

body[data-theme="classic"] .history-header {
  background: var(--classic-archive-header-overlay);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="classic"] .history-day-tag {
  background: rgba(154, 104, 88, 0.92);
  color: #fff7ec;
  border-radius: var(--classic-archive-radius);
  box-shadow: none;
}

body[data-theme="classic"] .history-arrow {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--classic-archive-radius);
  background: rgba(154, 104, 88, 0.9);
  color: #fff1df;
  box-shadow: none;
}

body[data-theme="classic"] .history-arrow:hover,
body[data-theme="classic"] .history-arrow:focus-visible {
  background: var(--classic-archive-hover);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .history-time {
  color: rgba(255, 238, 214, 0.66);
}

body[data-theme="classic"] .history-text,
body[data-theme="classic"] .legacy-panel-copy-muted,
body[data-theme="classic"] .legacy-channel-note {
  color: #fff1df;
}

body[data-theme="classic"] .legacy-panel {
  background:
    var(--classic-archive-grain),
    linear-gradient(
      180deg,
      rgba(98, 66, 53, 0.97),
      rgba(82, 53, 40, 0.98)
    ) !important;
  border: 1px solid rgba(53, 35, 28, 0.44) !important;
  border-radius: var(--classic-archive-radius);
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.18);
  color: #fff1df !important;
}

body[data-theme="classic"] .legacy-panel-burgundy,
body[data-theme="classic"] .legacy-modal-card {
  background:
    var(--classic-archive-grain),
    linear-gradient(
      180deg,
      rgba(103, 24, 23, 0.98),
      rgba(86, 21, 21, 0.99)
    ) !important;
  border-color: rgba(53, 35, 28, 0.44) !important;
  color: #fff1df !important;
}

body[data-theme="classic"] .legacy-action-card,
body[data-theme="classic"] .hybrid-phase-masthead,
body[data-theme="classic"] .hybrid-phase-clock {
  background:
    linear-gradient(
      180deg,
      rgba(98, 66, 53, 0.98),
      rgba(82, 53, 40, 0.99)
    ) !important;
  border-color: rgba(43, 15, 12, 0.44) !important;
  color: #fff0e2 !important;
}

body[data-theme="classic"] .legacy-panel-players,
body[data-theme="classic"] .legacy-panel-players-main {
  background:
    linear-gradient(
      180deg,
      rgba(105, 74, 59, 0.94),
      rgba(87, 61, 48, 0.96)
    ),
    url("img/textures/background-players.png") center center / cover no-repeat !important;
  border-color: rgba(53, 35, 28, 0.44) !important;
  color: #fff1df !important;
}

body[data-theme="classic"] .legacy-panel-burgundy .legacy-panel-header,
body[data-theme="classic"] .legacy-panel-players .legacy-panel-header,
body[data-theme="classic"] .legacy-panel-players-main .legacy-panel-header {
  background: rgba(0, 0, 0, 0.16) !important;
}

body[data-theme="classic"] .legacy-panel-parchment,
body[data-theme="classic"] .game-role-detail-panel {
  background:
    var(--classic-archive-grain),
    linear-gradient(
      180deg,
      rgba(230, 197, 133, 0.94),
      rgba(222, 188, 123, 0.96)
    ) !important;
  border: 1px solid rgba(94, 23, 23, 0.2) !important;
  border-radius: var(--classic-archive-radius);
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.16);
  color: var(--classic-archive-text-red) !important;
}

body[data-theme="classic"] .legacy-panel-header,
body[data-theme="classic"] .legacy-modal-header {
  background: var(--classic-archive-header-overlay) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body[data-theme="classic"] .legacy-panel-header-parchment {
  background: rgba(0, 0, 0, 0.12) !important;
  border-bottom-color: rgba(94, 23, 23, 0.18) !important;
}

body[data-theme="classic"] .legacy-panel-header-players {
  background: rgba(0, 0, 0, 0.18) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body[data-theme="classic"] .legacy-panel-header h3,
body[data-theme="classic"] .legacy-modal-header h2 {
  color: #fff8ef !important;
}

body[data-theme="classic"] .legacy-panel-header-parchment h3,
body[data-theme="classic"] .game-role-detail-panel .game-role-detail-kicker,
body[data-theme="classic"] .game-role-detail-panel .game-role-detail-title,
body[data-theme="classic"] .game-role-detail-panel .game-role-detail-text {
  color: #5e1717 !important;
}

body[data-theme="classic"] .legacy-panel-header-players h3,
body[data-theme="classic"] .legacy-panel-burgundy .legacy-panel-header h3 {
  color: #fff8ef !important;
}

body[data-theme="classic"] .game-role-detail-panel {
  text-shadow: none;
}

body[data-theme="classic"] .game-role-detail-text {
  background: rgba(255, 255, 255, 0.16);
}

body[data-theme="classic"] .game-role-detail-close {
  color: var(--classic-archive-text-red);
  filter: none;
  opacity: 0.72;
}

body[data-theme="classic"] .legacy-modal-close {
  background: rgba(255, 255, 255, 0.12);
  color: #fff3e5;
}

body[data-theme="classic"] .legacy-modal-close:hover,
body[data-theme="classic"] .legacy-modal-close:focus-visible {
  background: var(--classic-archive-hover);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .legacy-toggle,
body[data-theme="classic"] .legacy-select-field,
body[data-theme="classic"] .legacy-range-field {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="classic"] .legacy-audio-mute-btn {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(121, 82, 69, 0.22);
  color: var(--classic-archive-gold);
}

body[data-theme="classic"] .legacy-audio-volume-row .legacy-audio-mute-btn {
  color: var(--classic-archive-gold);
}

body[data-theme="classic"] .legacy-audio-mute-btn:hover,
body[data-theme="classic"] .legacy-audio-mute-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(230, 197, 133, 0.5);
  color: #fff8e7;
}

body[data-theme="classic"] .legacy-audio-mute-btn.is-muted {
  background: rgba(103, 16, 12, 0.3);
  border-color: rgba(242, 148, 136, 0.5);
  color: #ffd1c8;
}

body[data-theme="classic"] .legacy-audio-volume-row {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 0, 0, 0.25);
}

body[data-theme="classic"] .legacy-center-board {
  background: #fdfaf5 !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  color: #000;
}

body[data-theme="classic"] .hybrid-chat-head,
body[data-theme="classic"] .chat-toolbar,
body[data-theme="classic"] .hybrid-stage-shell {
  background: rgba(232, 224, 208, 0.86);
  border-bottom-color: rgba(121, 82, 69, 0.2);
}



body[data-theme="classic"] .hybrid-chat-head-title {
  color: #4e352b;
}

body[data-theme="classic"] .hybrid-chat-head-note {
  color: #7b6555;
}

body[data-theme="classic"] .chat-author,
body[data-theme="classic"] .chat-message-user .chat-meta-inline strong {
  color: var(--classic-archive-red-button);
}

body[data-theme="classic"] .chat-text,
body[data-theme="classic"] .chat-system-text,
body[data-theme="classic"] .chat-message-system,
body[data-theme="classic"] .chat-message-user .chat-meta-inline {
  color: var(--classic-archive-text-dark);
}

body[data-theme="classic"] .chat-time,
body[data-theme="classic"] .chat-vote-time,
body[data-theme="classic"] .chat-system-time {
  color: rgba(121, 82, 69, 0.74);
}

body[data-theme="classic"] .chat-avatar {
  border: 1px solid rgba(121, 82, 69, 0.22);
  background: rgba(121, 82, 69, 0.86);
  box-shadow: none;
}

body[data-theme="classic"] .chat-bubble {
  border-radius: var(--classic-archive-radius);
  box-shadow: none;
}

body[data-theme="classic"] .chat-message-own .chat-bubble {
  background: rgba(121, 82, 69, 0.12);
  border: 1px solid rgba(121, 82, 69, 0.18);
  color: #3a261d;
}

body[data-theme="classic"] .chat-message-other .chat-bubble {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(121, 82, 69, 0.12);
  color: #20130d;
}

body[data-theme="classic"] .chat-message-wolves .chat-author {
  color: #8b1c1c;
}

body[data-theme="classic"] .chat-message-dead .chat-author,
body[data-theme="classic"] .chat-message-dead .chat-text {
  color: #5e4f42;
}

body[data-theme="classic"] .chat-role-reveal,
body[data-theme="classic"] .history-role-reveal {
  background: rgba(255, 248, 234, 0.96);
  border-color: rgba(121, 82, 69, 0.18);
  border-left-color: var(--classic-archive-gold);
  box-shadow: none;
  color: #4a3024;
}

body[data-theme="classic"] .chat-role-reveal-text,
body[data-theme="classic"] .history-role-info .history-detail-line,
body[data-theme="classic"] .history-role-reveal .history-detail-line {
  color: #4a3024;
}

body[data-theme="classic"] .chat-role-reveal-tag,
body[data-theme="classic"] .history-role-reveal-tag {
  color: #7d5720;
  background: rgba(230, 197, 133, 0.24);
  border-color: rgba(121, 82, 69, 0.2);
}

body[data-theme="classic"] .chat-role-werewolf .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-werewolf .chat-system-text {
  color: #8b1c1c !important;
}

body[data-theme="classic"] .chat-role-bigBadWolf .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-bigBadWolf .chat-system-text {
  color: #6f1212 !important;
}

body[data-theme="classic"] .chat-role-whiteWerewolf .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-whiteWerewolf .chat-system-text {
  color: #3e6f88 !important;
}

body[data-theme="classic"] .chat-role-death .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-death .chat-system-text {
  color: #8a3853 !important;
}

body[data-theme="classic"] .chat-role-seer .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-seer .chat-system-text {
  color: #8a5d1f !important;
}

body[data-theme="classic"] .chat-role-witch .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-witch .chat-system-text {
  color: #35684b !important;
}

body[data-theme="classic"] .chat-role-guard .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-guard .chat-system-text {
  color: #446f92 !important;
}

body[data-theme="classic"] .chat-role-sleepwalker .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-sleepwalker .chat-system-text {
  color: #6f57a4 !important;
}

body[data-theme="classic"] .chat-role-bearTamer .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-bearTamer .chat-system-text {
  color: #8a5724 !important;
}

body[data-theme="classic"] .chat-role-fox .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-fox .chat-system-text {
  color: #9d4b1c !important;
}

body[data-theme="classic"] .chat-role-hunter .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-hunter .chat-system-text {
  color: #98631d !important;
}

body[data-theme="classic"] .chat-role-cupid .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-cupid .chat-system-text {
  color: #ab4e73 !important;
}

body[data-theme="classic"] .chat-role-wildChild .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-wildChild .chat-system-text {
  color: #8f4c22 !important;
}

body[data-theme="classic"] .chat-role-wolfDog .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-wolfDog .chat-system-text {
  color: #667225 !important;
}

body[data-theme="classic"] .chat-role-flutePlayer .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-flutePlayer .chat-system-text {
  color: #2f7c78 !important;
}

body[data-theme="classic"] .chat-role-hacker .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-hacker .chat-system-text {
  color: #2f8f38 !important;
}

body[data-theme="classic"] .chat-role-pyromancer .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-pyromancer .chat-system-text {
  color: #b15a1d !important;
}

body[data-theme="classic"] .chat-role-raven .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-raven .chat-system-text {
  color: #5d4e90 !important;
}

body[data-theme="classic"] .chat-role-infectedFatherWolf .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-infectedFatherWolf .chat-system-text {
  color: #75671f !important;
}

body[data-theme="classic"] .chat-role-whiteRabbit .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-whiteRabbit .chat-system-text {
  color: #5d6878 !important;
}

body[data-theme="classic"] .chat-role-puppeteer .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-puppeteer .chat-system-text {
  color: #3f7176 !important;
}

body[data-theme="classic"] .chat-role-dictator .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-dictator .chat-system-text {
  color: #89671d !important;
}

body[data-theme="classic"] .chat-role-stutteringJudge .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-stutteringJudge .chat-system-text {
  color: #875f5f !important;
}

body[data-theme="classic"] .chat-role-angel .chat-phase-separator-label,
body[data-theme="classic"] .chat-role-angel .chat-system-text {
  color: #7a6124 !important;
}

body[data-theme="classic"] .chat-message-system.is-entry .chat-system-icon,
body[data-theme="classic"] .chat-message-system.is-entry .chat-system-text {
  color: #4f6c3c;
}

body[data-theme="classic"] .chat-message-system.is-exit .chat-system-icon,
body[data-theme="classic"] .chat-message-system.is-exit .chat-system-text,
body[data-theme="classic"] .chat-message-system.is-danger .chat-system-icon,
body[data-theme="classic"] .chat-message-system.is-danger .chat-system-text {
  color: var(--classic-archive-red-dark);
}

body[data-theme="classic"] .chat-message-system.tone-danger,
body[data-theme="classic"] .chat-role-reveal.tone-danger {
  background: rgba(94, 23, 23, 0.1);
  border-left-color: var(--classic-archive-red-dark);
  box-shadow: none;
}

body[data-theme="classic"] .chat-message-system.tone-danger .chat-system-text,
body[data-theme="classic"] .chat-message-system.tone-danger .chat-system-icon,
body[data-theme="classic"] .chat-role-reveal.tone-danger .chat-role-reveal-text,
body[data-theme="classic"] .chat-role-reveal.tone-danger .chat-role-reveal-tag {
  color: var(--classic-archive-red-dark);
}

body[data-theme="classic"] .chat-message-system.tone-warning,
body[data-theme="classic"] .chat-role-reveal.tone-warning {
  background: rgba(230, 197, 133, 0.18);
  border-left-color: var(--classic-archive-gold);
  box-shadow: none;
}

body[data-theme="classic"] .chat-message-system.tone-warning .chat-system-text,
body[data-theme="classic"] .chat-message-system.tone-warning .chat-system-icon,
body[data-theme="classic"] .chat-role-reveal.tone-warning .chat-role-reveal-text,
body[data-theme="classic"] .chat-role-reveal.tone-warning .chat-role-reveal-tag {
  color: #6f4c1b;
}

body[data-theme="classic"] .chat-message-system.tone-success,
body[data-theme="classic"] .chat-role-reveal.tone-success {
  background: rgba(108, 128, 82, 0.13);
  border-left-color: rgba(108, 128, 82, 0.9);
  box-shadow: none;
}

body[data-theme="classic"] .chat-message-system.tone-success .chat-system-text,
body[data-theme="classic"] .chat-message-system.tone-success .chat-system-icon,
body[data-theme="classic"] .chat-role-reveal.tone-success .chat-role-reveal-text,
body[data-theme="classic"] .chat-role-reveal.tone-success .chat-role-reveal-tag {
  color: #43512f;
}

body[data-theme="classic"] .chat-phase-separator {
  background: transparent;
  color: #7a5c3e;
  border-top: 1px solid rgba(121, 82, 69, 0.22);
  border-bottom: 1px solid rgba(121, 82, 69, 0.22);
  border-radius: 0;
  box-shadow: none;
}

body[data-theme="classic"] .chat-vote-text {
  color: #2e2016;
}

body[data-theme="classic"] .chat-vote-cast {
  background: transparent;
  color: #7a5c3e;
  border-left-color: rgba(121, 82, 69, 0.3);
}

body[data-theme="classic"] .winner-banner {
  background: rgba(230, 197, 133, 0.24);
  border: 1px solid rgba(121, 82, 69, 0.26);
  color: #4c2f16;
  box-shadow: none;
}

body[data-theme="classic"] .legacy-chat-form {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: none;
}

body[data-theme="classic"] .chat-bottom-actions {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body[data-theme="classic"] .legacy-chat-input {
  background: #fffdf8 !important;
  border: 1px solid rgba(121, 82, 69, 0.24) !important;
  border-radius: var(--classic-archive-radius) !important;
  box-shadow: none !important;
  color: #2e2016;
}

body[data-theme="classic"] .legacy-chat-input::placeholder {
  color: rgba(121, 82, 69, 0.7);
}

body[data-theme="classic"] .legacy-chat-input:focus {
  border-color: rgba(152, 38, 38, 0.4) !important;
  box-shadow: 0 0 0 2px rgba(230, 197, 133, 0.24) !important;
}

body[data-theme="classic"] .legacy-chat-icon-btn {
  border: 1px solid rgba(121, 82, 69, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #7a5c3e;
}

body[data-theme="classic"] .legacy-chat-icon-btn:hover,
body[data-theme="classic"] .legacy-chat-icon-btn:focus-visible {
  background: rgba(245, 238, 227, 0.96);
  color: #6a4b36;
}

body[data-theme="classic"] .legacy-chat-emoji-toggle {
  background: rgba(230, 197, 133, 0.96);
  border: 1px solid rgba(94, 23, 23, 0.22);
  color: #6a420d;
  box-shadow: none;
}

body[data-theme="classic"] .legacy-chat-emoji-toggle:hover,
body[data-theme="classic"] .legacy-chat-emoji-toggle.is-open {
  background: rgba(230, 197, 133, 1);
  border-color: rgba(94, 23, 23, 0.34);
  color: #5b3407;
}

body[data-theme="classic"] .legacy-chat-send,
body[data-theme="classic"] .chat-bottom-actions .legacy-ghost-btn,
body[data-theme="classic"] .legacy-launch-btn {
  background:
    linear-gradient(
      180deg,
      rgba(152, 38, 38, 0.98),
      rgba(103, 16, 12, 0.98)
    );
  color: #ffefbc;
  box-shadow: none;
}

body[data-theme="classic"] .legacy-chat-send:hover:not(:disabled),
body[data-theme="classic"] .legacy-chat-send:focus-visible:not(:disabled),
body[data-theme="classic"] .chat-bottom-actions .legacy-ghost-btn:hover,
body[data-theme="classic"] .chat-bottom-actions .legacy-ghost-btn:focus-visible,
body[data-theme="classic"] .legacy-launch-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-launch-btn:focus-visible:not(:disabled) {
  background:
    linear-gradient(
      180deg,
      rgba(167, 57, 57, 0.98),
      rgba(120, 25, 19, 0.98)
    );
  color: #fff3cf;
}

body[data-theme="classic"] .legacy-submit-btn,
body[data-theme="classic"] .legacy-ready-btn {
  background:
    linear-gradient(
      180deg,
      rgba(230, 197, 133, 0.98),
      rgba(230, 197, 133, 0.98)
    );
  border-color: rgba(94, 23, 23, 0.22);
  color: #4c2e21;
  box-shadow: none;
}

body[data-theme="classic"] .legacy-pill-btn,
body[data-theme="classic"] .legacy-ghost-btn,
body[data-theme="classic"] .legacy-action-btn,
body[data-theme="classic"] .legacy-adjust-btn {
  background: rgba(154, 104, 88, 0.86);
  border-color: rgba(53, 35, 28, 0.34);
  color: #fff2de;
  box-shadow: none;
}

body[data-theme="classic"] .legacy-submit-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-submit-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-ready-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-ready-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-pill-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-pill-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-ghost-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-ghost-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-action-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-action-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-adjust-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-adjust-btn:focus-visible:not(:disabled) {
  filter: none;
  background: rgba(172, 120, 102, 0.96);
  color: #fff7e8;
}

body[data-theme="classic"] .chat-tab {
  background: rgba(121, 82, 69, 0.12);
  border: 1px solid rgba(121, 82, 69, 0.24);
  border-radius: var(--classic-archive-radius);
  color: #6c4b3d;
}

body[data-theme="classic"] .chat-tab:hover,
body[data-theme="classic"] .chat-tab:focus-visible {
  background: var(--classic-archive-hover);
  color: #58392d;
}

body[data-theme="classic"] .chat-tab.is-active {
  background: rgba(121, 82, 69, 0.96);
  border-color: rgba(53, 35, 28, 0.36);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .chat-mention-picker,
body[data-theme="classic"] .chat-emoji-picker {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.86),
      rgba(230, 197, 133, 0.24)
    );
  border-color: rgba(121, 82, 69, 0.2);
  box-shadow: 0 12px 24px rgba(66, 43, 28, 0.16);
}

body[data-theme="classic"] .chat-mention-option,
body[data-theme="classic"] .chat-emoji-btn {
  background: rgba(121, 82, 69, 0.18);
  color: #362116;
}

body[data-theme="classic"] .chat-mention-option:hover,
body[data-theme="classic"] .chat-mention-option:focus-visible,
body[data-theme="classic"] .chat-mention-option.is-selected,
body[data-theme="classic"] .chat-emoji-btn:hover,
body[data-theme="classic"] .chat-emoji-btn:focus-visible {
  background: rgba(121, 82, 69, 0.32);
  box-shadow: inset 0 0 0 1px rgba(121, 82, 69, 0.4);
}

body[data-theme="classic"] .chat-mention {
  background: rgba(230, 197, 133, 0.24);
  color: #7b4f12;
  border-color: rgba(121, 82, 69, 0.18);
}

body[data-theme="classic"] .chat-mention.is-targeted {
  background: rgba(94, 23, 23, 0.14);
  color: #8d2e26;
  border-color: rgba(94, 23, 23, 0.22);
}

body[data-theme="classic"] .list-player-row {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body[data-theme="classic"] .list-player-body {
  background: transparent;
}

body[data-theme="classic"] .list-player-name {
  color: #fff0e2 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

body[data-theme="classic"] .list-player-row + .list-player-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-theme="classic"] .list-player-row:hover,
body[data-theme="classic"] .list-player-row:hover .list-player-body {
  background: var(--classic-archive-hover);
  box-shadow: none;
}

body[data-theme="classic"] .list-player-row.is-host .list-player-name {
  color: var(--classic-archive-gold);
}

body[data-theme="classic"] .list-player-row.is-dead {
  background: transparent;
  opacity: 0.82;
}

body[data-theme="classic"] .list-player-row.is-dead .list-player-name {
  color: #cccccc !important;
  text-decoration: line-through;
}

body[data-theme="classic"] .list-player-row.is-dead .list-player-avatar,
body[data-theme="classic"] .list-player-row.is-dead .player-role-card-static {
  filter: grayscale(1) saturate(0.22);
  opacity: 0.72;
}

body[data-theme="classic"] .list-player-row.is-vote-target,
body[data-theme="classic"] .list-player-row.is-vote-target .list-player-body {
  background: rgba(94, 23, 23, 0.22);
}

body[data-theme="classic"] .list-player-row.is-vote-target .list-player-name {
  color: #ffe0d3 !important;
}

/* Final archive pass: keep each classic family on its own archive color */
body[data-theme="classic"] .play-topbar {
  background-color: var(--classic-archive-brown);
  background-image: var(--classic-archive-grain);
  background-blend-mode: luminosity;
  background-repeat: repeat;
  background-position: top left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: var(--classic-archive-shadow);
}

body[data-theme="classic"] .topbar-block {
  border-right-color: rgba(0, 0, 0, 0.3);
  border-left-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="classic"] .topbar-histo {
  background-color: rgba(255, 255, 255, 0.15);
}

body[data-theme="classic"] .topbar-block-btn,
body[data-theme="classic"] .topbar-icon-btn {
  background-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="classic"] .topbar-block-btn:hover,
body[data-theme="classic"] .topbar-block-btn:focus-visible,
body[data-theme="classic"] .topbar-icon-btn:hover,
body[data-theme="classic"] .topbar-icon-btn:focus-visible {
  background-color: var(--classic-archive-hover);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"].history-open .topbar-histo,
body[data-theme="classic"] .topbar-block-btn.is-active,
body[data-theme="classic"] .topbar-block-btn[aria-expanded="true"] {
  background-color: var(--classic-archive-open);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .topbar-room-count,
body[data-theme="classic"] .hybrid-topbar-meta,
body[data-theme="classic"] .hybrid-topbar-subtitle {
  color: rgba(255, 241, 223, 0.72);
}

body[data-theme="classic"] .history-sidebar {
  background-color: var(--classic-archive-brown);
  background-image: var(--classic-archive-grain);
  background-blend-mode: luminosity;
  background-repeat: repeat;
  background-position: top left;
  background-size: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 10px 0 10px rgba(0, 0, 0, 0.2);
}

body[data-theme="classic"] .history-header,
body[data-theme="classic"] .legacy-panel-header,
body[data-theme="classic"] .legacy-modal-header {
  background: var(--classic-archive-header-overlay) !important;
}

body[data-theme="classic"] .history-day-tag,
body[data-theme="classic"] .history-arrow {
  background: var(--classic-archive-brown-light);
  border-radius: var(--classic-archive-radius);
  box-shadow: none;
}

body[data-theme="classic"] .history-arrow:hover,
body[data-theme="classic"] .history-arrow:focus-visible {
  background: var(--classic-archive-hover);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .legacy-panel-burgundy,
body[data-theme="classic"] .legacy-action-card,
body[data-theme="classic"] #legacy-settings-modal {
  background-color: var(--classic-archive-red-dark) !important;
  background-image: var(--classic-archive-grain) !important;
  background-blend-mode: luminosity !important;
  background-repeat: repeat !important;
  background-position: top left !important;
  border-color: rgba(53, 35, 28, 0.44) !important;
  box-shadow: var(--classic-archive-shadow);
}

body[data-theme="classic"] .legacy-panel-players,
body[data-theme="classic"] .legacy-panel-players-main {
  background-color: var(--classic-archive-brown) !important;
  background-image:
    var(--classic-archive-grain),
    url("img/textures/background-players.png") !important;
  background-blend-mode: luminosity, normal !important;
  background-repeat: repeat, no-repeat !important;
  background-position: top left, center center !important;
  background-size: auto, cover !important;
  border-color: rgba(53, 35, 28, 0.44) !important;
  box-shadow: var(--classic-archive-shadow);
}

body[data-theme="classic"] .legacy-modal-card {
  background-color: var(--classic-archive-brown) !important;
  background-image: var(--classic-archive-grain) !important;
  background-blend-mode: luminosity !important;
  background-repeat: repeat !important;
  background-position: top left !important;
  border-color: rgba(53, 35, 28, 0.44) !important;
  box-shadow: var(--classic-archive-shadow);
}

body[data-theme="classic"] .legacy-panel-parchment,
body[data-theme="classic"] .game-role-detail-panel {
  background-color: var(--classic-archive-gold) !important;
  background-image:
    var(--classic-archive-grain),
    url("img/textures/background-compo.png") !important;
  background-blend-mode: luminosity, normal !important;
  background-repeat: repeat, no-repeat !important;
  background-position: top left, center bottom !important;
  background-size: auto, 100% auto !important;
  border: 1px solid rgba(94, 23, 23, 0.2) !important;
  box-shadow: var(--classic-archive-shadow);
  color: var(--classic-archive-text-red) !important;
}

body[data-theme="classic"] .legacy-panel-header-parchment,
body[data-theme="classic"] #legacy-composition-modal .legacy-modal-header {
  background: rgba(0, 0, 0, 0.12) !important;
  border-bottom-color: rgba(94, 23, 23, 0.18) !important;
}

body[data-theme="classic"] .legacy-center-board,
body[data-theme="classic"] .chat-messages {
  background: #ffffff !important;
  color: var(--classic-archive-text-dark);
}

body[data-theme="classic"] .legacy-center-board {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.12);
}

body[data-theme="classic"] .hybrid-chat-head,
body[data-theme="classic"] .chat-toolbar,
body[data-theme="classic"] .hybrid-stage-shell,
body[data-theme="classic"] .legacy-chat-form,
body[data-theme="classic"] .chat-bottom-actions {
  background: #ffffff !important;
}

body[data-theme="classic"] .legacy-chat-input {
  background: #ffffff !important;
}

body[data-theme="classic"] .legacy-chat-send,
body[data-theme="classic"] .legacy-launch-btn,
body[data-theme="classic"] .legacy-submit-btn,
body[data-theme="classic"] .legacy-ready-btn {
  background: var(--classic-archive-red-button);
  border-color: rgba(0, 0, 0, 0.5);
  color: #ffefbc;
}

body[data-theme="classic"] .legacy-chat-send:hover:not(:disabled),
body[data-theme="classic"] .legacy-chat-send:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-launch-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-launch-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-submit-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-submit-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-ready-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-ready-btn:focus-visible:not(:disabled) {
  background: var(--classic-archive-red);
  color: #fff3cf;
}

body[data-theme="classic"] .legacy-pill-btn,
body[data-theme="classic"] .legacy-ghost-btn,
body[data-theme="classic"] .legacy-action-btn,
body[data-theme="classic"] .legacy-adjust-btn,
body[data-theme="classic"] .legacy-chat-emoji-toggle {
  background: rgba(154, 104, 88, 0.9);
  border-color: rgba(53, 35, 28, 0.34);
  color: #fff2de;
  box-shadow: none;
}

body[data-theme="classic"] .legacy-pill-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-pill-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-ghost-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-ghost-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-action-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-action-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-adjust-btn:hover:not(:disabled),
body[data-theme="classic"] .legacy-adjust-btn:focus-visible:not(:disabled),
body[data-theme="classic"] .legacy-chat-emoji-toggle:hover,
body[data-theme="classic"] .legacy-chat-emoji-toggle.is-open {
  background: rgba(172, 120, 102, 0.96);
  color: #fff7e8;
}

body[data-theme="classic"] .chat-tab.is-active {
  background: var(--classic-archive-brown);
  color: var(--classic-archive-text-gold);
}

body[data-theme="classic"] .list-player-row:hover,
body[data-theme="classic"] .list-player-row:hover .list-player-body {
  background: var(--classic-archive-hover);
}

body[data-theme="classic"] .list-player-row.is-dead .list-player-name {
  color: #cccccc !important;
  font-style: italic;
}

body[data-theme="classic"] .list-player-row.is-host .list-player-name {
  color: var(--classic-archive-gold);
}

body[data-theme="classic"] .list-player-row.is-vote-target,
body[data-theme="classic"] .list-player-row.is-vote-target .list-player-body {
  background: rgba(94, 23, 23, 0.22);
}

/* Privacy mode */
body.privacy-mask-enabled .privacy-sensitive-panel,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay #reveal-message {
  position: relative;
  overflow: hidden;
}

body.privacy-mask-enabled .privacy-sensitive-panel::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay #reveal-message::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.82), rgba(15, 20, 28, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  color: #f3e4c4;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.18s ease;
}

body.privacy-mask-enabled .privacy-sensitive-panel::after {
  content: "Mode discret";
}

body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay #reveal-message::after {
  content: "Role masque";
}

body.privacy-mask-enabled .privacy-sensitive-panel > *,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container > *,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay #reveal-message > *,
body.privacy-mask-enabled .list-player-row .player-role-card-static,
body.privacy-mask-enabled .list-player-row .btn-suspect-icon {
  filter: blur(11px) saturate(0.68);
  opacity: 0.16;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

body.privacy-mask-enabled .list-player-row .btn-suspect-icon {
  pointer-events: none;
}

body.privacy-mask-enabled .list-player-row .list-player-badge[data-badge-key="lover"],
body.privacy-mask-enabled .list-player-row .list-player-badge[data-badge-key="siblings"] {
  display: none;
}

body.privacy-mask-enabled .privacy-sensitive-panel:hover::after,
body.privacy-mask-enabled .privacy-sensitive-panel:focus-within::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container:hover::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-message:hover::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay:active .reveal-card-container::after,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay:active #reveal-message::after {
  opacity: 0;
}

body.privacy-mask-enabled .privacy-sensitive-panel:hover > *,
body.privacy-mask-enabled .privacy-sensitive-panel:focus-within > *,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container:hover > *,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-message:hover > *,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay:active .reveal-card-container > *,
body.privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay:active #reveal-message > * {
  filter: none;
  opacity: 1;
}

body.privacy-mask-enabled .play-column-left .legacy-action-icon-wrapper.privacy-sensitive-panel::after,
body.privacy-mask-enabled .play-column-left #role-reveal-container.privacy-sensitive-panel::after {
  content: "Role masque";
}

body.privacy-mask-enabled .play-column-left .legacy-action-icon-wrapper.privacy-sensitive-panel > *,
body.privacy-mask-enabled .play-column-left #role-reveal-container.privacy-sensitive-panel > * {
  filter: blur(14px) saturate(0.4);
  opacity: 0.08;
}

body.privacy-mask-enabled .play-column-left .legacy-action-icon-wrapper.privacy-sensitive-panel:hover > *,
body.privacy-mask-enabled .play-column-left .legacy-action-icon-wrapper.privacy-sensitive-panel:focus-within > *,
body.privacy-mask-enabled .play-column-left #role-reveal-container.privacy-sensitive-panel:hover > *,
body.privacy-mask-enabled .play-column-left #role-reveal-container.privacy-sensitive-panel:focus-within > * {
  filter: none;
  opacity: 1;
}

/* Hover reveal pour les cartes de rôle dans la liste des joueurs */
body.privacy-mask-enabled .list-player-row:hover .player-role-card-static,
body.privacy-mask-enabled .list-player-row:hover .btn-suspect-icon {
  filter: none;
  opacity: 1;
}
body.privacy-mask-enabled .list-player-row:hover .btn-suspect-icon {
  pointer-events: auto;
}

body[data-theme="classic"].privacy-mask-enabled .privacy-sensitive-panel::after,
body[data-theme="classic"].privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container::after,
body[data-theme="classic"].privacy-mask-enabled #role-reveal-overlay.privacy-sensitive-overlay #reveal-message::after {
  background: linear-gradient(180deg, rgba(115, 87, 55, 0.84), rgba(88, 62, 36, 0.76));
  border-color: rgba(255, 240, 214, 0.18);
  color: #fff6e8;
}

/* Suspend privacy masking entirely while the role reveal animation is running. */
body.privacy-mask-enabled.privacy-mask-suspended .play-column-left #role-reveal-container.privacy-sensitive-panel::after,
body.privacy-mask-enabled.privacy-mask-suspended #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container::after,
body.privacy-mask-enabled.privacy-mask-suspended #role-reveal-overlay.privacy-sensitive-overlay #reveal-message::after {
  opacity: 0 !important;
}

body.privacy-mask-enabled.privacy-mask-suspended .play-column-left #role-reveal-container.privacy-sensitive-panel > *,
body.privacy-mask-enabled.privacy-mask-suspended #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container > *,
body.privacy-mask-enabled.privacy-mask-suspended #role-reveal-overlay.privacy-sensitive-overlay #reveal-message > * {
  filter: none !important;
  opacity: 1 !important;
}

body.privacy-mask-enabled.privacy-mask-suspended #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container {
  position: relative !important;
}

body.privacy-mask-enabled.privacy-mask-suspended #role-reveal-overlay.privacy-sensitive-overlay .reveal-card-container.is-moving {
  position: fixed !important;
}

/* Classic cleanup: simplify the area above the composer and remove decorative inner textures. */
body[data-theme="classic"] .chat-toolbar {
  position: relative;
  z-index: 2;
  overflow: visible;
  background: #ffffff !important;
  padding: 6px 10px 0;
  border-bottom: 0;
  min-height: 0;
  box-shadow: none;
}

body[data-theme="classic"] .chat-toolbar:has(#chat-tabs:empty) {
  display: none;
}

body[data-theme="classic"] .chat-tabs {
  position: relative;
  z-index: 2;
  padding: 0;
  gap: 6px;
}

body[data-theme="classic"] .legacy-channel-note:empty,
body[data-theme="classic"] .chat-tabs-bottom:empty {
  display: none;
}

body[data-theme="classic"] .chat-tab {
  position: relative;
  z-index: 2;
  background: rgba(121, 82, 69, 0.08);
}

body[data-theme="classic"] .legacy-panel-players,
body[data-theme="classic"] .legacy-panel-players-main {
  background-image:
    var(--classic-archive-grain),
    linear-gradient(180deg, rgba(121, 82, 69, 0.98), rgba(106, 73, 60, 0.98)) !important;
  background-blend-mode: luminosity, normal !important;
  background-repeat: repeat, no-repeat !important;
  background-position: top left, center center !important;
  background-size: auto, auto !important;
}

body[data-theme="classic"] .legacy-panel-parchment,
body[data-theme="classic"] .game-role-detail-panel {
  background-image:
    var(--classic-archive-grain),
    linear-gradient(180deg, rgba(230, 197, 133, 0.97), rgba(219, 187, 120, 0.98)) !important;
  background-blend-mode: luminosity, normal !important;
  background-repeat: repeat, no-repeat !important;
  background-position: top left, center center !important;
  background-size: auto, auto !important;
}

body[data-theme="classic"] .legacy-panel-body-players,
body[data-theme="classic"] .legacy-panel-body-parchment {
  background-image: none !important;
}

body[data-theme="classic"] .chat-phase-separator::after {
  display: none !important;
}

body[data-theme="classic"] .chat-phase-separator-label {
  line-height: 1.35;
}

body[data-theme="midnight"] .chat-messages > .chat-phase-separator,
body:not([data-theme]) .chat-messages > .chat-phase-separator,
body[data-theme="grey"] .chat-messages > .chat-phase-separator {
  width: calc(100% - 10px) !important;
  max-width: calc(100% - 10px) !important;
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
  min-height: 36px;
  border-radius: 999px !important;
  flex: 0 0 auto;
  box-sizing: border-box;
}

/* ── Classic chat layout alignment ──────────────────────────────────────
   Align the box structure (phase separators, elimination cards, vote casts,
   system messages) with the midnight/grey layout so the chat organisation
   is consistent across all themes. Colours stay parchment. */

body[data-theme="classic"] .chat-phase-separator {
  border-radius: 999px !important;
  width: calc(100% - 10px) !important;
  max-width: calc(100% - 10px) !important;
  align-self: center !important;
  margin: 8px auto !important;
  padding: 8px 18px !important;
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
  min-height: 36px;
  flex: 0 0 auto;
  box-sizing: border-box;
  background: rgba(120, 90, 60, 0.1) !important;
  border-top: 1px solid rgba(120, 90, 60, 0.25) !important;
  border-bottom: 1px solid rgba(120, 90, 60, 0.25) !important;
}

body[data-theme="classic"] .chat-elimination {
  margin: 6px 10px !important;
  border-radius: 6px !important;
  padding: 10px 14px !important;
}

body[data-theme="classic"] .chat-role-reveal {
  margin: 4px 10px !important;
  border-radius: 6px !important;
}

body[data-theme="classic"] .chat-vote-cast {
  padding: 5px 14px !important;
}

body[data-theme="classic"] .chat-message-system {
  padding: 5px 14px !important;
}

body[data-theme="classic"] .chat-message-banner {
  border-radius: 6px !important;
  margin: 4px 10px !important;
}

body[data-theme="classic"] .legacy-chat-form,
body[data-theme="classic"] .chat-bottom-actions {
  border-top: 0 !important;
  box-shadow: none !important;
}

body[data-theme="classic"] .chat-messages {
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
