:root {
  --bg: #071225;
  --bg-elev: #0b1830;
  --bg-elev-2: #10203d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(120, 160, 255, 0.28);
  --text: #f7f9fc;
  --text-soft: rgba(247, 249, 252, 0.72);
  --text-dim: rgba(247, 249, 252, 0.52);
  --accent: #6d8cff;
  --accent-2: #7aa2ff;
  --success: #7ee787;
  --danger: #ff7b7b;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #04101f 0%, #071225 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.site-header-left {
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: 58px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.site-subtitle {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 22px;
}

.site-header-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(11, 24, 48, 0.95);
  border: 1px solid var(--border);
  color: var(--text-soft);
  box-shadow: var(--shadow);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 12px rgba(126, 231, 135, 0.5);
}

.top-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tab-button {
  border: 1px solid var(--border);
  background: rgba(11, 24, 48, 0.95);
  color: var(--text-soft);
  padding: 14px 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: var(--shadow);
}

.tab-button:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.tab-button.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(19, 39, 79, 0.98), rgba(13, 28, 58, 0.98));
  box-shadow: 0 0 0 2px rgba(109, 140, 255, 0.12), var(--shadow);
}

.main-content {
  display: block;
}

.tab-page {
  display: block;
}

.tab-page[hidden] {
  display: none !important;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
}

.page-header p {
  margin: 0;
  color: var(--text-soft);
}

.panel-card {
  background: radial-gradient(circle at top left, rgba(24, 48, 92, 0.4), rgba(10, 20, 38, 0.96) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.section-title-row h3 {
  margin: 0;
  font-size: 20px;
}

.muted-label {
  color: var(--text-dim);
  font-size: 14px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar.wrap {
  flex-wrap: wrap;
}

.text-input {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(12, 24, 46, 0.96);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.text-input::placeholder {
  color: rgba(247, 249, 252, 0.4);
}

.text-input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px rgba(109, 140, 255, 0.14);
}

.select-input {
  min-width: 180px;
}

.date-select {
  min-width: 190px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, rgba(247,249,252,0.7) 50%), linear-gradient(135deg, rgba(247,249,252,0.7) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.date-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(13, 27, 52, 0.98);
  color: var(--text);
  padding: 0 16px;
  cursor: pointer;
  transition: 0.18s ease;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, #203d78, #172f5f);
  border-color: rgba(122, 162, 255, 0.34);
}

.btn-full {
  width: 100%;
}

.home-grid,
.two-col-layout,
.three-col-layout {
  display: grid;
  gap: 20px;
}

.home-grid-top {
  grid-template-columns: 1.1fr 0.9fr;
}

.two-col-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  color: var(--text);
}

.empty-state {
  color: var(--text-soft);
  padding: 18px 4px 4px;
}

.error-state {
  color: #ffb0b0;
}

.stats-grid,
.summary-grid,
.profile-grid {
  display: grid;
  gap: 14px;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.profile-stat {
  min-height: 120px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(17, 30, 56, 0.96), rgba(11, 21, 38, 0.96));
}

.stat-label {
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 34px;
  line-height: 1.05;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(12, 24, 46, 0.96);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 14px;
}

.stack-lg {
  display: grid;
  gap: 22px;
}

.panel-section {
  display: block;
}

.emote-cell {
  display: flex;
  align-items: center;
}

.emote-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  display: inline-block;
}

.emote-fallback {
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

/* live homepage lists */
.live-list {
  display: grid;
  gap: 10px;
}

.live-list-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.live-list-row:last-child {
  border-bottom: none;
}

.live-list-row-emote {
  grid-template-columns: 28px 34px minmax(0, 1fr);
}

.live-list-rank {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.live-list-main {
  min-width: 0;
}

.live-list-name {
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.live-list-sub {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 4px;
}

.live-list-emote-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-list-emote-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.live-list-emote-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 20px;
}

.login-overlay.hidden {
  display: none;
}

.login-panel {
  width: min(420px, 100%);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 30, 56, 0.98), rgba(9, 18, 34, 0.98));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-panel h2 {
  margin: 0 0 8px;
}

.login-subtitle {
  margin: 0 0 18px;
  color: var(--text-soft);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-error {
  color: #ffb0b0;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

#activityTodayCard {
  min-height: 350px;
}

#activityChart {
  display: block;
  width: 100% !important;
  height: 340px !important;
}

@media (max-width: 1200px) {
  .three-col-layout {
    grid-template-columns: 1fr;
  }

  .home-grid-top,
  .two-col-layout {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 24px, 1400px);
    padding-top: 18px;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header-right {
    justify-content: flex-start;
  }

  .site-title {
    font-size: 40px;
  }

  .site-subtitle {
    font-size: 16px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.mod-subtabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mod-subtab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e8eefc;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.mod-subtab:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.mod-subtab.active {
  background: rgba(91, 141, 239, 0.22);
  border-color: rgba(91, 141, 239, 0.55);
  box-shadow: inset 0 0 0 1px rgba(91, 141, 239, 0.2);
}

.mod-tab {
  margin-top: 8px;
}

.mod-tab[hidden] {
  display: none !important;
}

.mod-toolbar-grid {
  align-items: end;
}

.mod-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.mod-range-presets {
  min-width: 170px;
}

.mod-range-preset-row {
  display: flex;
  gap: 8px;
}

.mod-range-preset-row .btn {
  min-width: 0;
  flex: 1 1 0;
}

.mod-input-group-button {
  min-width: 140px;
}

.mod-input-label {
  font-size: 12px;
  line-height: 1.2;
  color: #9fb0d1;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.mod-card {
  background: #111827;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #1f2937;
}

.mod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mod-count {
  font-size: 20px;
  font-weight: bold;
  color: #60a5fa;
}

.mod-text {
  margin-top: 8px;
  font-size: 16px;
  word-break: break-word;
}

.mod-meta {
  margin-top: 6px;
  font-size: 13px;
  color: #9ca3af;
}

.mod-users {
  margin-top: 6px;
  font-size: 13px;
  color: #d1d5db;
}

.mod-whitelist {
  background: #2563eb;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.status-ok {
  color: #86efac;
}

.status-bad {
  color: #fca5a5;
  font-weight: 600;
}

.mod-message-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mod-message-row {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}

.mod-message-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 1.05rem;
  color: #aab4d4;
}

.mod-message-user {
  font-weight: 700;
  color: #f8fbff;
}

.mod-ml-phrase {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.35;
  color: #f8fbff;
  overflow-wrap: anywhere;
}

.mod-ml-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: #aab4d4;
  font-size: 0.92rem;
}

.mod-ml-sample {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: rgba(4, 12, 26, 0.42);
  margin-top: 6px;
  color: #f3f4f6;
  line-height: 1.55;
}

.mod-message-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: #f3f4f6;
}

.mod-text-with-emotes {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.mod-inline-emote {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 1px;
}

.mod-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
}

.mod-checkbox-inline input {
  width: 16px;
  height: 16px;
}

.mod-ml-toggle-row {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.action-row {
  margin-top: 10px;
  margin-bottom: 10px;
}

.mod-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.mod-highlight {
  background: rgba(250, 204, 21, 0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}


.mod-input-group.is-disabled {
  opacity: 0.58;
}


#topEmotesCard table th:nth-child(3),
#topEmotesCard table td:nth-child(3) {
  width: 100%;
}

#topEmotesCard table th,
#topEmotesCard table td {
  padding: 8px 10px;
}

#topEmotesCard .table-wrap table {
  table-layout: auto;
}

.live-emote-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-emote-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 28px;
}

.live-emote-fallback {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  opacity: 0.65;
  flex: 0 0 28px;
}

.mod-emote-usage-table td:nth-child(2) {
  width: 56px;
}

.mod-emote-usage-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}


.mod-ml-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mod-drawer-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,0.62); backdrop-filter: blur(2px); z-index: 1200; }
.mod-drawer { position: fixed; top: 0; right: 0; width: min(520px,100vw); height: 100vh; background: #0b1220; border-left: 1px solid rgba(255,255,255,0.08); box-shadow: -24px 0 48px rgba(0,0,0,0.35); z-index: 1201; display: flex; flex-direction: column; }
.mod-drawer.hidden,.mod-drawer-backdrop.hidden { display:none; }
body.mod-drawer-open { overflow: hidden; }
.mod-drawer-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 20px 16px; border-bottom:1px solid rgba(255,255,255,0.08); }
.mod-drawer-header h3 { margin-bottom:4px; }
.mod-drawer-body { padding:16px 20px 24px; overflow-y:auto; overscroll-behavior:contain; display:grid; gap:14px; }
.mod-drawer-tabs { display:flex; gap:8px; }
.mod-drawer-tabs .btn.active { background: rgba(37, 99, 235, 0.18); border-color: rgba(96, 165, 250, 0.35); }
.mod-drawer-search-row .text-input, #modMlWhitelistBulkInput { width:100%; }
.mod-whitelist-list { display:grid; gap:8px; }
.mod-whitelist-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid rgba(255,255,255,0.08); border-radius:12px; background: rgba(255,255,255,0.03); }
.mod-whitelist-value { color:#f8fbff; line-height:1.45; overflow-wrap:anywhere; }
.mod-whitelist-sub { margin-top:4px; color:#aab4d4; font-size:0.85rem; }

.mod-drawer-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mod-drawer-section-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.mod-drawer-section {
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.mod-drawer-section textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
  margin-top: 6px;
}

.mod-drawer-section .toolbar {
  margin-top: 10px;
  margin-bottom: 0;
}

.mod-drawer {
  will-change: transform;
  transform: translateZ(0);
}

.mod-drawer-backdrop {
  backdrop-filter: none !important;
}

.mod-ml-sample {
  position: relative;
}

.mod-ml-sample-content {
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
}

.mod-ml-sample-collapsed .mod-ml-sample-content {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-ml-expand-btn {
  margin-top: 8px;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: rgba(12, 24, 46, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  border-radius: 10px;
  color: #f3f4f6;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  animation: toastIn 0.2s ease;
}

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

.mod-ml-expand-row {
  margin-top: 0px;
  display: flex;
  justify-content: flex-start;
}

.mod-ml-expand-btn {
  opacity: 0.9;
}

.mod-ml-expand-btn:hover {
  opacity: 1;
}

.mod-ml-bucket-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 18px 0;
}

.mod-ml-bucket-block {
  margin: 22px 0 28px;
}

.mod-ml-bucket-block h4 {
  margin: 0 0 12px;
}

.mod-ml-bucket-list {
  display: grid;
  gap: 14px;
}

.mod-ml-card {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mod-ml-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mod-ml-phrase {
  font-weight: 700;
  font-size: 1rem;
  color: #f8fbff;
  overflow-wrap: anywhere;
}

.mod-ml-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-ml-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.mod-ml-examples summary {
  cursor: pointer;
  margin-bottom: 8px;
}

.mod-ml-example-list {
  display: grid;
  gap: 8px;
}

.mod-ml-example-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}

.mod-ml-example-user {
  font-weight: 700;
  color: #f8fbff;
}

.mod-ml-example-text {
  color: #d9e1f2;
  overflow-wrap: anywhere;
}

.mod-ml-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mod-ml-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  align-self: flex-start;
}

.mod-ml-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.mod-ml-card-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.mod-ml-card-actions-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.mod-ml-label-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.mod-ml-label-toast button {
  background: transparent;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.mod-inline-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mod-phrase-label-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.mod-phrase-label-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-phrase-label-main {
  min-width: 0;
  flex: 1;
}

.mod-phrase-label-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mod-phrase-label-phrase {
  font-size: 15px;
  font-weight: 600;
  word-break: break-word;
}

.mod-phrase-label-normalized {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  word-break: break-word;
}

.mod-phrase-label-actions {
  flex-shrink: 0;
}

.mod-label-chip-toxic {
  border-color: rgba(255, 90, 90, 0.35);
}

.mod-label-chip-borderline {
  border-color: rgba(255, 190, 70, 0.35);
}

.mod-label-chip-safe {
  border-color: rgba(70, 200, 110, 0.35);
}

.mod-ml-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.mod-drawer.hidden {
  display: none;
}

.mod-drawer {
  position: fixed;
  inset: 0;
  z-index: 3000;
}

.mod-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mod-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mod-drawer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mod-drawer-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mod-phrase-label-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mod-phrase-label-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-phrase-label-main {
  min-width: 0;
  flex: 1;
}

.mod-phrase-label-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mod-phrase-label-phrase {
  font-size: 15px;
  font-weight: 600;
  word-break: break-word;
}

.mod-phrase-label-normalized {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  word-break: break-word;
}

.mod-phrase-label-actions {
  flex-shrink: 0;
}

.mod-label-chip-toxic {
  border-color: rgba(255, 90, 90, 0.35);
}

.mod-label-chip-borderline {
  border-color: rgba(255, 190, 70, 0.35);
}

.mod-label-chip-safe {
  border-color: rgba(70, 200, 110, 0.35);
}
