/* styles.css */

/* styles/foundation.css */
:root {
  color-scheme: dark;
  --bg0: #050914;
  --bg1: #070d1c;
  --bg2: #0b1224;
  --panel0: rgba(20, 32, 61, 0.94);
  --panel1: rgba(12, 22, 43, 0.94);
  --line: rgba(120, 145, 255, 0.18);
  --line-strong: rgba(142, 166, 255, 0.32);
  --text: #dce6ff;
  --muted: #9aa9c7;
  --cyan: #48c7ff;
  --purple: #9a78ff;
  --purple2: #6a45e8;
  --blue: #2898f0;
  --green: #31d075;
  --red: #e56573;
  --gold: #ffd35d;
  --field0: #17233d;
  --field1: #101a31;
  --blue2: #146fbd;
  --green2: #15944d;
  --red2: #a93b4b;
  --gold2: #e5a900;
  --gold-text: #18120c;
  --blue-glow: rgba(53, 168, 255, 0.28);
  --green-glow: rgba(49, 208, 117, 0.28);
  --red-glow: rgba(229, 101, 115, 0.28);
  --gold-glow: rgba(255, 205, 55, 0.24);
  --shadow: rgba(0, 0, 0, 0.36);
  --bg-glow-a: rgba(91, 70, 255, 0.22);
  --bg-glow-b: rgba(72, 199, 255, 0.08);
  --surface-top: linear-gradient(180deg, rgba(8, 15, 31, 0.98), rgba(6, 11, 22, 0.98));
  --surface-menu: rgba(8, 17, 35, 0.98);
  --surface-soft: rgba(8, 17, 35, 0.58);
  --surface-muted: rgba(10, 18, 34, 0.42);
  --surface-field: linear-gradient(180deg, var(--field0), var(--field1));
  --accent-border: rgba(120, 145, 255, 0.22);
  --accent-border-strong: rgba(142, 166, 255, 0.36);
  --accent-soft: rgba(154, 120, 255, 0.16);
  --accent-glow: rgba(154, 120, 255, 0.26);
  --main-column-min: 1030px;
  --main-column-max: 1275px;
  --main-column-fluid: calc(100vw - 64px);
  --main-column: clamp(var(--main-column-min), var(--main-column-fluid), var(--main-column-max));
  --side-column: 420px;
  --topbar-height: 64px;
  --app-zoom: 1;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg0);
}

body {
  margin: 0;
  width: calc(100vw / var(--app-zoom));
  min-height: calc(100vh / var(--app-zoom));
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, var(--bg-glow-a), transparent 34%),
    radial-gradient(circle at 90% 20%, var(--bg-glow-b), transparent 32%),
    linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg0) 100%);
  background-color: var(--bg0);
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-theme="obsidian"] {
  --bg0: #05070a;
  --bg1: #0a0f15;
  --bg2: #111821;
  --panel0: rgba(21, 29, 38, 0.95);
  --panel1: rgba(11, 16, 23, 0.95);
  --line: rgba(126, 156, 184, 0.2);
  --line-strong: rgba(154, 183, 208, 0.34);
  --text: #e7eef7;
  --muted: #9aa9b8;
  --cyan: #67d4e6;
  --purple: #92a7ff;
  --purple2: #5d6fd4;
  --blue: #3498d3;
  --green: #35c889;
  --red: #df6474;
  --gold: #efc96a;
  --field0: #17212e;
  --field1: #101721;
  --blue2: #17649f;
  --green2: #16845a;
  --red2: #963949;
  --gold2: #cc971c;
  --gold-text: #1b1508;
  --blue-glow: rgba(52, 152, 211, 0.24);
  --green-glow: rgba(53, 200, 137, 0.24);
  --red-glow: rgba(223, 100, 116, 0.24);
  --gold-glow: rgba(239, 201, 106, 0.2);
  --bg-glow-a: rgba(103, 212, 230, 0.1);
  --bg-glow-b: rgba(146, 167, 255, 0.07);
  --surface-top: linear-gradient(180deg, rgba(10, 15, 21, 0.98), rgba(6, 9, 13, 0.98));
  --surface-menu: rgba(9, 14, 20, 0.98);
  --surface-soft: rgba(17, 25, 34, 0.7);
  --surface-muted: rgba(13, 20, 28, 0.5);
  --surface-field: linear-gradient(180deg, #17212e, #101721);
  --accent-border: rgba(126, 156, 184, 0.26);
  --accent-border-strong: rgba(154, 183, 208, 0.42);
  --accent-soft: rgba(103, 212, 230, 0.12);
  --accent-glow: rgba(103, 212, 230, 0.2);
}

body[data-theme="forest"] {
  --bg0: #05100f;
  --bg1: #08161a;
  --bg2: #0d2029;
  --panel0: rgba(18, 35, 40, 0.95);
  --panel1: rgba(9, 21, 25, 0.95);
  --line: rgba(98, 172, 159, 0.2);
  --line-strong: rgba(130, 207, 188, 0.34);
  --text: #e8fff7;
  --muted: #9bb9ae;
  --cyan: #62d7d0;
  --purple: #91a6ff;
  --purple2: #536bd0;
  --blue: #3298d4;
  --green: #51ca82;
  --red: #e36b74;
  --gold: #edcb66;
  --field0: #132c32;
  --field1: #0d1f25;
  --blue2: #17669d;
  --green2: #248850;
  --red2: #993b45;
  --gold2: #c8951c;
  --gold-text: #1b1508;
  --blue-glow: rgba(50, 152, 212, 0.22);
  --green-glow: rgba(81, 202, 130, 0.24);
  --red-glow: rgba(227, 107, 116, 0.24);
  --gold-glow: rgba(237, 203, 102, 0.2);
  --bg-glow-a: rgba(81, 202, 130, 0.12);
  --bg-glow-b: rgba(98, 215, 208, 0.08);
  --surface-top: linear-gradient(180deg, rgba(8, 20, 23, 0.98), rgba(5, 13, 14, 0.98));
  --surface-menu: rgba(8, 20, 23, 0.98);
  --surface-soft: rgba(14, 32, 40, 0.7);
  --surface-muted: rgba(10, 25, 31, 0.5);
  --surface-field: linear-gradient(180deg, #132c32, #0d1f25);
  --accent-border: rgba(98, 172, 159, 0.26);
  --accent-border-strong: rgba(130, 207, 188, 0.42);
  --accent-soft: rgba(98, 215, 208, 0.12);
  --accent-glow: rgba(98, 215, 208, 0.2);
}

body[data-theme="ember"] {
  --bg0: #100b10;
  --bg1: #171018;
  --bg2: #241923;
  --panel0: rgba(43, 30, 39, 0.95);
  --panel1: rgba(23, 16, 24, 0.95);
  --line: rgba(217, 127, 116, 0.2);
  --line-strong: rgba(238, 169, 109, 0.34);
  --text: #fff1ec;
  --muted: #c0a8a7;
  --cyan: #73cddb;
  --purple: #ba9cff;
  --purple2: #7959d8;
  --blue: #438ed8;
  --green: #48c77e;
  --red: #ea726b;
  --gold: #f4c96a;
  --field0: #2e2028;
  --field1: #1d141b;
  --blue2: #23619e;
  --green2: #21854e;
  --red2: #a54142;
  --gold2: #ca9218;
  --gold-text: #1f1507;
  --blue-glow: rgba(67, 142, 216, 0.22);
  --green-glow: rgba(72, 199, 126, 0.22);
  --red-glow: rgba(234, 114, 107, 0.24);
  --gold-glow: rgba(244, 201, 106, 0.22);
  --bg-glow-a: rgba(234, 114, 107, 0.12);
  --bg-glow-b: rgba(186, 156, 255, 0.08);
  --surface-top: linear-gradient(180deg, rgba(23, 16, 24, 0.98), rgba(13, 9, 14, 0.98));
  --surface-menu: rgba(23, 16, 24, 0.98);
  --surface-soft: rgba(39, 28, 37, 0.7);
  --surface-muted: rgba(29, 20, 27, 0.5);
  --surface-field: linear-gradient(180deg, #2e2028, #1d141b);
  --accent-border: rgba(217, 127, 116, 0.26);
  --accent-border-strong: rgba(238, 169, 109, 0.42);
  --accent-soft: rgba(234, 114, 107, 0.12);
  --accent-glow: rgba(234, 114, 107, 0.2);
}

body[data-theme="aurora"] {
  --bg0: #06101d;
  --bg1: #0a1528;
  --bg2: #102139;
  --panel0: rgba(20, 38, 58, 0.95);
  --panel1: rgba(11, 21, 37, 0.95);
  --line: rgba(104, 180, 224, 0.2);
  --line-strong: rgba(160, 145, 232, 0.34);
  --text: #edf6ff;
  --muted: #a6b7d0;
  --cyan: #61d6f4;
  --purple: #a994ff;
  --purple2: #6550d3;
  --blue: #319bf0;
  --green: #41cfa0;
  --red: #e97086;
  --gold: #f0cf69;
  --field0: #172b47;
  --field1: #101c33;
  --blue2: #1767af;
  --green2: #1d8b68;
  --red2: #9e3f54;
  --gold2: #c79a1e;
  --gold-text: #1c1607;
  --blue-glow: rgba(49, 155, 240, 0.24);
  --green-glow: rgba(65, 207, 160, 0.22);
  --red-glow: rgba(233, 112, 134, 0.23);
  --gold-glow: rgba(240, 207, 105, 0.2);
  --bg-glow-a: rgba(97, 214, 244, 0.12);
  --bg-glow-b: rgba(169, 148, 255, 0.1);
  --surface-top: linear-gradient(180deg, rgba(10, 21, 40, 0.98), rgba(6, 12, 22, 0.98));
  --surface-menu: rgba(10, 21, 39, 0.98);
  --surface-soft: rgba(16, 33, 57, 0.7);
  --surface-muted: rgba(12, 25, 44, 0.5);
  --surface-field: linear-gradient(180deg, #172b47, #101c33);
  --accent-border: rgba(104, 180, 224, 0.26);
  --accent-border-strong: rgba(160, 145, 232, 0.42);
  --accent-soft: rgba(97, 214, 244, 0.12);
  --accent-glow: rgba(169, 148, 255, 0.2);
}

body.app-booting {
  overflow: hidden;
}

body.app-booting .app-shell {
  visibility: hidden;
}

body.app-login-required {
  overflow: hidden;
}

body.app-login-required .app-shell {
  display: none;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
}

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, var(--bg-glow-a), transparent 34%),
    radial-gradient(circle at 90% 20%, var(--bg-glow-b), transparent 32%),
    linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg0) 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

body.app-booting .boot-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.boot-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  padding: 18px 22px;
  border: 1px solid rgba(120, 145, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 32, 61, 0.96), rgba(12, 22, 43, 0.96));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.boot-logo {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 16px rgba(53, 207, 255, 0.28)) drop-shadow(0 0 18px rgba(255, 47, 149, 0.18));
}

.boot-logo svg {
  width: 38px;
  height: 38px;
}

.boot-logo.app-logo-frame {
  width: 92px;
  height: 92px;
}

.boot-card strong,
.boot-card span {
  display: block;
}

.boot-card strong {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.boot-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.boot-card.boot-card-failure {
  display: block;
  width: min(760px, calc(100vw - 32px));
  padding: 22px;
}

.boot-failure-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.boot-failure-title {
  font-size: 22px;
}

.boot-failure-message {
  max-width: 560px;
}

.boot-failure-reason {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 99, 132, 0.36);
  border-radius: 10px;
  color: #ffd6df;
  background: rgba(92, 20, 45, 0.34);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.boot-failure-report {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(120, 145, 255, 0.34);
  border-radius: 10px;
  color: #dce8ff;
  background: rgba(5, 11, 24, 0.78);
  font: 12px/1.45 Consolas, "Courier New", monospace;
}

.boot-failure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.boot-failure-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(120, 145, 255, 0.38);
  border-radius: 10px;
  color: #fff;
  background: rgba(17, 31, 59, 0.92);
  font-weight: 900;
  cursor: pointer;
}

.boot-failure-actions button.primary {
  border-color: rgba(53, 207, 255, 0.45);
  background: linear-gradient(135deg, #1ba8ff, #7b4df2);
  box-shadow: 0 12px 28px rgba(37, 142, 255, 0.24);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.app-shell {
  min-width: 0;
}

.app-version-badge {
  position: fixed;
  left: 42px;
  bottom: 10px;
  z-index: 99995;
  color: rgba(185, 205, 245, 0.42);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.app-version-badge:empty {
  display: none;
}

.game-mode-rail {
  position: fixed;
  left: 0;
  top: var(--topbar-height);
  bottom: 0;
  z-index: 80;
  width: 0;
  background: transparent;
  pointer-events: none;
}

.game-mode-rail::before {
  content: "";
  position: fixed;
  left: 0;
  top: calc(var(--topbar-height) + 42vh);
  width: 30px;
  height: 72px;
  border: 1px solid rgba(142, 166, 255, 0.36);
  border-left: 0;
  border-radius: 0 16px 16px 0;
  background:
    radial-gradient(circle at 80% 50%, rgba(72, 199, 255, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(19, 30, 58, 0.88), rgba(9, 15, 31, 0.9));
  box-shadow: 0 0 22px rgba(72, 199, 255, 0.12), inset 1px 0 0 rgba(255, 255, 255, 0.08);
  opacity: 0.86;
  transform: translateX(0);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
  pointer-events: none;
}

.game-mode-rail::after {
  content: ">>";
  position: fixed;
  left: 0;
  top: calc(var(--topbar-height) + 42vh);
  width: 30px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(72, 199, 255, 0.7);
  opacity: 0.92;
  transform: translateX(0);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

body.game-mode-rail-peek .game-mode-rail::before,
.game-mode-rail:focus-within::before,
body.game-mode-rail-peek .game-mode-rail::after,
.game-mode-rail:focus-within::after {
  opacity: 0;
  transform: translateX(-14px);
}

body.game-mode-rail-peek .game-mode-rail-list,
.game-mode-rail:hover .game-mode-rail-list,
.game-mode-rail-list:hover,
.game-mode-rail:focus-within .game-mode-rail-list {
  transform: translateX(0);
  border-color: rgba(120, 145, 255, 0.4);
  box-shadow: 16px 0 38px rgba(0, 0, 0, 0.34), inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.game-mode-rail-list::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(180deg, rgba(154, 120, 255, 0.24), rgba(72, 199, 255, 0.12));
  opacity: 0.72;
  pointer-events: none;
}

.game-mode-rail-list {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 62px;
  height: 100%;
  min-height: 100%;
  padding: 12px 8px;
  display: grid;
  align-content: start;
  gap: 8px;
  justify-items: center;
  border-right: 1px solid rgba(120, 145, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 15, 31, 0.98), rgba(8, 13, 29, 0.96)),
    var(--surface-top);
  box-shadow: 12px 0 30px rgba(0, 0, 0, 0.26), inset -1px 0 0 rgba(255, 255, 255, 0.03);
  transform: translateX(calc(-100% - 2px));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
  pointer-events: auto;
}

.game-mode-rail-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.game-mode-rail-group + .game-mode-rail-group {
  margin-top: 8px;
  padding-top: 11px;
  border-top: 1px solid rgba(120, 145, 255, 0.18);
}

.game-mode-rail-group-label {
  width: 46px;
  min-height: 10px;
  color: rgba(216, 226, 255, 0.62);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.game-mode-rail-group-control .game-mode-rail-group-label {
  color: rgba(98, 217, 255, 0.78);
}

.game-mode-rail-group-buttons {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.game-mode-rail-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 145, 255, 0.2);
  border-radius: 10px;
  color: var(--text);
  background: rgba(14, 25, 47, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.game-mode-rail-button:hover,
.game-mode-rail-button:focus-visible {
  transform: translateX(2px);
  border-color: rgba(98, 217, 255, 0.5);
  background: rgba(22, 39, 72, 0.94);
  outline: none;
}

.game-mode-rail-button.active {
  border-color: rgba(154, 120, 255, 0.72);
  background: linear-gradient(180deg, rgba(56, 43, 110, 0.92), rgba(28, 39, 76, 0.9));
  box-shadow: 0 0 22px rgba(154, 120, 255, 0.26), inset 3px 0 0 rgba(154, 120, 255, 0.95);
}

.game-mode-rail-icon,
.game-mode-rail-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.game-mode-rail-icon svg {
  overflow: visible;
}

.game-mode-rail-icon svg .stroke {
  fill: none;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px currentColor);
}

.game-mode-rail-icon svg .fill-stroke {
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px currentColor);
}

.template-rail {
  position: fixed;
  right: 0;
  top: var(--topbar-height);
  bottom: 0;
  z-index: 82;
  width: 30px;
  background: transparent;
  pointer-events: auto;
  transition: width 0.18s ease;
}

body.template-rail-peek .template-rail,
.template-rail:hover,
.template-rail:focus-within {
  width: min(360px, calc(100vw - 42px));
}

.template-rail::before {
  content: "";
  position: fixed;
  right: 0;
  top: calc(var(--topbar-height) + 42vh);
  width: 30px;
  height: 72px;
  border: 1px solid rgba(142, 166, 255, 0.36);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background:
    radial-gradient(circle at 20% 50%, rgba(154, 120, 255, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(19, 30, 58, 0.88), rgba(9, 15, 31, 0.9));
  box-shadow: 0 0 22px rgba(154, 120, 255, 0.13), inset -1px 0 0 rgba(255, 255, 255, 0.08);
  opacity: 0.86;
  transform: translateX(0);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
  pointer-events: none;
}

.template-rail::after {
  content: "<<";
  position: fixed;
  right: 0;
  top: calc(var(--topbar-height) + 42vh);
  width: 30px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(154, 120, 255, 0.7);
  opacity: 0.92;
  transform: translateX(0);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

body.template-rail-peek .template-rail::before,
.template-rail:focus-within::before,
body.template-rail-peek .template-rail::after,
.template-rail:focus-within::after {
  opacity: 0;
  transform: translateX(14px);
}

body.template-rail-peek .template-rail-panel,
.template-rail:hover .template-rail-panel,
.template-rail-panel:hover,
.template-rail:focus-within .template-rail-panel {
  transform: translateX(0);
  border-color: rgba(120, 145, 255, 0.4);
  box-shadow: -16px 0 38px rgba(0, 0, 0, 0.34), inset 1px 0 0 rgba(255, 255, 255, 0.04);
}

.template-rail-panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: min(360px, calc(100vw - 42px));
  height: 100%;
  min-height: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 1px solid rgba(120, 145, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 15, 31, 0.98), rgba(8, 13, 29, 0.96)),
    var(--surface-top);
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.26), inset 1px 0 0 rgba(255, 255, 255, 0.03);
  transform: translateX(calc(100% + 2px));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
  pointer-events: auto;
  overflow: hidden;
}

.template-rail-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(180deg, rgba(154, 120, 255, 0.24), rgba(72, 199, 255, 0.12));
  opacity: 0.72;
  pointer-events: none;
}

.template-rail-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  padding: 10px 10px 12px 12px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 10px;
  background: rgba(14, 25, 47, 0.72);
}

.template-rail-kicker {
  display: block;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.template-mode-head strong,
.template-row-copy strong {
  color: #fff;
  font-weight: 950;
  line-height: 1.15;
}

.template-mode-head small,
.template-row-copy small,
.template-row-copy em,
.template-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.template-row-copy em {
  display: none;
  font-style: normal;
}

.template-new-button {
  width: 100%;
  min-height: 40px;
}

.template-rail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.template-rail-actions .btn,
.template-rail-head .btn {
  min-width: 0;
}

.template-rail-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.template-mode-group {
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 17, 35, 0.58);
  overflow: hidden;
}

.template-mode-group.current {
  border-color: rgba(154, 120, 255, 0.46);
  box-shadow: 0 0 18px rgba(154, 120, 255, 0.14);
}

.template-mode-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(120, 145, 255, 0.14);
}

.template-mode-icon,
.template-mode-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.template-mode-icon svg {
  overflow: visible;
}

.template-mode-icon svg .stroke {
  fill: none;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px currentColor);
}

.template-mode-icon svg .fill-stroke {
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px currentColor);
}

.template-mode-new,
.template-row-delete {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 145, 255, 0.22);
  border-radius: 8px;
  background: rgba(14, 25, 47, 0.72);
  color: var(--cyan);
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
}

.template-row-delete {
  color: var(--red);
}

.template-row-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.template-mode-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  gap: 7px;
}

.template-row-main {
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(14, 25, 47, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.template-row-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.template-row-copy strong,
.template-row-copy small,
.template-row-copy em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-row-game-icon {
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid rgba(120, 145, 255, 0.22);
  border-radius: 8px;
  background: rgba(4, 11, 24, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.template-row-game-icon svg {
  width: 26px;
  height: 26px;
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.template-row-game-icon img,
.game-mode-rail-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.template-row.active .template-row-main,
.template-row.remembered .template-row-main {
  border-color: rgba(154, 120, 255, 0.62);
  background: linear-gradient(180deg, rgba(56, 43, 110, 0.92), rgba(28, 39, 76, 0.9));
  box-shadow: 0 0 18px rgba(154, 120, 255, 0.18), inset 3px 0 0 rgba(154, 120, 255, 0.95);
}

.template-row-main:hover,
.template-row-main:focus-visible,
.template-mode-new:hover,
.template-mode-new:focus-visible,
.template-row-delete:hover,
.template-row-delete:focus-visible {
  border-color: rgba(98, 217, 255, 0.5);
  background: rgba(22, 39, 72, 0.94);
  outline: none;
}

.template-empty {
  padding: 11px 10px;
  border: 1px dashed rgba(120, 145, 255, 0.2);
  border-radius: 8px;
  background: rgba(14, 25, 47, 0.36);
}

.template-empty-global {
  margin: 4px 2px;
}

.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(8, 15, 31, 0.98), rgba(6, 11, 22, 0.98));
  border-bottom: 1px solid rgba(120, 145, 255, 0.13);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 222px;
}

.brand-copy {
  min-width: 0;
}

.brand-wordmark {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-wordmark .brand-title,
.brand-wordmark .brand-subtitle {
  display: block;
}

.brand-wordmark:hover .brand-title,
.brand-wordmark:focus-visible .brand-title,
.brand-wordmark.active .brand-title {
  color: #fff;
  text-shadow: 0 0 14px rgba(126, 168, 255, 0.34);
}

.brand-wordmark:focus-visible {
  outline: 2px solid rgba(126, 168, 255, 0.72);
  outline-offset: 4px;
  border-radius: 6px;
}

.brand-icon,
.icon-box {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  position: relative;
  z-index: 1;
}

.data-icon-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-title {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand-subtitle {
  color: #b9c7e6;
  font-size: 12px;
  margin-top: 2px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9aa9c7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}

.status-pill.online {
  color: var(--text);
}

.status-pill.online .status-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}



/* styles/topbar_auth.css */
.top-server-status {
  min-width: 190px;
  max-width: 482px;
  height: 40px;
  flex: 1 1 360px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 11px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 35, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}

.top-server-status .status-dot {
  flex: none;
}

.top-server-status.online .status-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}

.top-server-status.starting .status-dot {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.top-server-status.stopping .status-dot {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.top-server-status.offline .status-dot {
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}

.top-server-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}

.top-server-label {
  color: #96a8ce;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.top-server-copy strong {
  color: #edf4ff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-server-picker {
  min-width: 0;
  height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.top-server-status.gta-bridge-status .top-server-picker {
  cursor: default;
  opacity: 1;
}

.top-server-status.gta-bridge-status.missing-folder .top-server-label,
.top-server-status.gta-bridge-status.not-installed .top-server-label {
  color: #ff8da4;
}

.top-server-status.gta-bridge-status.installed-offline .top-server-label {
  color: #ffd25c;
}

.top-server-picker:focus-visible {
  outline: 2px solid rgba(98, 217, 255, 0.72);
  outline-offset: 2px;
  border-radius: 6px;
}

.top-server-chevron {
  flex: none;
  color: #9ba9cd;
  font-size: 11px;
  transition: transform 0.14s ease;
}

.top-server-status.menu-open .top-server-chevron {
  transform: rotate(180deg);
}

.top-server-toggle {
  height: 28px;
  min-width: 64px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 950;
}

.top-server-create {
  width: 30px;
  min-width: 30px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-server-settings {
  width: 34px;
  min-width: 34px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-server-settings-icon,
.top-server-settings-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.top-server-settings-icon svg .stroke,
.top-server-settings-icon svg .fill-stroke,
.top-action-gear svg .fill-stroke {
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-server-plus {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-block;
}

.top-server-plus::before,
.top-server-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.top-server-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.top-server-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 120;
  width: min(440px, calc(100vw - 24px));
  max-height: 340px;
  padding: 10px;
  border: 1px solid rgba(120, 145, 255, 0.28);
  border-radius: 10px;
  background: rgba(8, 17, 35, 0.98);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.top-server-settings-menu {
  position: fixed;
  left: var(--top-server-settings-left, 12px);
  top: var(--top-server-settings-top, 86px);
  right: auto;
  z-index: 130;
  width: var(--top-server-settings-width, min(980px, calc(100vw - 24px)));
  max-height: var(--top-server-settings-max-height, min(760px, calc(100vh - 88px)));
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 10px;
  border: 1px solid rgba(120, 145, 255, 0.28);
  border-radius: 10px;
  background: rgba(8, 17, 35, 0.98);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.top-server-settings-menu[hidden] {
  display: none !important;
}

.top-server-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.top-server-settings-panel {
  margin: 0;
  border-radius: 8px;
  background: rgba(8, 17, 35, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gta-bridge-top-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 14, 29, 0.99);
}

.gta-bridge-top-settings[hidden] {
  display: none !important;
}

.gta-bridge-top-note {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(72, 199, 255, 0.2);
  border-radius: 8px;
  background: rgba(10, 27, 54, 0.62);
}

.gta-bridge-top-note strong {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.gta-bridge-top-note span {
  color: #b9c9ec;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.gta-bridge-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.gta-bridge-top-dir {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 8px;
  margin: 0;
}

.gta-bridge-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gta-bridge-top-actions .btn {
  min-height: 36px;
}

@media (max-width: 760px) {
  .gta-bridge-top-grid,
  .gta-bridge-top-dir {
    grid-template-columns: 1fr;
  }

  .gta-bridge-top-actions .btn {
    flex: 1 1 150px;
  }
}

.top-server-menu[hidden] {
  display: none !important;
}

.top-server-menu-head {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.top-server-menu-list {
  display: grid;
  gap: 7px;
  max-height: 262px;
  overflow: auto;
  padding-right: 3px;
}

.top-server-profile-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.9), rgba(16, 26, 49, 0.9));
  cursor: pointer;
}

.top-server-profile-row.active {
  border-color: rgba(116, 84, 244, 0.7);
  box-shadow: inset 3px 0 0 rgba(116, 84, 244, 0.9);
}

.top-server-profile-row:focus-visible {
  outline: 2px solid rgba(98, 217, 255, 0.72);
  outline-offset: 2px;
}

.top-server-profile-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.top-server-profile-copy strong {
  min-width: 0;
  color: #eef4ff;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-server-profile-copy span,
.top-server-profile-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.top-server-profile-delete {
  width: 30px;
  height: 30px;
  justify-self: end;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: none;
}

.subscription-button {
  min-width: 112px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #dce6ff;
  background: linear-gradient(180deg, rgba(23, 38, 74, 0.96), rgba(13, 25, 50, 0.96));
  border: 1px solid rgba(120, 145, 255, 0.34);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.subscription-button:hover {
  border-color: rgba(72, 199, 255, 0.62);
  box-shadow: 0 0 18px rgba(72, 199, 255, 0.12);
}

.subscription-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 999px;
  background: #f46b86;
  box-shadow: 0 0 12px rgba(244, 107, 134, 0.55);
}

.subscription-button.subscription-active .subscription-dot {
  background: #2edf83;
  box-shadow: 0 0 14px rgba(46, 223, 131, 0.55);
}

.subscription-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
  line-height: 1;
}

.subscription-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.subscription-copy strong {
  color: #f2f6ff;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(120, 145, 255, 0.18);
}

.top-action {
  width: 42px;
  height: 38px;
  min-width: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  line-height: 1;
}

.top-action-start {
  width: auto;
  min-width: 86px;
  padding: 0 13px;
}

.top-action-label {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.top-action .play,
.top-action .save,
.top-action .stop,
.top-action .refresh {
  margin-right: 0;
  flex: none;
}

.top-action-gear {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dce6ff;
}

.top-action-gear svg {
  width: 18px;
  height: 18px;
  overflow: visible;
}

.top-action-gear svg .stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inline-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.profile-label {
  margin-left: 18px;
}

.game-mode-label {
  margin-left: 0;
}

.game-mode-select {
  min-width: 150px;
  max-width: 190px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.radio-pill.active {
  background: linear-gradient(180deg, rgba(39, 49, 86, 0.92), rgba(23, 33, 62, 0.9));
  border: 1px solid rgba(152, 136, 255, 0.22);
}

.radio-pill input {
  accent-color: var(--purple);
}

.layout {
  display: grid;
  grid-template-columns: var(--main-column);
  gap: 16px;
  width: fit-content;
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  padding: 14px 16px 26px;
  overflow: hidden;
}

.options-collapsed .layout {
  grid-template-columns: var(--main-column);
  justify-content: center;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  width: var(--main-column);
}

@media (max-width: 1094px) {
  :root {
    --main-column: calc(100vw - 44px);
  }

  .layout {
    max-width: calc(100vw - 20px);
    padding-left: 10px;
    padding-right: 10px;
  }
}

.panel {
  background: linear-gradient(180deg, var(--panel0), var(--panel1));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow:
    0 12px 40px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
  margin-bottom: 4px;
  min-width: 0;
}

.server-panel {
  padding-bottom: 18px;
}

.compact {
  padding-bottom: 13px;
}

.side-panel {
  position: fixed;
  top: var(--options-panel-top, 74px);
  right: var(--options-panel-right, 18px);
  z-index: 95;
  align-self: auto;
  width: min(var(--side-column), calc(100vw - 24px));
  min-width: 0;
  max-height: var(--options-panel-max-height, calc(100vh - var(--options-panel-top, 74px) - 12px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  transform-origin: calc(100% - var(--options-panel-arrow-right, 21px)) top;
  animation: options-popover-in 0.14s ease-out;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg2), var(--bg0));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), 0 0 28px rgba(116, 84, 244, 0.14);
}

.side-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: calc(var(--options-panel-arrow-right, 21px) - 6px);
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel0), var(--panel1));
  transform: rotate(45deg);
  box-shadow: -3px -3px 12px rgba(0, 0, 0, 0.18);
}

@keyframes options-popover-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.startup-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 12%, var(--bg-glow-a), transparent 32%),
    radial-gradient(circle at 88% 20%, var(--bg-glow-b), transparent 34%),
    linear-gradient(135deg, rgba(5, 9, 20, 0.98), rgba(7, 13, 28, 0.98) 48%, rgba(5, 9, 20, 0.98));
}

.startup-auth-overlay[hidden] {
  display: none;
}

.startup-auth-card {
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(13, 24, 48, 0.96), rgba(7, 14, 30, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 0 44px rgba(154, 120, 255, 0.16);
}

.startup-auth-brand {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: center;
}

.startup-auth-logo {
  width: 86px;
  height: 86px;
  border-radius: 20px;
}

.startup-auth-kicker {
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.startup-auth-card h1 {
  margin: 4px 0;
  font-size: 30px;
  line-height: 1.05;
}

.startup-auth-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.startup-auth-card label:not(.check-row) {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.startup-auth-remember {
  justify-content: flex-start;
  margin-top: 2px;
}

.startup-auth-error {
  padding: 12px 14px;
  border: 1px solid rgba(229, 101, 115, 0.48);
  border-radius: 12px;
  background: rgba(105, 34, 48, 0.28);
  color: #ffd9df;
  font-weight: 850;
}

.startup-auth-actions {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
}

.startup-auth-actions .btn {
  min-height: 48px;
}

.startup-auth-links {
  justify-content: center;
  margin-top: 0;
}



/* styles/forms_workspace.css */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(154, 120, 255, 0.35);
}

.section-title > .icon-box {
  margin-right: 2px;
}

.section-title.cyan {
  color: var(--cyan);
}

.section-title.purple {
  color: var(--purple);
}

.section-title.gold {
  color: var(--gold);
}

.section-title:has(.icon-box[data-icon="gear"]),
.section-title:has(.icon-box[data-icon="server"]),
.section-title:has(.icon-box[data-icon="tools"]),
.section-title:has(.icon-box[data-icon="share"]),
.top-action-gear,
.top-server-settings-icon {
  color: var(--cyan);
}

.section-title:has(.icon-box[data-icon="coin"]),
.section-title:has(.icon-box[data-icon="subscribe"]) {
  color: var(--gold);
}

.section-title:has(.icon-box[data-icon="spotify"]) {
  color: var(--green);
}

.section-title:has(.icon-box[data-icon="heart"]),
.section-title:has(.icon-box[data-icon="youtube"]) {
  color: var(--red);
}

.section-title:has(.icon-box[data-icon="follow"]),
.section-title:has(.icon-box[data-icon="gift"]),
.section-title:has(.icon-box[data-icon="gamepad"]),
.section-title:has(.icon-box[data-icon="target"]),
.section-title:has(.icon-box[data-icon="cube"]) {
  color: var(--purple);
}

.icon-box svg,
.brand-icon svg {
  width: 30px;
  height: 30px;
  overflow: visible;
}

.icon-box svg .stroke,
.brand-icon svg .stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px currentColor);
}

.icon-box svg .fill-stroke,
.brand-icon svg .fill-stroke {
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px currentColor);
}

.section-drag-handle {
  cursor: grab;
  user-select: none;
}

.section-drag-handle:active {
  cursor: grabbing;
}

.panel.section-dragging {
  opacity: 1;
  transform: none;
  border-color: rgba(190, 170, 255, 0.72);
  box-shadow:
    0 30px 68px rgba(0, 0, 0, 0.58),
    0 0 48px rgba(154, 120, 255, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.panel.section-floating-drag {
  margin: 0;
  overflow: hidden;
}

.section-drag-placeholder {
  width: 100%;
  margin-bottom: 10px;
  border: 1px dashed rgba(154, 120, 255, 0.45);
  border-radius: 12px;
  background: rgba(42, 28, 86, 0.18);
  box-shadow: inset 0 0 24px rgba(154, 120, 255, 0.1);
}

.app-main > .panel {
  transition:
    transform 190ms cubic-bezier(.2,.8,.2,1),
    box-shadow 190ms ease,
    outline-color 150ms ease,
    opacity 190ms ease,
    border-color 190ms ease;
}

.server-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(210px, 1fr) minmax(110px, 0.55fr) minmax(150px, 190px);
  gap: 12px 28px;
  align-items: end;
}

.server-grid label,
.server-grid .check-row {
  min-width: 0;
}

.server-grid label .input,
.server-grid label .select {
  display: block;
  width: 100%;
  margin: 6px 0 0;
}

.server-grid label .native-select-wrap {
  display: block;
  width: 100%;
  margin: 6px 0 0;
}

.server-grid .btn {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

label .input,
label .select,
label .textarea {
  margin-left: 8px;
}

.input,
.select,
.textarea {
  height: 34px;
  color: var(--text);
  background: linear-gradient(180deg, var(--field0), var(--field1));
  border: 1px solid rgba(132, 153, 210, 0.22);
  border-radius: 6px;
  padding: 7px 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  outline: none;
}

.select,
select {
  color-scheme: dark;
}

.select option,
select option {
  color: #e8efff;
  background-color: #101a31;
}

.select option:checked,
select option:checked {
  color: #ffffff;
  background-color: #6544de;
}

.select option:hover,
select option:hover,
.select option:focus,
select option:focus {
  color: #ffffff;
  background-color: #24365f;
}

.select option:disabled,
select option:disabled {
  color: rgba(216, 226, 255, 0.45);
  background-color: #0b1224;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(154, 120, 255, 0.65);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(154, 120, 255, 0.12);
}

.search-select {
  position: relative;
  min-width: 0;
}

.search-select.open {
  z-index: 10000;
}

.search-select.value-not-used {
  visibility: hidden;
  pointer-events: none;
}

.search-select.value-not-used .search-select-menu {
  display: none !important;
}

label .search-select {
  margin-left: 8px;
}

.table .search-select,
.random-list-row .search-select {
  width: 100%;
  margin-left: 0;
}

.search-select-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  cursor: pointer;
  text-align: left;
}

.search-select-button::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #cfd8ec;
  flex: none;
}

.search-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 10000;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(132, 153, 210, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, #17233d 0%, #0d1629 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(154, 120, 255, 0.16);
}

.search-select.open-up .search-select-menu {
  top: auto;
  bottom: calc(100% + 5px);
}

.search-select-filter {
  width: 100%;
  margin-bottom: 7px;
}

.search-select-category {
  width: 100%;
  min-height: 34px;
  margin-bottom: 7px;
}

.search-select-options {
  max-height: 230px;
  overflow: auto;
  contain: layout paint;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}

.search-select-options.virtualized {
  position: relative;
}

.search-select-virtual-spacer {
  position: relative;
  min-height: 0;
}

.search-select-option {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e8efff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  contain: layout paint;
}

.search-select-options.virtualized .search-select-option {
  position: absolute;
  left: 0;
  right: 0;
}

.search-select-options.virtualized .search-select-option + .search-select-option {
  margin-top: 0;
}

.search-select-option > span:last-child,
.value-option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.value-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.value-option-text strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 13px;
}

.value-option-text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(216, 226, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
}

.value-option-category {
  display: inline-flex;
  align-items: center;
  align-self: center;
  max-width: 96px;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(132, 153, 210, 0.24);
  border-radius: 999px;
  background: rgba(7, 13, 27, 0.55);
  color: rgba(232, 239, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-option:hover,
.search-select-option.selected {
  background: rgba(101, 68, 222, 0.62);
  color: #fff;
}

.native-select-wrap {
  position: relative;
  display: inline-block;
  min-width: 0;
  vertical-align: middle;
}

.native-select-wrap.open {
  z-index: 940;
}

label .native-select-wrap {
  margin-left: 8px;
}

label:not(:has(> .check)) > :is(.input, .select, .textarea, .search-select, .native-select-wrap) {
  margin-left: 0;
}

.native-select-source {
  position: absolute !important;
  left: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.native-select-button {
  width: 100%;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
}

.native-select-button::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #cfd8ec;
  flex: none;
}

.native-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.native-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 940;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(132, 153, 210, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, #17233d, #0d1629);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(154, 120, 255, 0.08);
}

.native-select-wrap.open-up .native-select-menu {
  top: auto;
  bottom: calc(100% + 5px);
}

.native-select-filter {
  width: 100%;
  margin-left: 0 !important;
  margin-bottom: 7px;
}

.native-select-filter[hidden] {
  display: none;
}

.native-select-options {
  max-height: 230px;
  overflow: auto;
}

.native-select-option {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e8efff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.native-select-option-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.native-select-option-row .native-select-option {
  flex: 1 1 auto;
  min-width: 0;
}

.native-select-delete {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 112, 143, 0.42);
  border-radius: 6px;
  background: rgba(255, 82, 126, 0.14);
  color: #ff8da0;
  cursor: pointer;
}

.native-select-delete:hover {
  border-color: rgba(255, 112, 143, 0.78);
  background: rgba(255, 82, 126, 0.28);
  color: #ffd6df;
}

.native-select-delete svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.native-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.native-select-option:hover,
.native-select-option.selected {
  background: rgba(101, 68, 222, 0.62);
  color: #fff;
}

.native-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.value-rich-select .search-select-button {
  min-height: 58px;
  height: auto;
  padding: 6px 11px;
  min-width: 0;
  overflow: hidden;
}

.value-visual.large {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 10px;
}

.value-visual.option {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  font-size: 8px;
}

.value-rich-select .search-select-option {
  height: 56px;
  min-height: 56px;
  overflow: hidden;
  padding: 6px 9px;
}

.value-rich-select .search-select-option .value-visual.option {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
}

.value-rich-select .search-select-option .value-visual.kind-item img {
  padding: 3px;
  transform: none;
}

.value-rich-select .search-select-option .value-option-text {
  flex: 1 1 auto;
  max-width: calc(100% - 46px);
  line-height: 1.05;
}

.value-rich-select .search-select-option .value-option-text strong,
.value-rich-select .search-select-option .value-option-text small {
  max-width: 100%;
  line-height: 1.1;
}

.gift-select {
  position: relative;
  min-width: 0;
}

.gift-select.open {
  z-index: 930;
}

.gift-select-button {
  width: 100%;
  min-height: 58px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
}

.gift-select-button::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #cfd8ec;
  flex: none;
}

.gift-select-text,
.gift-option-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gift-select-text strong,
.gift-option-text strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f5f8ff;
  font-size: 13px;
}

.gift-select-text .gift-native-name,
.gift-option-text .gift-native-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(216, 226, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.gift-select-text > span,
.gift-option-text > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(216, 226, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
}

.gift-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 910;
  min-width: 285px;
  padding: 8px;
  border: 1px solid rgba(132, 153, 210, 0.35);
  border-radius: 9px;
  background: linear-gradient(180deg, #17233d, #0d1629);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(154, 120, 255, 0.1);
}

.gift-select.open-up .gift-select-menu {
  top: auto;
  bottom: calc(100% + 5px);
}

.gift-select.gift-loading-pending .gift-select-menu {
  visibility: hidden;
}

.gift-select-filter {
  width: 100%;
  margin-bottom: 8px;
}

.gift-select-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}

.gift-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.gift-select-chip {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(132, 153, 210, 0.28);
  border-radius: 999px;
  background: rgba(7, 13, 27, 0.7);
  color: rgba(232, 239, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.gift-select-chip:hover,
.gift-select-chip.active {
  border-color: rgba(56, 197, 255, 0.62);
  background: linear-gradient(135deg, rgba(111, 77, 239, 0.9), rgba(27, 141, 224, 0.92));
  color: #fff;
}

.gift-select-hide-used,
.gift-select-show-unavailable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: rgba(232, 239, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.gift-select-hide-used input,
.gift-select-show-unavailable input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.gift-select-options {
  max-height: 320px;
  overflow: auto;
  contain: layout paint;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}

.gift-select-options.virtualized {
  position: relative;
}

.gift-select-virtual-spacer {
  position: relative;
  min-height: 0;
}

.gift-select-option {
  box-sizing: border-box;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #e8efff;
  text-align: left;
  cursor: pointer;
  contain: layout paint;
}

.gift-select-options.virtualized .gift-select-option {
  position: absolute;
  left: 0;
  right: 0;
}

.gift-select-options.virtualized .gift-select-option + .gift-select-option {
  margin-top: 0;
}

.gift-select-option:hover,
.gift-select-option.selected {
  background: rgba(101, 68, 222, 0.62);
  color: #fff;
}

.gift-select-option.gift-already-assigned {
  box-shadow: inset 0 0 0 1px rgba(255, 212, 59, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 212, 59, 0.1), rgba(255, 172, 60, 0.04)),
    transparent;
}

.gift-select-option.gift-already-assigned:hover,
.gift-select-option.gift-already-assigned.selected {
  background:
    linear-gradient(180deg, rgba(255, 212, 59, 0.16), rgba(255, 172, 60, 0.08)),
    rgba(101, 68, 222, 0.62);
}

.gift-assigned-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(255, 212, 59, 0.42);
  border-radius: 999px;
  background: rgba(255, 212, 59, 0.13);
  color: #ffe07d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.gift-select.gift-unavailable .gift-select-button,
.gift-select-option.unavailable,
.gift-unavailable-row {
  border-color: rgba(255, 96, 126, 0.62);
  background:
    linear-gradient(180deg, rgba(72, 22, 42, 0.42), rgba(22, 12, 28, 0.32)),
    linear-gradient(180deg, rgba(23, 35, 61, 0.88), rgba(16, 26, 49, 0.88));
  box-shadow: 0 0 0 1px rgba(255, 96, 126, 0.2), 0 0 18px rgba(255, 70, 108, 0.12);
}

.gift-select-option.unavailable:hover,
.gift-select-option.unavailable.selected {
  background:
    linear-gradient(180deg, rgba(148, 42, 70, 0.76), rgba(75, 24, 47, 0.72));
}

.gift-thumb.unavailable {
  border-color: rgba(255, 96, 126, 0.72);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06), 0 0 16px rgba(255, 80, 118, 0.36);
}

.gift-thumb.unavailable img {
  filter: grayscale(0.45) saturate(0.82) brightness(0.82);
}

.gift-unavailable-note {
  color: #ff8ba0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-gift-assignment-hint {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 212, 59, 0.34);
  border-radius: 8px;
  background: rgba(255, 212, 59, 0.09);
  color: #ffe07d;
  font-size: 12px;
  font-weight: 900;
}

.gift-availability-warning {
  display: grid;
  gap: 4px;
  margin: -2px 0 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 96, 126, 0.52);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(74, 24, 46, 0.74), rgba(31, 13, 27, 0.68));
  color: #ffdbe1;
  box-shadow: 0 0 18px rgba(255, 80, 118, 0.16);
}

.gift-availability-warning[hidden] {
  display: none;
}

.gift-availability-warning strong {
  color: #ff8ba0;
  font-size: 12px;
  font-weight: 1000;
}

.gift-availability-warning span {
  color: #ffdbe1;
  font-size: 12px;
  font-weight: 800;
}

.gift-thumb {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: none;
  overflow: hidden;
  border-radius: 11px;
  border: 1px solid rgba(132, 153, 210, 0.28);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(28, 40, 73, 0.96), rgba(12, 21, 40, 0.96));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06), 0 0 14px rgba(154, 120, 255, 0.18);
  color: #dce6ff;
  font-size: 12px;
  font-weight: 900;
}

.gift-thumb.small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.gift-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  position: relative;
  z-index: 1;
}

.gift-thumb span {
  display: none;
}

.gift-thumb.missing span {
  display: inline;
}

.gift-thumb.missing img {
  display: none;
}

.coin-dot {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd15e, #e49c13);
  color: #593a00;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 0 8px rgba(255, 193, 69, 0.25);
}

.search-select-empty {
  padding: 7px 8px;
  color: rgba(216, 226, 255, 0.68);
  font-size: 12px;
}

.value-visual {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(132, 153, 210, 0.32);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 30%, rgba(154, 120, 255, 0.24), rgba(15, 27, 51, 0.92));
  color: #dce6ff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05), 0 0 12px rgba(116, 84, 244, 0.12);
}

.value-visual.small {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 8px;
}

.value-visual.chip {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.value-visual.roulette {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  font-size: 11px;
}

.value-visual.kind-effect {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(69, 204, 255, 0.26), rgba(15, 27, 51, 0.94));
}

.value-visual.kind-sound {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(53, 207, 255, 0.24), rgba(15, 27, 51, 0.94));
}

.value-visual.kind-visual {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.2), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(154, 120, 255, 0.3), rgba(15, 27, 51, 0.94));
}

.value-visual.kind-mouse {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(98, 217, 255, 0.22), rgba(15, 27, 51, 0.94));
}

.value-visual.kind-http {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(53, 207, 255, 0.28), rgba(15, 27, 51, 0.94));
}

.value-visual.kind-item {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 50% 60%, rgba(53, 207, 255, 0.18), rgba(15, 27, 51, 0.94));
}

.value-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  position: relative;
  z-index: 1;
}

.brand-icon.app-logo-frame {
  width: 62px;
  height: 50px;
  border-radius: 10px;
}

.topbar .brand-icon.app-logo-frame .app-logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform: none;
}

.app-logo-frame {
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.app-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.value-visual.layered-visual img {
  position: absolute;
  inset: 0;
}

.value-visual.layered-visual .value-visual-bg {
  z-index: 0;
  padding: 0;
  object-fit: cover;
  opacity: 0.92;
}

.value-visual.layered-visual .value-visual-main {
  z-index: 1;
}

.value-visual.kind-effect img {
  padding: 1px;
  image-rendering: pixelated;
}

.value-visual.kind-item img {
  padding: 4px;
  image-rendering: pixelated;
  transform: none;
}

.value-visual.kind-effect.roulette img {
  padding: 0;
  transform: scale(1.22);
}

.value-visual.kind-item.roulette img {
  padding: 3px;
  transform: none;
}

.value-visual span {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2px;
  text-align: center;
}

.value-visual.missing img {
  display: none;
}

.value-visual.missing span {
  display: flex;
}

.textarea {
  height: 64px;
  width: 100%;
  resize: vertical;
  line-height: 1.35;
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.small {
  width: 80px;
}

.xs {
  width: 86px;
}

.tiny {
  width: 130px;
  height: 30px;
  padding: 4px 8px;
}

.tiny-input {
  width: 46px;
  height: 28px;
  padding: 4px 8px;
}

.medium {
  width: 170px;
}

.wide {
  width: 190px;
}

.full {
  width: 100%;
}

.profile-select {
  width: 128px;
}

.language-select {
  width: 112px;
  height: 32px;
}

.native-select-wrap.language-select .native-select-button {
  height: 32px;
}

.native-select-wrap.tiny .native-select-button {
  height: 30px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 0 2px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 168, 255, 0.48) rgba(10, 18, 36, 0.46);
}

.workspace-tabs::-webkit-scrollbar {
  height: 7px;
}

.workspace-tabs::-webkit-scrollbar-track {
  background: rgba(10, 18, 36, 0.46);
  border-radius: 999px;
}

.workspace-tabs::-webkit-scrollbar-thumb {
  background: rgba(126, 168, 255, 0.48);
  border-radius: 999px;
}

.workspace-tab {
  flex: 1 0 0;
  min-width: 160px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(120, 145, 255, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(26, 39, 72, 0.88), rgba(12, 22, 43, 0.94));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.workspace-tab:hover {
  border-color: rgba(154, 120, 255, 0.42);
  filter: brightness(1.06);
}

.workspace-tab span {
  display: block;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.workspace-tab small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.workspace-tab.active {
  border-color: rgba(190, 170, 255, 0.42);
  background:
    radial-gradient(circle at 18% 0%, rgba(72, 199, 255, 0.22), transparent 42%),
    linear-gradient(180deg, #7654f4, #4d2cc7);
  box-shadow:
    0 0 22px rgba(116, 84, 244, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.workspace-tab.active small {
  color: rgba(255, 255, 255, 0.78);
}

.workspace-empty-state {
  min-height: 260px;
  align-content: start;
}

.workspace-empty-body {
  display: grid;
  gap: 12px;
  max-width: 560px;
  padding: 6px 4px 10px 46px;
}

.workspace-empty-body p {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.workspace-empty-body small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.workspace-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.workspace-empty-actions .btn {
  min-width: 220px;
}

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

.tab-visibility-panel {
  padding-top: 12px;
  padding-bottom: 12px;
}

.tab-visibility-panel .section-title {
  margin-bottom: 10px;
}

.tab-visibility-panel .section-chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}



/* styles/community.css */
.community-panel {
  width: min(1280px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 12px;
  gap: 14px;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(690px, 1fr) minmax(318px, 360px);
  gap: 14px;
  align-items: start;
}

.community-main-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.community-news-bar,
.community-live-card,
.community-requests-panel {
  padding: 12px;
  border: 1px solid rgba(120, 145, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 27, 50, 0.78), rgba(7, 14, 29, 0.76)),
    rgba(6, 13, 28, 0.62);
}

.community-news-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 12px;
}

.community-news-bar strong,
.community-live-card h3,
.community-requests-panel h3 {
  margin: 0;
  color: #f4f7ff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.community-news-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-news-filter span {
  min-width: 156px;
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 7px;
  background: rgba(5, 12, 26, 0.76);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.community-news-filter span i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, #ef3b31 0 34%, transparent 36%),
    conic-gradient(#e02d28 0 25%, #292929 0 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.community-live-card {
  min-height: 530px;
}

.community-live-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(360px, 1.22fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.community-live-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.community-live-stats span {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: rgba(5, 12, 26, 0.56);
  color: #fff;
  font-weight: 850;
}

.community-live-stats strong {
  color: #ffb000;
}

.community-live-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
}

.community-live-filters label,
.community-request-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.community-live-status {
  margin-bottom: 10px;
}

.community-discord-status,
.community-empty,
.community-live-status {
  padding: 10px 12px;
  border: 1px dashed rgba(120, 145, 255, 0.22);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(7, 14, 29, 0.34);
}

.community-empty.error {
  color: #ffd0d7;
  border-color: rgba(229, 101, 115, 0.42);
  background: rgba(229, 101, 115, 0.1);
}

.roblox-pairing-panel {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(74, 199, 255, 0.28);
  border-radius: 8px;
  background: rgba(5, 18, 38, 0.62);
  color: #cfe5ff;
}

.roblox-pairing-panel strong {
  color: #35cfff;
  font-weight: 950;
}

.roblox-pairing-panel span {
  color: #9fb2cf;
  font-weight: 800;
}

.roblox-pairing-panel.online {
  border-color: rgba(43, 222, 133, 0.42);
  background: rgba(10, 44, 36, 0.5);
}

.roblox-pairing-panel.online strong {
  color: #52ffa8;
}

.roblox-pairing-panel.warn {
  border-color: rgba(255, 194, 71, 0.42);
  background: rgba(48, 36, 10, 0.44);
}

.roblox-pairing-panel.error {
  border-color: rgba(255, 106, 132, 0.5);
  background: rgba(54, 13, 27, 0.48);
}

.community-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(204px, 1fr));
  gap: 10px;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.community-live-streamer {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 82px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(183, 85, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(35, 40, 52, 0.74), rgba(16, 19, 27, 0.78)),
    rgba(18, 20, 26, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.community-live-streamer.live-plan-pro {
  border-color: rgba(255, 180, 40, 0.82);
}

.community-live-streamer.live-plan-plus {
  border-color: rgba(72, 199, 255, 0.72);
}

.community-live-avatar,
.community-author-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.community-live-avatar {
  width: 52px;
  height: 52px;
}

.community-live-avatar img,
.community-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-live-avatar span,
.community-author-avatar span {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.community-live-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.community-live-info strong,
.community-live-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-live-info strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.community-live-info span {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.community-live-info b {
  color: #9df0ff;
}

.community-platform-badge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #050505;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.community-viewers strong {
  color: #ffb000;
}

.community-plan-badge {
  position: absolute;
  left: 18px;
  bottom: 6px;
  min-width: 38px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c26dff, #8d45df);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.community-requests-panel {
  position: sticky;
  top: 82px;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  gap: 10px;
  max-height: calc(100vh - 112px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 31, 48, 0.94), rgba(7, 12, 21, 0.96)),
    rgba(6, 13, 28, 0.9);
}

.community-requests-head {
  display: grid;
  gap: 9px;
}

.community-requests-head .btn,
.community-create-actions .btn {
  width: 100%;
}

.community-create-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 8px;
}

.community-create-actions .btn {
  min-height: 38px;
}

.community-create-actions .btn-blue {
  font-size: 14px;
}

.community-request-form {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(120, 145, 255, 0.22);
  border-radius: 8px;
  background: rgba(5, 12, 26, 0.42);
}

.community-request-form small {
  min-height: 18px;
  color: var(--muted);
}

.community-request-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.community-filter-field {
  display: grid;
  min-width: 0;
}

.community-filter-field.wide {
  grid-column: 1 / -1;
}

.community-filter-field span {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.community-filter-field .select {
  min-width: 0;
  width: 100%;
}

.community-search {
  min-height: 38px;
}

.community-request-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.community-list {
  display: grid;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  align-content: start;
}

.community-suggestion {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 20, 26, 0.94), rgba(8, 10, 14, 0.94)),
    rgba(8, 10, 14, 0.86);
  border: 1px solid rgba(120, 145, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.community-author-column {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.community-author-avatar {
  width: 42px;
  height: 42px;
}

.community-author {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-weight: 950;
}

.community-author-plan {
  min-width: 34px;
  max-width: 50px;
  min-height: 16px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(120, 145, 255, 0.22);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.community-author-plan.plan-pro {
  background: linear-gradient(180deg, #ffbf3d, #a56a09);
  color: #1b1200;
}

.community-author-plan.plan-plus,
.community-author-plan.plan-basic {
  background: linear-gradient(180deg, #46d5ff, #176ebf);
}

.community-suggestion-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.community-suggestion-head {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.community-short-id {
  flex: 0 0 auto;
  color: #8da0bd;
  font-size: 10px;
  font-weight: 900;
}

.community-suggestion-body > strong {
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.community-suggestion-body p {
  margin: 0;
  color: #f4f7ff;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.32;
}

.community-status {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  border: 0;
  color: #aeb8cf;
  background: transparent;
  font-size: 10px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.community-status-emoji {
  font-size: 12px;
  line-height: 1;
}

.community-type {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(72, 199, 255, 0.35);
  border-radius: 999px;
  color: #c6f1ff;
  background: rgba(72, 199, 255, 0.12);
  font-size: 12px;
  font-weight: 950;
}

.community-type.bug {
  color: #ffd0d7;
  border-color: rgba(255, 97, 128, 0.46);
  background: rgba(255, 97, 128, 0.13);
}

.community-status.planned {
  color: #fff3c2;
}

.community-status.review {
  color: #ffe2b0;
}

.community-status.progress {
  color: #c6f1ff;
}

.community-status.done {
  color: #caffdc;
}

.community-status.rejected {
  color: #ffd0d7;
}

.community-status.custom {
  color: #d8dfff;
}

.community-new-badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #7e9cff, #5d72da);
  font-size: 10px;
  font-weight: 950;
}

.community-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.community-meta span {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.community-vote-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.community-vote-row strong {
  min-width: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 950;
}

.community-score.zero {
  color: #ffffff;
}

.community-score.positive {
  color: #55e7a1;
}

.community-score.negative {
  color: #ff5a78;
}

.community-vote-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
  cursor: pointer;
}

.community-translate-button {
  min-width: 68px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #fff;
  background: rgba(5, 12, 28, 0.55);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.community-delete-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 106, 132, 0.35);
  border-radius: 8px;
  color: #ffd5dc;
  background: rgba(255, 91, 120, 0.16);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.community-vote-button:hover,
.community-vote-button.active,
.community-translate-button:hover {
  border-color: rgba(154, 120, 255, 0.72);
  background: linear-gradient(180deg, #8f69ff, #6842df);
  color: #fff;
}

.community-delete-button:hover {
  border-color: rgba(255, 106, 132, 0.82);
  background: linear-gradient(180deg, #ff7188, #d83d58);
  color: #fff;
}

.community-vote-button:disabled,
.community-translate-button:disabled,
.community-delete-button:disabled {
  opacity: 0.62;
  cursor: default;
}

@media (max-width: 1220px) {
  .community-panel {
    width: 100%;
  }

  .community-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  }

  .community-live-grid {
    grid-template-columns: repeat(3, minmax(176px, 1fr));
  }
}

@media (max-width: 1060px) {
  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-requests-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .community-live-head,
  .community-live-filters,
  .community-request-toolbar {
    grid-template-columns: 1fr;
  }

  .community-live-grid {
    grid-template-columns: 1fr;
  }

  .community-news-bar,
  .community-news-filter,
  .community-create-actions,
  .community-request-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .community-news-filter {
    width: 100%;
  }

  .community-create-actions {
    grid-template-columns: 1fr;
  }

  .community-news-filter span,
  .community-news-filter .btn,
  .community-request-actions .btn {
    width: 100%;
  }
}



/* styles/controls.css */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 7px;
  border: 1px solid var(--accent-border-strong);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:disabled,
.btn.btn-disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.35) brightness(0.78);
  box-shadow: none;
}

.btn:disabled:hover,
.btn.btn-disabled:hover {
  filter: grayscale(0.35) brightness(0.78);
}

.btn-purple {
  background: linear-gradient(180deg, var(--purple), var(--purple2));
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-green {
  background: linear-gradient(180deg, var(--green), var(--green2));
  box-shadow: 0 0 18px var(--green-glow);
}

.btn-blue {
  background: linear-gradient(180deg, var(--blue), var(--blue2));
  box-shadow: 0 0 18px var(--blue-glow);
}

.btn-gold {
  color: var(--gold-text);
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  border-color: var(--gold);
  box-shadow: 0 0 18px var(--gold-glow);
}

.btn-red {
  background: linear-gradient(180deg, var(--red), var(--red2));
  box-shadow: 0 0 18px var(--red-glow);
}

.btn-dark,
.btn-slate {
  background: var(--surface-field);
  border-color: var(--accent-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mini {
  width: 74px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.wide-mini {
  width: auto;
  min-width: 134px;
  padding: 0 12px;
}

.small-btn {
  height: 34px;
  margin-top: 10px;
}

.section-action.small-btn {
  order: 20;
  height: 30px;
  margin: 0 0 0 auto;
  padding: 0 12px;
  font-size: 11px;
}

.section-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-control {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(120, 145, 255, 0.2);
  border-radius: 7px;
  background: rgba(10, 18, 36, 0.42);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.section-control .check {
  display: none;
}

.section-control.active {
  border-color: rgba(154, 120, 255, 0.54);
  background: linear-gradient(180deg, rgba(104, 77, 255, 0.52), rgba(42, 168, 255, 0.18));
  box-shadow: 0 0 18px rgba(116, 77, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.section-control:not(.active) {
  color: var(--muted);
}

.section-control:hover {
  border-color: rgba(98, 217, 255, 0.54);
}

.section-actions .section-action.small-btn {
  margin: 0;
}

.feature-disabled {
  border-color: rgba(120, 145, 255, 0.12);
  opacity: 0.78;
}

.panel.feature-collapsed {
  padding-bottom: 12px;
}

.panel.feature-collapsed > :not(.section-title) {
  display: none !important;
}

.panel.feature-collapsed .section-title {
  margin-bottom: 0;
}

.tab-visibility-panel,
.tab-visibility-panel[hidden] {
  display: none !important;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.settings-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.settings-grid .check-row {
  display: flex;
  min-height: 38px;
}

.settings-grid .input,
.settings-grid .select,
.settings-grid .native-select-wrap {
  width: 100%;
}

.personal-settings-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  margin-bottom: 12px;
}

.live-settings-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.live-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 12px;
  align-items: stretch;
}

.live-settings-card {
  border: 1px solid rgba(120, 145, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 17, 35, 0.34);
  padding: 12px;
}

.live-settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  margin-bottom: 10px;
}

.live-settings-card-head strong {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.live-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 10px;
}

.live-toggle-grid .check-row {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(120, 145, 255, 0.12);
  border-radius: 7px;
  background: rgba(11, 20, 39, 0.38);
}

.tts-live-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.live-control-grid {
  display: grid;
  gap: 10px;
}

.live-control-grid label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.live-control-grid .input,
.live-control-grid .select,
.live-control-grid .native-select-wrap {
  width: 100%;
}

.keyboard-key-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.keyboard-key-picker > span,
.keyboard-mode-picker > span {
  color: var(--text-strong);
  font-weight: 800;
}

.keyboard-key-current {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(132, 153, 210, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, #17233d, #101a31);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: text;
  user-select: none;
}

.keyboard-key-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
}

.keyboard-key-picker.capturing .keyboard-key-grid {
  display: grid;
}

.keyboard-key-current.listening,
.keyboard-key-capture-input.listening {
  border-color: rgba(190, 170, 255, 0.9);
  box-shadow: 0 0 22px rgba(116, 84, 244, 0.42), inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.keyboard-key-current.listening::after {
  content: "  *";
  color: #55d9ff;
}

.keyboard-key-capture-input {
  cursor: text;
}

.keyboard-key-choice,
.keyboard-mode-choice {
  min-height: 38px;
  border: 1px solid rgba(132, 153, 210, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, #17233d, #101a31);
  color: #dce6ff;
  font-weight: 900;
  cursor: pointer;
}

.keyboard-key-choice:hover,
.keyboard-mode-choice:hover {
  border-color: rgba(154, 120, 255, 0.7);
}

.keyboard-key-choice.active,
.keyboard-mode-choice.active {
  color: #fff;
  border-color: rgba(190, 170, 255, 0.75);
  background: linear-gradient(180deg, #7654f4, #4d2cc7);
  box-shadow: 0 0 18px rgba(116, 84, 244, 0.38);
}

.keyboard-key-choice.combo {
  min-width: 110px;
}

.keyboard-mode-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.keyboard-mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.keyboard-presets-block {
  margin-top: 16px;
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: 6px;
  --keyboard-action-columns: minmax(132px, 1fr) minmax(104px, 0.46fr) minmax(150px, 1fr) minmax(108px, 0.65fr) minmax(78px, 0.44fr) 34px;
}

.mouse-presets-block {
  margin-top: 22px;
  --mouse-action-columns: minmax(132px, 1fr) minmax(104px, 0.46fr) minmax(118px, 0.72fr) minmax(104px, 0.62fr) minmax(70px, 0.42fr) minmax(88px, 0.5fr) minmax(78px, 0.44fr) 34px;
}

.http-presets-block {
  margin-top: 22px;
  --http-action-columns: minmax(118px, 0.75fr) 92px minmax(180px, 1fr) minmax(220px, 1.18fr) minmax(170px, 0.85fr) 86px 34px;
}

.control-target-row {
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  gap: 8px;
  margin-top: 14px;
}

.control-target-row label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 900;
}

.control-target-row .select,
.control-target-row .native-select-wrap {
  width: 100%;
}

.keyboard-controls-disabled .keyboard-presets-block:not(.mouse-presets-block),
.mouse-controls-disabled .mouse-presets-block {
  display: none;
}

.keyboard-action-head,
.keyboard-action-row,
.mouse-action-head,
.mouse-action-row,
.http-action-head,
.http-action-row {
  display: grid;
  gap: 8px;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.keyboard-action-head,
.keyboard-action-row {
  grid-template-columns: var(--keyboard-action-columns);
}

.mouse-action-head,
.mouse-action-row {
  grid-template-columns: var(--mouse-action-columns);
}

.http-action-head,
.http-action-row {
  grid-template-columns: var(--http-action-columns);
}

.keyboard-action-head {
  margin-bottom: 8px;
  padding-left: 46px;
  color: var(--muted);
  font-weight: 900;
}

.mouse-action-head {
  margin-bottom: 8px;
  padding-left: 46px;
  color: var(--muted);
  font-weight: 900;
}

.http-action-head {
  margin-bottom: 8px;
  padding-left: 46px;
  color: var(--muted);
  font-weight: 900;
}

.keyboard-action-head > span,
.mouse-action-head > span,
.http-action-head > span {
  min-width: 0;
  overflow-wrap: normal;
  white-space: nowrap;
  line-height: 1.12;
}

.keyboard-action-row,
.mouse-action-row,
.http-action-row {
  margin: 8px 0;
}

.keyboard-action-row .native-select-wrap,
.keyboard-action-row .input,
.keyboard-action-row .btn,
.mouse-action-row .native-select-wrap,
.mouse-action-row .input,
.mouse-action-row .btn,
.http-action-row .native-select-wrap,
.http-action-row .input,
.http-action-row .textarea,
.http-action-row .btn {
  min-width: 0;
  width: 100%;
}

.http-action-row .textarea {
  min-height: 58px;
  resize: vertical;
}

.mouse-action-row .mouse-field-disabled,
.mouse-action-row .native-select-wrap.mouse-field-disabled .native-select-button {
  cursor: not-allowed;
  opacity: 0.44;
  filter: grayscale(0.32) brightness(0.82);
  box-shadow: none;
}

.keyboard-action-row.keyboard-action-press .keyboard-action-hold-ms {
  visibility: hidden;
  pointer-events: none;
}

.keyboard-presets-block.keyboard-no-hold-actions .keyboard-action-head > span:nth-child(5) {
  visibility: hidden;
}

.keyboard-image-control.random-image-control {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.keyboard-image-control .random-image-preview {
  flex: 0 0 58px;
  width: 58px;
}

.keyboard-image-control .keyboard-action-image-clear,
.keyboard-image-control .mouse-action-image-clear {
  flex: 0 0 32px;
  width: 32px;
}

@media (max-width: 1180px) {
  .keyboard-presets-block {
    --keyboard-action-columns: minmax(122px, 1fr) minmax(100px, 0.46fr) minmax(142px, 1fr) minmax(102px, 0.6fr) minmax(76px, 0.44fr) 34px;
  }
  .mouse-presets-block {
    --mouse-action-columns: minmax(122px, 1fr) minmax(100px, 0.46fr) minmax(112px, 0.72fr) minmax(96px, 0.62fr) minmax(64px, 0.42fr) minmax(82px, 0.5fr) minmax(76px, 0.44fr) 34px;
  }
  .http-presets-block {
    overflow-x: auto;
    --http-action-columns: minmax(112px, 0.75fr) 86px minmax(160px, 1fr) minmax(190px, 1.1fr) minmax(150px, 0.82fr) 78px 34px;
  }
}

.centered {
  display: block;
  height: 34px;
  margin: 10px auto 0;
}

.form-row {
  display: flex;
  align-items: end;
  gap: 18px;
}

.form-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-row label .select,
.form-row label .input,
.form-row label .search-select,
.form-row label .native-select-wrap {
  width: 100%;
  margin-left: 0;
}

[data-section="likes-config"] .form-row {
  flex-wrap: wrap;
}

[data-section="likes-config"] .like-value-select {
  flex: 1 1 320px;
  width: min(460px, 100%);
}

:is([data-section="follow"], [data-section="share"]) .form-row {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 120px 110px;
  align-items: end;
}

:is([data-section="follow"], [data-section="share"]) .form-row .btn {
  min-height: 48px;
}

.action-feedback-toast {
  position: fixed;
  top: calc(84px + env(safe-area-inset-top));
  right: 24px;
  z-index: 1200;
  max-width: min(520px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 105, 135, 0.56);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(84, 24, 54, 0.96), rgba(16, 26, 50, 0.98));
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 24px rgba(255, 72, 128, 0.22);
  font-weight: 900;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.action-feedback-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}



/* styles/music_logs.css */
.music-playlist-panel > .section-title {
  margin-bottom: 14px;
}

.music-playlist-overlay-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 10px 14px;
  align-items: start;
  min-height: 0;
  margin-bottom: 14px;
}

.music-playlist-overlay-card .overlay-preview-head {
  grid-column: 1 / -1;
}

.music-playlist-overlay-card .overlay-card-settings.music-playlist-overlay-settings {
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1.2fr) minmax(84px, 0.42fr) minmax(112px, 0.52fr);
}

.music-playlist-overlay-card .overlay-preview-url {
  grid-column: 1;
}

.music-playlist-overlay-card .music-playlist-overlay-frame {
  grid-column: 2;
  grid-row: 2 / span 2;
  min-height: 130px;
}

.music-playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 14px;
  align-items: start;
}

.music-source-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 0%, rgba(98, 217, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 28, 55, 0.9), rgba(9, 18, 35, 0.92));
}

.spotify-source-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(30, 215, 96, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(15, 31, 45, 0.9), rgba(9, 18, 35, 0.92));
}

.music-source-card.music-source-disabled {
  border-color: rgba(132, 153, 210, 0.12);
  opacity: 0.78;
}

.music-source-card.music-source-active {
  border-color: rgba(98, 217, 255, 0.34);
  box-shadow:
    0 0 24px rgba(98, 217, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.spotify-source-card.music-source-active {
  border-color: rgba(30, 215, 96, 0.34);
  box-shadow:
    0 0 24px rgba(30, 215, 96, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.music-source-card :disabled {
  cursor: not-allowed;
}

.music-source-card.music-source-disabled :is(.music-source-actions, .youtube-playlist-settings, .music-toggle-grid, .youtube-playlist-help, .youtube-playlist-list) {
  opacity: 0.46;
}

.music-source-card.music-source-disabled .section-control {
  opacity: 1;
}

.music-source-head,
.music-source-title,
.music-source-actions {
  display: flex;
  align-items: center;
}

.music-source-head {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.music-source-title {
  min-width: 0;
  gap: 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.spotify-source-card .music-source-title {
  color: #62f58f;
}

.music-source-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.music-source-actions .section-action.small-btn {
  margin: 0;
}

.youtube-playlist-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.youtube-playlist-settings label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 900;
}

.youtube-playlist-settings label.option-disabled {
  color: var(--muted);
  opacity: 0.5;
}

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

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

.music-volume-control {
  min-width: 0;
  grid-column: 1 / -1;
}

.music-volume-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 34, 0.42);
}

.music-volume-range {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  accent-color: #825cff;
}

.spotify-source-card .music-volume-range {
  accent-color: #1ed760;
}

.music-volume-value {
  min-width: 34px;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.music-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.music-toggle-grid .check-row {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 34, 0.45);
  font-size: 12px;
  font-weight: 900;
}

.music-toggle-grid .check-row.option-disabled {
  color: var(--muted);
  opacity: 0.48;
}

.music-toggle-grid .check-row.option-disabled .check {
  filter: grayscale(0.6);
}

.spotify-playlist-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(132, 153, 210, 0.16);
}

.section-title.compact-title {
  margin-bottom: 10px;
}

.youtube-playlist-help {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.youtube-playlist-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.youtube-playlist-row {
  display: grid;
  grid-template-columns: 38px 86px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.84), rgba(16, 26, 49, 0.84));
}

.youtube-playlist-rank {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 950;
  text-align: center;
}

.youtube-playlist-thumb {
  width: 86px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ff6b7a, #c5213d);
  color: #fff;
  font-weight: 950;
}

.youtube-playlist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-platform-logo {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.36));
}

.music-platform-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.spotify-playlist-thumb {
  background: linear-gradient(180deg, #1ed760, #0f9f45);
  color: #07101f;
}

.youtube-playlist-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.youtube-playlist-meta strong,
.youtube-playlist-meta span,
.youtube-playlist-meta a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.youtube-playlist-meta strong {
  color: #fff;
  font-size: 14px;
}

.youtube-playlist-meta span {
  color: #c7d3f0;
  font-size: 12px;
}

.youtube-playlist-meta a {
  color: var(--cyan);
  font-size: 12px;
  text-decoration: none;
}

.command-preview-box {
  position: fixed;
  z-index: 5000;
  width: min(680px, calc(100vw - 24px));
  max-height: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(98, 217, 255, 0.36);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 32, 59, 0.98), rgba(9, 18, 35, 0.98));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5), 0 0 22px rgba(98, 217, 255, 0.16);
  color: #e8efff;
  pointer-events: none;
}

.command-preview-box strong {
  display: block;
  margin-bottom: 8px;
  color: #62d9ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-preview-box pre {
  margin: 0;
  max-height: 290px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d8e2ff;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .music-playlist-overlay-card {
    grid-template-columns: 1fr;
  }

  .music-playlist-overlay-card .overlay-preview-url,
  .music-playlist-overlay-card .music-playlist-overlay-frame {
    grid-column: 1;
  }

  .music-playlist-overlay-card .music-playlist-overlay-frame {
    grid-row: auto;
  }

  .music-playlist-overlay-card .overlay-card-settings.music-playlist-overlay-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .music-playlist-overlay-card .overlay-card-settings.music-playlist-overlay-settings,
  .music-command-grid,
  .spotify-command-grid,
  .music-toggle-grid {
    grid-template-columns: 1fr;
  }
}

.event-history-panel {
  overflow: hidden;
}

.event-history-head,
.event-history-row {
  display: grid;
  grid-template-columns: 70px 130px minmax(110px, 0.8fr) minmax(160px, 1fr) minmax(240px, 1.4fr) 96px;
  gap: 8px;
  align-items: center;
}

.event-history-head {
  margin-top: 10px;
  padding: 0 10px 7px;
  color: #9eb5df;
  font-size: 11px;
  font-weight: 900;
  border-bottom: 1px solid rgba(132, 153, 210, 0.16);
}

.event-history-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-top: 8px;
}

.event-history-row {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.84), rgba(16, 26, 49, 0.84));
  color: #dce6ff;
  font-size: 12px;
}

.event-history-row > div,
.event-history-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-time {
  color: #9eb5df;
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.event-type {
  color: #62d9ff;
  font-weight: 900;
}

.event-viewer {
  color: #ffffff;
  font-weight: 800;
}

.event-trigger {
  color: #d8e2ff;
  white-space: nowrap;
}

.event-command {
  display: block;
  max-height: 50px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #dce6ff;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.28;
  background: rgba(5, 12, 24, 0.28);
  border: 1px solid rgba(132, 153, 210, 0.14);
  border-radius: 6px;
  padding: 5px 7px;
}

.event-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(132, 153, 210, 0.18);
  background: rgba(132, 153, 210, 0.12);
  color: #c7d3f0;
}

.event-status.ok {
  color: #79f0a4;
  border-color: rgba(121, 240, 164, 0.32);
  background: rgba(21, 148, 77, 0.16);
}

.event-status.sent,
.event-status.info {
  color: #62d9ff;
  border-color: rgba(98, 217, 255, 0.28);
  background: rgba(42, 168, 255, 0.12);
}

.event-status.bad {
  color: #ff9aa7;
  border-color: rgba(255, 130, 145, 0.38);
  background: rgba(169, 59, 75, 0.18);
}

.event-history-empty {
  padding: 12px;
  color: #9eb5df;
  border: 1px dashed rgba(132, 153, 210, 0.22);
  border-radius: 8px;
  font-size: 12px;
}

[data-section="likes-config"],
[data-section="follow"],
[data-section="share"],
[data-section="subscribe"],
[data-section="gifts"],
[data-section="gift_ranges"],
[data-section="comments"] {
  display: none !important;
}



/* styles/actions_media.css */
.live-actions-panel {
  overflow: visible;
}

.live-event-modal-card {
  width: min(1080px, calc(100vw - 36px));
  padding: 18px 20px 20px;
}

.live-event-modal-card .section-title {
  margin: 0 38px 14px 0;
}

.live-event-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 10px;
  background: rgba(5, 12, 28, 0.34);
}

.live-event-card {
  position: relative;
  min-height: 116px;
  display: grid;
  grid-template-rows: 44px auto auto;
  justify-items: center;
  align-items: center;
  gap: 5px;
  padding: 12px 10px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 38, 48, 0.96), rgba(18, 25, 36, 0.96));
  color: #e8efff;
  cursor: pointer;
}

.live-event-card.already-used {
  border-color: rgba(255, 211, 92, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 92, 0.12);
}

.live-event-used-pill {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 211, 92, 0.5);
  border-radius: 999px;
  background: rgba(55, 39, 9, 0.86);
  color: #ffd96a;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  pointer-events: none;
}

.live-event-card:hover,
.live-event-card:focus-visible,
.live-event-card.active {
  border-color: rgba(53, 207, 255, 0.72);
  box-shadow: 0 0 18px rgba(53, 207, 255, 0.18);
  outline: none;
}

.live-event-card.active {
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 207, 255, 0.2), transparent 62%),
    linear-gradient(180deg, rgba(23, 45, 76, 0.98), rgba(13, 28, 50, 0.98));
}

.live-event-card strong {
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.live-event-card small {
  color: #9eb5df;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.live-event-card-icon,
.live-action-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #62d9ff;
}

.live-event-card-icon svg {
  width: 42px;
  height: 42px;
}

.live-event-card-icon .data-icon-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.42));
}

.live-event-draft {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(98, 217, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 28, 52, 0.84), rgba(7, 17, 34, 0.9));
}

.live-event-draft-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.live-event-draft-head strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.live-event-draft-head span {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 800;
}

.live-event-draft-warning {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255, 211, 92, 0.34);
  border-radius: 8px;
  background: rgba(55, 39, 9, 0.55);
  color: #ffd96a !important;
}

.live-event-draft-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.live-event-draft-fields label {
  display: grid;
  gap: 6px;
  color: #c7d3f0;
  font-size: 12px;
  font-weight: 900;
}

.live-event-draft-fields .input,
.live-event-draft-fields .select,
.live-event-draft-fields .gift-select {
  width: 100%;
}

.live-event-modal-card .gift-select-menu {
  min-width: min(620px, calc(100vw - 56px));
}

.live-event-modal-card .gift-select-options {
  min-height: 216px;
}

.live-event-modal-actions {
  align-items: center;
  justify-content: space-between;
}

.live-game-action-modal-card {
  width: min(860px, calc(100vw - 36px));
}

#liveGameActionModal[data-mode="game"] .live-game-action-modal-card {
  width: min(1080px, calc(100vw - 36px));
}

#liveGameActionModal[data-mode="game"] .live-game-action-fields {
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
}

#liveGameActionModal[data-mode="audio"] .live-game-action-modal-card {
  width: min(960px, calc(100vw - 36px));
}

.live-game-quick-modal-card {
  width: min(780px, calc(100vw - 36px));
}

.live-game-action-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(71, 199, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 18, 34, 0.72);
}

.live-game-action-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(71, 199, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 24, 45, 0.72);
}

.live-game-action-preview-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
}

.live-game-action-image-slot {
  width: 108px;
  height: 108px;
}

.live-game-action-image-slot .random-image-preview {
  width: 108px;
  height: 108px;
  border-radius: 16px;
}

.live-game-action-image-slot .value-visual {
  pointer-events: none;
}

.live-game-action-preview-visual {
  width: 106px;
  height: 106px;
  border-radius: 16px;
  box-shadow: 0 0 18px rgba(53, 207, 255, 0.2);
}

.live-game-action-preview-visual img,
.live-game-action-image-slot .random-image-preview img {
  padding: 0;
  object-fit: contain;
}

.live-game-action-preview-visual.value-visual.kind-item img {
  padding: 8px;
  transform: none;
}

.live-game-action-image-slot:hover .live-game-action-preview-visual,
.live-game-action-image-slot:focus-visible .live-game-action-preview-visual {
  border-color: rgba(53, 207, 255, 0.72);
  box-shadow: 0 0 16px rgba(53, 207, 255, 0.24);
}

.live-game-action-preview-visual span {
  font-size: 12px;
}

.live-game-action-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #c7d3f0;
  font-size: 12px;
  font-weight: 900;
}

.live-game-action-fields .select,
.live-game-action-fields .input,
.live-game-action-fields .search-select {
  width: 100%;
}

.live-game-action-value-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.live-game-action-quick-button {
  justify-self: start;
  min-width: 138px;
  max-width: 100%;
  white-space: nowrap;
}

.live-game-action-quick-add {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(154, 120, 255, 0.28);
  border-radius: 8px;
  background: rgba(12, 20, 41, 0.82);
}

.live-game-action-quick-add[hidden] {
  display: none;
}

.live-game-action-extra-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.live-game-action-extra-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 27, 54, 0.84), rgba(7, 15, 31, 0.88));
}

#liveGameActionModal[data-mode="audio"] .live-game-action-fields {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  border: 0;
  background: transparent;
}

#liveGameActionModal[data-mode="audio"] .live-game-audio-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.live-game-action-command-head {
  display: grid;
  gap: 3px;
}

.live-game-action-command-head strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.live-game-action-command-head small {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 850;
}

.live-game-action-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.live-game-winlose-card .live-game-action-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-game-action-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.live-game-action-extra-card .check-row {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.live-game-audio-summary {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid rgba(71, 199, 255, 0.18);
  border-radius: 8px;
  color: #d8e5ff;
  background: rgba(5, 12, 28, 0.42);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-game-audio-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live-game-audio-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(132, 153, 210, 0.24);
  border-radius: 8px;
  background: rgba(10, 18, 32, 0.78);
  color: #dce7ff;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.live-game-audio-tab.active {
  border-color: rgba(53, 207, 255, 0.66);
  background: linear-gradient(180deg, rgba(28, 65, 95, 0.92), rgba(13, 33, 54, 0.92));
  color: #ffffff;
  box-shadow: inset 0 -3px 0 rgba(53, 207, 255, 0.82);
}

.live-game-audio-tab em {
  min-width: 26px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #b9c8ea;
  font-style: normal;
  font-size: 11px;
  text-align: center;
}

.live-game-audio-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(132px, 0.6fr);
  gap: 8px;
}

.live-game-audio-storage {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(53, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 20, 39, 0.54);
  color: #aebde0;
  font-size: 12px;
  font-weight: 800;
}

.live-game-audio-storage.muted {
  color: rgba(174, 189, 224, 0.74);
}

.live-game-audio-storage strong {
  color: #f2f6ff;
}

.live-game-audio-library {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.live-game-audio-empty {
  padding: 12px;
  border: 1px dashed rgba(132, 153, 210, 0.24);
  border-radius: 8px;
  color: #9eb5df;
  background: rgba(5, 12, 28, 0.28);
  font-size: 12px;
  font-weight: 850;
}

.live-game-audio-empty.error {
  border-color: rgba(255, 111, 149, 0.42);
  color: #ff9db7;
  background: rgba(80, 18, 38, 0.18);
}

.live-game-audio-asset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 38px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 8px;
  background: rgba(12, 24, 48, 0.68);
}

.live-game-audio-asset.active {
  border-color: rgba(53, 207, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(53, 207, 255, 0.12), 0 0 18px rgba(53, 207, 255, 0.14);
}

.live-game-audio-asset-main {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  color: #f2f6ff;
  cursor: pointer;
  text-align: left;
}

.live-game-audio-asset-main strong,
.live-game-audio-asset-main span,
.live-game-audio-asset-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-game-audio-asset-main strong {
  color: #f2f6ff;
  font-size: 13px;
  font-weight: 950;
}

.live-game-audio-asset-main span {
  color: #9eb5df;
  font-size: 11px;
  font-weight: 800;
}

.live-game-audio-asset-main small {
  color: #7f91b8;
  font-size: 10px;
  font-weight: 800;
}

.live-game-audio-asset .btn.mini {
  min-width: 58px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 11px;
}

.live-game-audio-asset .trash {
  width: 34px;
  height: 34px;
}

.live-game-audio-asset-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 30px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 8px;
  color: #9eb5df;
  background: rgba(5, 12, 28, 0.35);
  font-size: 9px;
  font-weight: 950;
}

.live-game-audio-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-game-audio-topbar {
  order: 1;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.live-game-audio-toolbar-wrap {
  order: 2;
}

.live-game-audio-controls {
  order: 3;
  display: grid;
  grid-template-columns: minmax(118px, 0.8fr) minmax(118px, 0.7fr) minmax(220px, 1.25fr) minmax(104px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.live-game-audio-summary {
  order: 4;
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  color: #9eb5df;
  background: transparent;
  font-size: 12px;
}

.live-game-audio-storage-wrap {
  order: 5;
}

.live-game-audio-library {
  order: 6;
  max-height: min(52vh, 470px);
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.live-game-audio-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-game-audio-tab {
  justify-content: center;
  min-width: 150px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  background: rgba(5, 10, 18, 0.78);
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
}

.live-game-audio-tab.active {
  background: linear-gradient(180deg, #1687ee, #0d63c5);
  box-shadow: none;
}

.live-game-audio-tab em {
  display: none;
}

.live-game-audio-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.62fr);
  gap: 8px;
}

.live-game-audio-toolbar.has-upload {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.62fr) minmax(150px, auto);
}

.live-game-alert-audio-upload {
  min-height: 46px;
  white-space: nowrap;
}

.live-game-upload-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-right: 7px;
  border-radius: 999px;
  background: #ffffff;
  vertical-align: -3px;
}

.live-game-upload-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-left: 3px solid #1687ee;
  border-top: 3px solid #1687ee;
  transform: rotate(45deg);
}

.live-game-upload-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: #1687ee;
}

.live-game-audio-controls > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #d5ddf0;
  font-size: 13px;
  font-weight: 850;
}

.live-game-audio-multiplier-row {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding-top: 18px !important;
  color: #d5ddf0;
  font-size: 16px;
  font-weight: 750;
}

.live-game-audio-volume-row {
  align-self: stretch;
}

.live-game-audio-controls > .live-game-audio-volume-row {
  display: block;
}

.live-game-audio-volume-row input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 11px 0 0;
  accent-color: #1687ee;
}

.live-game-audio-volume-value {
  font-weight: 850;
}

.live-game-alert-audio-clear {
  min-height: 46px;
  min-width: 104px;
  align-self: end;
  font-size: 18px;
}

.live-game-audio-asset {
  grid-template-columns: 48px 112px minmax(0, 1fr) minmax(48px, auto);
  gap: 8px;
  min-height: 70px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(6, 9, 14, 0.7) !important;
}

.live-game-audio-card .live-game-audio-asset {
  background: rgba(6, 9, 14, 0.7) !important;
}

.live-game-audio-asset.active {
  background: rgba(10, 32, 58, 0.82) !important;
}

.live-game-audio-card .live-game-audio-asset.active {
  background: rgba(10, 32, 58, 0.82) !important;
}

.live-game-audio-asset-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(22, 135, 238, 0.95);
  border-radius: 999px;
  background: rgba(4, 12, 23, 0.82);
  cursor: pointer;
}

.live-game-audio-asset-play span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #1687ee;
}

.live-game-audio-asset-use {
  min-height: 36px;
  min-width: 110px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 18px;
}

.live-game-audio-asset-main {
  min-width: 0;
  width: 100%;
}

.live-game-audio-asset-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.live-game-audio-asset-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.live-game-audio-asset-title em {
  flex: 0 0 auto;
  color: #dbe7ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.live-game-audio-asset-main span {
  font-size: 12px;
}

.live-game-audio-asset-main small {
  font-size: 11px;
}

.live-game-audio-asset .trash,
.live-game-audio-asset-lock {
  justify-self: end;
}

.live-game-quick-add-head {
  display: grid;
  gap: 3px;
}

.live-game-quick-add-head strong {
  color: #f2f6ff;
  font-size: 14px;
  font-weight: 950;
}

.live-game-quick-add-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-game-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.live-game-quick-grid > label:first-child {
  grid-column: span 2;
}

.live-game-quick-wide {
  grid-column: 1 / -1;
}

.live-game-quick-png {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(98, 217, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 28, 0.32);
}

.live-game-quick-png-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-game-quick-png-control .png-upload-slot {
  width: 94px;
  min-width: 94px;
  height: 82px;
}

.live-game-quick-png-control .live-game-quick-image-clear {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.live-game-quick-png-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.live-game-quick-png-copy strong {
  color: #f2f6ff;
  font-size: 13px;
  font-weight: 950;
}

.live-game-quick-png-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.live-game-quick-grid .textarea {
  min-height: 92px;
}

.live-game-quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.live-game-action-modal-actions {
  justify-content: flex-end;
}

.live-game-action-modal-actions .live-game-action-quick-button {
  margin-right: auto;
}

.live-action-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.live-action-row {
  display: grid;
  grid-template-columns: 34px minmax(210px, 0.62fr) minmax(320px, 1.12fr) minmax(72px, 0.18fr) minmax(150px, 0.42fr) 78px;
  gap: 10px;
  align-items: stretch;
  min-height: 112px;
  padding: 10px 10px 10px 6px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 26, 48, 0.94), rgba(8, 17, 32, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sortable-row.live-action-row {
  padding: 10px 10px 10px 6px;
}

.live-action-row .drag-handle {
  height: 100%;
  min-height: 92px;
}

.live-action-row .row-move-controls {
  position: static;
  transform: none;
  align-self: center;
  justify-self: start;
}

.live-action-row .row-move-controls .drag-handle {
  height: 34px;
  min-height: 0;
}

.live-action-trigger {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 4px 12px 4px 0;
  border-right: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px 0 0 8px;
  cursor: pointer;
}

.live-action-trigger:hover {
  background: rgba(132, 153, 210, 0.08);
}

.live-action-trigger-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.live-action-trigger-icon svg {
  width: 52px;
  height: 52px;
}

.live-action-trigger-icon .data-icon-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.42));
}

.live-action-trigger-gift .gift-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.live-action-trigger-gift .gift-thumb span {
  font-size: 15px;
}

.live-action-trigger-text {
  min-width: 0;
}

.live-action-trigger-text strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-action-trigger-source,
.live-action-trigger-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-top: 3px;
  color: #9eb5df;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.live-action-trigger-source {
  color: #ffffff;
}

.live-action-trigger-source,
.live-action-trigger-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-action-tiktok-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-right: 5px;
  border-radius: 5px;
  background: #05060d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    1px 0 0 #20f6ff,
    -1px 0 0 #ff2d72;
}

.live-action-trigger-meta .coin-dot {
  flex: 0 0 auto;
  margin-right: 5px;
}

.live-action-condition,
.live-action-game,
.live-action-game-slot,
.live-action-audio-slot,
.live-action-options-slot,
.live-action-count-box {
  display: grid;
  gap: 7px;
  align-content: center;
  min-width: 0;
}

.live-action-game {
  grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 1fr);
}

.live-action-game-slot {
  border-left: 1px solid rgba(132, 153, 210, 0.18);
  padding-left: 14px;
  cursor: pointer;
  align-content: stretch;
}

.live-action-audio-slot,
.live-action-options-slot {
  min-height: 72px;
  padding: 8px 12px;
  border: 0;
  border-left: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 0;
  background: transparent;
  color: #c7d3f0;
  text-align: left;
}

.live-action-audio-slot {
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  cursor: pointer;
}

.live-action-audio-slot:hover {
  background: rgba(132, 153, 210, 0.08);
}

.live-action-audio-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.live-action-audio-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.live-action-audio-copy strong,
.live-action-audio-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-action-audio-copy strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.live-action-audio-copy small {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 800;
}

.live-action-audio-slot.configured .live-action-audio-copy strong,
.live-action-audio-slot.configured .live-action-audio-plus {
  color: #ffe39a;
}

.live-action-options-slot {
  place-items: center;
  cursor: pointer;
}

.live-action-options-slot:hover {
  background: rgba(132, 153, 210, 0.08);
}

.live-action-options-slot.configured {
  justify-items: start;
  align-content: center;
}

.live-action-option-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  font-size: 29px;
  font-weight: 950;
  line-height: 1;
}

.live-action-option-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.live-action-option-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #9eb5df;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: inherit;
}

.live-action-option-pill.active {
  color: #ffffff;
  background: transparent;
}

.live-action-option-pill b {
  color: #49ea7c;
}

.live-action-option-pill.negative b {
  color: #ff7a8b;
}

.live-game-action-section-focus {
  outline: 2px solid rgba(53, 199, 255, 0.72);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(53, 199, 255, 0.12), 0 0 22px rgba(53, 199, 255, 0.26);
  transition: outline-color 180ms ease, box-shadow 180ms ease;
}

.live-action-game-open {
  width: 100%;
  height: 100%;
  min-height: 72px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c7d3f0;
  cursor: pointer;
  display: grid;
  gap: 7px;
  align-content: center;
  justify-items: start;
  padding: 0 14px;
  text-align: left;
}

.live-action-game-open.configured {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  align-content: center;
}

.live-action-game-slot:hover .live-action-game-open,
.live-action-game-open:hover {
  background: rgba(132, 153, 210, 0.08);
}

.live-action-game-open strong {
  color: #c7d3f0;
  font-size: 20px;
  font-weight: 900;
}

.live-action-game-label {
  display: grid;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}

.live-action-game-label strong,
.live-action-game-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-action-game-label strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.live-action-game-label small {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 800;
}

.live-action-game-visual {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(53, 207, 255, 0.14);
}

.live-action-game-visual span {
  font-size: 12px;
}

.live-action-condition label,
.live-action-game label,
.live-action-count-box label {
  min-width: 0;
  color: #c7d3f0;
  font-size: 11px;
  font-weight: 900;
}

.live-action-condition .input,
.live-action-condition .select,
.live-action-game .input,
.live-action-game .select,
.live-action-count-box .input {
  width: 100%;
}

.live-action-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.live-action-join-conditions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.live-action-join-sub-row {
  min-height: 38px;
  align-self: end;
  align-items: center;
}

.live-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.live-action-overlay-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(53, 207, 255, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 56, 87, 0.75), rgba(11, 24, 48, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 14px rgba(53, 207, 255, 0.12);
  cursor: pointer;
}

.live-action-overlay-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.live-action-overlay-toggle span {
  position: relative;
  width: 18px;
  height: 12px;
  border: 2px solid #35cfff;
  border-radius: 999px / 720px;
  transition: opacity 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}

.live-action-overlay-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35cfff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(53, 207, 255, 0.55);
}

.live-action-overlay-toggle span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: #ff6f95;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-42deg);
  box-shadow: 0 0 8px rgba(255, 111, 149, 0.4);
}

.live-action-overlay-toggle input:not(:checked) + span {
  opacity: 0.55;
  border-color: #ff6f95;
  filter: saturate(0.75);
}

.live-action-overlay-toggle input:not(:checked) + span::after {
  background: #ff6f95;
  box-shadow: 0 0 8px rgba(255, 111, 149, 0.45);
}

.live-action-overlay-toggle input:not(:checked) + span::before {
  opacity: 1;
}

.live-action-overlay-toggle:hover {
  border-color: rgba(53, 207, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 18px rgba(53, 207, 255, 0.18);
}

.live-action-audio {
  align-self: center;
  justify-self: stretch;
  min-height: 40px;
  color: #c7d3f0;
  border: 1px dashed rgba(132, 153, 210, 0.22);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.live-action-row[data-live-event="gift"] .live-action-trigger-icon,
.live-action-row[data-live-event="like"] .live-action-trigger-icon,
.live-action-row[data-live-event^="likes"] .live-action-trigger-icon,
.live-event-card[data-live-event-choice="gift"] .live-event-card-icon,
.live-event-card[data-live-event-choice="like"] .live-event-card-icon,
.live-event-card[data-live-event-choice^="likes"] .live-event-card-icon {
  color: #35cfff;
}

.live-action-row[data-live-event="gift_range"] .live-action-trigger-icon,
.live-action-row[data-live-event="subscribe"] .live-action-trigger-icon,
.live-event-card[data-live-event-choice="gift_range"] .live-event-card-icon,
.live-event-card[data-live-event-choice="subscribe"] .live-event-card-icon {
  color: #ffd43b;
}

.live-action-row[data-live-event="follow"] .live-action-trigger-icon,
.live-action-row[data-live-event="join"] .live-action-trigger-icon,
.live-action-row[data-live-event="share"] .live-action-trigger-icon,
.live-action-row[data-live-event="comment"] .live-action-trigger-icon,
.live-action-row[data-live-event="custom"] .live-action-trigger-icon,
.live-action-row[data-live-event^="minecraft_"] .live-action-trigger-icon,
.live-event-card[data-live-event-choice="follow"] .live-event-card-icon,
.live-event-card[data-live-event-choice="join"] .live-event-card-icon,
.live-event-card[data-live-event-choice="share"] .live-event-card-icon,
.live-event-card[data-live-event-choice="comment"] .live-event-card-icon,
.live-event-card[data-live-event-choice="custom"] .live-event-card-icon,
.live-event-card[data-live-event-choice^="minecraft_"] .live-event-card-icon {
  color: #b694ff;
}

@media (max-width: 1100px) {
  .live-event-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-action-row {
    grid-template-columns: 34px minmax(150px, 0.68fr) minmax(240px, 1.05fr) minmax(52px, 0.16fr) minmax(124px, 0.4fr) 70px;
    min-width: 840px;
  }

  .live-action-trigger,
  .live-action-game,
  .live-action-game-slot,
  .live-action-audio-slot,
  .live-action-options-slot,
  .live-action-count-box,
  .live-action-buttons {
    grid-column: auto;
    grid-row: auto;
  }

  .live-game-action-extra-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-game-action-mini-grid,
  .live-game-winlose-card .live-game-action-mini-grid,
  .live-game-action-check-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-action-buttons {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .live-event-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-game-action-fields,
  .live-game-action-preview,
  .live-game-quick-grid,
  .live-game-quick-png {
    grid-template-columns: minmax(0, 1fr);
  }

  #liveGameActionModal[data-mode="game"] .live-game-action-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-game-quick-grid > label:first-child {
    grid-column: auto;
  }

  .live-game-audio-tabs,
  .live-game-audio-asset {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-game-audio-tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .live-game-audio-toolbar,
  .live-game-audio-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-game-audio-tab,
  .live-game-audio-asset-use,
  .live-game-audio-asset-lock {
    width: 100%;
  }

  .live-game-audio-asset {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .live-game-audio-asset-use,
  .live-game-audio-asset-main,
  .live-game-audio-asset .trash,
  .live-game-audio-asset-lock {
    grid-column: 1 / -1;
  }
}

.grow {
  flex: 1;
}

.form-grid-full {
  display: grid;
  grid-template-columns: 1fr 190px 120px 120px;
  gap: 12px;
  align-items: end;
}

.form-grid-full label:first-child {
  grid-column: 1 / -1;
}

.right-field {
  justify-self: end;
}

.random-list-head,
.random-list-row {
  display: grid;
  grid-template-columns: 150px 108px minmax(250px, 1fr) 140px 70px 40px;
  gap: 10px;
  align-items: start;
}

.random-list-head {
  margin-bottom: 6px;
  padding-left: 46px;
  box-sizing: border-box;
}

.random-list-head div {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.random-list-row {
  margin-bottom: 8px;
}

.random-list-row .input,
.random-list-row .select {
  width: 100%;
}

.random-image-control {
  display: grid;
  grid-template-columns: 58px 34px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.random-image-preview {
  position: relative;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(132, 153, 210, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.82), rgba(13, 22, 41, 0.82));
  color: rgba(216, 226, 255, 0.58);
  font-size: 10px;
  font-weight: 900;
}

.png-upload-slot {
  appearance: none;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.png-upload-slot .random-image-preview {
  pointer-events: none;
}

.png-upload-slot:hover .random-image-preview,
.png-upload-slot:focus-visible .random-image-preview {
  border-color: rgba(53, 207, 255, 0.72);
  box-shadow: 0 0 16px rgba(53, 207, 255, 0.22);
}

.png-upload-slot:focus-visible {
  outline: 2px solid rgba(53, 207, 255, 0.85);
  outline-offset: 3px;
}

.random-image-preview.has-image {
  border-color: rgba(154, 120, 255, 0.46);
  box-shadow: 0 0 14px rgba(116, 84, 244, 0.18);
}

.random-image-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.random-image-preview .random-image-bg-layer {
  z-index: 0;
  object-fit: cover;
  opacity: 0.92;
}

.random-image-preview .random-image-main-layer {
  z-index: 1;
  padding: 2px;
}

.random-image-preview em {
  position: absolute;
  left: 3px;
  top: 3px;
  z-index: 2;
  max-width: calc(100% - 6px);
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(5, 12, 24, 0.72);
  color: rgba(235, 242, 255, 0.86);
  font-size: 7px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.random-image-preview > span {
  position: relative;
  z-index: 1;
}

.random-image-preview.has-image > span {
  display: none;
}

.random-image-clear {
  width: 34px;
  height: 34px;
  justify-self: center;
}

.png-picker-modal-card {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.png-picker-current {
  min-height: 28px;
  padding: 8px 10px;
  border: 1px solid rgba(132, 153, 210, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 24, 0.26);
  color: #c7d3f0;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.png-picker-storage {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(47, 198, 255, 0.24);
  border-radius: 8px;
  background: rgba(8, 26, 48, 0.42);
  color: #aebde0;
  font-size: 12px;
  font-weight: 800;
}

.png-picker-storage[hidden] {
  display: none;
}

.png-picker-storage strong {
  color: #eef5ff;
}

.png-picker-layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.png-picker-layer {
  min-height: 38px;
  border: 1px solid rgba(132, 153, 210, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 34, 60, 0.88), rgba(12, 22, 42, 0.92));
  color: #dce7ff;
  cursor: pointer;
  font-weight: 900;
}

.png-picker-layer.active {
  border-color: rgba(53, 207, 255, 0.72);
  background: linear-gradient(180deg, rgba(43, 153, 222, 0.92), rgba(86, 68, 214, 0.92));
  color: #fff;
  box-shadow: 0 0 18px rgba(53, 207, 255, 0.18);
}

.png-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.png-picker-preview {
  min-height: 112px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.24);
}

.png-picker-preview-image {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25% 75%, rgba(255,255,255,.04) 75%),
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25% 75%, rgba(255,255,255,.04) 75%),
    rgba(5, 10, 18, 0.42);
  background-position: 0 0, 8px 8px, 0 0;
  background-size: 16px 16px, 16px 16px, auto;
  color: rgba(216, 226, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.png-picker-preview-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.png-picker-preview-image .random-image-preview {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.png-picker-preview-image .random-image-preview img {
  max-width: none;
  max-height: none;
}

.png-picker-preview-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.png-picker-preview-copy strong,
.png-picker-preview-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.png-picker-preview-copy strong {
  color: #f2f6ff;
  font-size: 14px;
  font-weight: 950;
}

.png-picker-preview-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.png-picker-preview-actions {
  display: grid;
  gap: 8px;
  align-items: center;
}

.png-picker-preview-actions .btn {
  width: 104px;
}

.png-picker-grid {
  min-height: 160px;
  max-height: min(330px, calc(100vh - 410px));
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  overflow: auto;
  padding: 3px 3px 8px;
}

.png-picker-item {
  position: relative;
  min-width: 0;
  min-height: 150px;
  display: grid;
  grid-template-rows: 82px auto auto;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.86), rgba(12, 22, 43, 0.9));
  color: #f2f6ff;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.png-picker-item:hover,
.png-picker-item:focus-visible {
  border-color: rgba(53, 207, 255, 0.7);
  box-shadow: 0 0 18px rgba(53, 207, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  outline: none;
}

.png-picker-item.active {
  border-color: rgba(154, 120, 255, 0.72);
  background: linear-gradient(180deg, rgba(54, 43, 118, 0.92), rgba(22, 34, 66, 0.94));
}

.png-picker-item.previewed {
  border-color: rgba(53, 207, 255, 0.82);
  box-shadow: 0 0 18px rgba(53, 207, 255, 0.18), inset 0 0 0 1px rgba(53, 207, 255, 0.12);
}

.png-picker-delete-item {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 116, 137, 0.56);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(103, 35, 55, 0.96), rgba(65, 20, 39, 0.96));
  color: #ffdce4;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 80, 120, 0.16);
}

.png-picker-delete-item:hover,
.png-picker-delete-item:focus-visible {
  border-color: rgba(255, 128, 150, 0.88);
  background: linear-gradient(180deg, rgba(209, 74, 99, 0.98), rgba(113, 33, 58, 0.98));
  outline: none;
}

.png-picker-delete-item svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.png-picker-thumb {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(132, 153, 210, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25% 75%, rgba(255,255,255,.04) 75%),
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25% 75%, rgba(255,255,255,.04) 75%),
    rgba(5, 10, 18, 0.54);
  background-position: 0 0, 7px 7px, 0 0;
  background-size: 14px 14px, 14px 14px, auto;
  overflow: hidden;
}

.png-picker-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.png-picker-name {
  min-width: 0;
  overflow: hidden;
  color: #dce6ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  word-break: break-word;
}

.png-picker-file-meta {
  min-width: 0;
  align-self: end;
  overflow: hidden;
  color: rgba(174, 189, 224, 0.76);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.png-picker-empty {
  padding: 14px;
  border: 1px dashed rgba(132, 153, 210, 0.24);
  border-radius: 10px;
  color: #9eb5df;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.random-value-picker {
  position: relative;
  min-width: 0;
}

.random-value-picker.open {
  z-index: 940;
}

.random-selected-values {
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(132, 153, 210, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.78), rgba(13, 22, 41, 0.78));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.random-value-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 7px 4px 10px;
  border: 1px solid rgba(154, 120, 255, 0.42);
  border-radius: 999px;
  background: rgba(101, 68, 222, 0.24);
  color: #eef3ff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(116, 84, 244, 0.14);
}

.random-value-type {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(78, 206, 255, 0.14);
  color: #6bdcff;
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
  flex: none;
}

.random-value-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.random-value-remove {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(229, 101, 115, 0.22);
  color: #ffd6dd;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.random-value-remove:hover {
  background: rgba(229, 101, 115, 0.46);
  color: #fff;
}

.random-value-placeholder {
  color: rgba(216, 226, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.random-value-button {
  margin-top: 7px;
  cursor: pointer;
  text-align: left;
}

.random-value-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 930;
  min-width: 260px;
  padding: 8px;
  border: 1px solid rgba(132, 153, 210, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, #17233d, #0d1629);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(154, 120, 255, 0.08);
}

.random-value-picker.open-up .random-value-menu {
  top: auto;
  bottom: calc(100% + 5px);
}

.random-value-filter {
  width: 100%;
  margin-bottom: 7px;
}

.random-value-options {
  max-height: 240px;
  overflow: auto;
  contain: layout paint;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}

.random-value-options.virtualized {
  position: relative;
}

.random-value-virtual-spacer {
  position: relative;
  min-height: 0;
}

.random-value-option {
  box-sizing: border-box;
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e8efff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  contain: layout paint;
}

.random-value-options.virtualized .random-value-option {
  position: absolute;
  left: 0;
  right: 0;
}

.random-value-options.virtualized .random-value-option + .random-value-option {
  margin-top: 0;
}

.random-value-option strong {
  width: 86px;
  color: #6bdcff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  flex: none;
}

.random-value-option .value-option-text strong {
  width: auto;
  color: inherit;
  font-size: 13px;
  text-transform: none;
  flex: initial;
}

.random-value-option span,
.random-value-option .value-option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.random-value-option:hover {
  background: rgba(101, 68, 222, 0.62);
  color: #fff;
}

.random-value-empty {
  padding: 7px 8px;
  color: rgba(216, 226, 255, 0.68);
  font-size: 12px;
}

.random-roulette {
  grid-column: 2 / -1;
  margin-top: 2px;
}

.roulette-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 8px 12px;
  border: 1px solid rgba(154, 120, 255, 0.36);
  border-radius: 10px;
  background:
    radial-gradient(circle at left, rgba(154, 120, 255, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(23, 35, 61, 0.9), rgba(13, 22, 41, 0.9));
  box-shadow: 0 0 24px rgba(116, 84, 244, 0.22);
}

.roulette-card div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.roulette-card strong {
  color: #a98cff;
  font-size: 12px;
  text-transform: uppercase;
}

.roulette-card span {
  color: #eef3ff;
  font-size: 13px;
  font-weight: 800;
}

.command-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 108px minmax(360px, 1fr) 40px;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.command-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.command-grid label .input,
.command-grid label .textarea {
  margin-left: 0;
}

.command-grid .trash {
  align-self: end;
  margin-bottom: 1px;
}

.command-grid .random-image-control {
  width: 100%;
  padding-top: 26px;
}

.command-grid .random-image-control .trash {
  align-self: center;
  margin-bottom: 0;
}

.preset-grid {
  display: grid;
  grid-template-columns: 260px 130px 1fr;
  gap: 12px;
  align-items: end;
}

.preset-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.preset-render-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 190px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(72, 199, 255, 0.16);
  border-radius: 10px;
  background: rgba(10, 18, 34, 0.38);
  min-width: 0;
  overflow: hidden;
}

.preset-render-tools label {
  display: grid;
  gap: 6px;
}

.preset-render-tools .btn {
  min-width: 0;
  width: 100%;
}

.path-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.path-picker label {
  min-width: 0;
}

.path-picker .btn {
  min-height: 42px;
  white-space: nowrap;
}

.preset-render-tools > span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.render-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(154, 120, 255, 0.26);
  border-radius: 10px;
  background: rgba(15, 25, 48, 0.72);
}

.render-progress[hidden] {
  display: none;
}

.render-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #e8efff;
  font-size: 12px;
}

.render-progress-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cyan);
  font-weight: 900;
}

.preset-render-tools .render-progress-top span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.render-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(6, 12, 24, 0.78);
  box-shadow: inset 0 0 0 1px rgba(132, 153, 210, 0.2);
}

.render-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #48c7ff, #6a45e8, #9a78ff);
  box-shadow: 0 0 18px rgba(154, 120, 255, 0.45);
  transition: width 0.25s ease;
}

.mod-render-modal-card {
  width: min(820px, calc(100vw - 34px));
}

.mod-render-modal-card .modal-subtext {
  margin: -8px 0 16px;
  max-width: 720px;
  line-height: 1.45;
}

.mod-render-steps {
  display: grid;
  gap: 10px;
}

.mod-render-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 10px;
  background: rgba(7, 16, 32, 0.58);
}

.mod-render-step.active {
  border-color: rgba(72, 199, 255, 0.46);
  box-shadow: 0 0 22px rgba(72, 199, 255, 0.12);
}

.mod-render-step.done {
  border-color: rgba(49, 208, 117, 0.38);
}

.mod-render-step.locked {
  opacity: 0.58;
}

.mod-render-step.error {
  border-color: rgba(255, 100, 130, 0.54);
}

.mod-render-step-index {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(98, 217, 255, 0.34);
  background: rgba(42, 168, 255, 0.14);
  color: var(--cyan);
  font-size: 15px;
  font-weight: 950;
}

.mod-render-step.done .mod-render-step-index {
  border-color: rgba(49, 208, 117, 0.48);
  background: rgba(49, 208, 117, 0.16);
  color: var(--green);
}

.mod-render-step.locked .mod-render-step-index {
  border-color: rgba(132, 153, 210, 0.24);
  background: rgba(132, 153, 210, 0.08);
  color: var(--muted);
}

.mod-render-step-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mod-render-step-body strong {
  color: #f2f6ff;
  font-size: 14px;
  font-weight: 950;
}

.mod-render-step-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.42;
}

.mod-render-step-body .btn {
  justify-self: start;
  min-width: 160px;
}

.mod-render-step-body .btn:disabled,
.mod-render-step-body .input:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.mod-render-dir-picker {
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .preset-render-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mod-render-step {
    grid-template-columns: 1fr;
  }

  .mod-render-step-body .btn,
  .mod-render-dir-picker .btn {
    width: 100%;
  }
}



/* styles/game_modes_tables.css */
.game-mode-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto auto auto auto minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}

.game-mode-toolbar label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.game-mode-note {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.game-modes-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(98, 217, 255, 0.24);
  border-radius: 10px;
  background: rgba(10, 18, 34, 0.36);
  color: #c7d3f0;
  font-size: 12px;
  font-weight: 850;
}

.game-mode-paywall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(154, 120, 255, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(30, 144, 255, 0.14), rgba(126, 87, 255, 0.22)),
    rgba(5, 12, 24, 0.74);
  box-shadow: 0 14px 34px rgba(44, 124, 255, 0.12);
}

.game-mode-paywall strong,
.game-mode-paywall span {
  display: block;
}

.game-mode-paywall strong {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.game-mode-paywall span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.game-modes-collapsed .game-mode-body {
  display: none;
}

.game-modes-collapse-btn {
  min-width: 86px;
}

.game-mode-wizard-card {
  width: min(620px, calc(100vw - 32px));
}

.game-mode-wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.game-mode-wizard-grid label {
  display: grid;
  gap: 7px;
  color: #c9d6f4;
  font-size: 12px;
  font-weight: 900;
}

.game-mode-wizard-preview {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px dashed rgba(98, 217, 255, 0.24);
  border-radius: 10px;
  background: rgba(7, 16, 33, 0.58);
}

.game-mode-wizard-preview strong,
.game-mode-wizard-preview span,
.game-mode-wizard-preview small {
  display: block;
}

.game-mode-wizard-preview strong {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.game-mode-wizard-preview span,
.game-mode-wizard-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.paper-via-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(130px, auto)) auto minmax(260px, 1.2fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(154, 120, 255, 0.22);
  border-radius: 10px;
  background: rgba(5, 12, 24, 0.24);
}

.paper-via-toolbar strong {
  color: #62d9ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.paper-via-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.server-tool-panel-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.server-tool-panel-head strong {
  color: #62d9ff;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.server-tool-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.modpack-server-tool {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(72, 199, 255, 0.2);
  border-radius: 10px;
  background: rgba(5, 12, 24, 0.26);
}

.server-install-modpack-option {
  margin-top: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
}

.server-install-modpack-option[hidden] {
  display: none !important;
}

.server-install-modpack-option .modpack-debug-limit,
.server-install-modpack-option .modpack-server-checks,
.server-install-modpack-option .modpack-server-actions {
  grid-column: 1 / -1;
}

.server-install-modpack-option .path-picker-inline {
  grid-template-columns: minmax(0, 1fr) auto;
}

.server-install-modpack-option .modpack-server-actions {
  justify-content: stretch;
}

.server-install-modpack-option .modpack-server-actions .btn {
  width: 100%;
}

.modpack-server-head {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
}

.modpack-server-head strong {
  color: #62d9ff;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.modpack-server-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.modpack-server-tool label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
}

.path-picker-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.path-picker-inline .input {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

.path-picker-inline .btn {
  min-width: 96px;
  padding: 0 12px;
}

.server-profile-panel .path-picker-inline {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.server-tool-panel-head.compact-head {
  margin-top: 14px;
}

.modpack-server-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.modpack-server-checks .check-row {
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.modpack-check-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.modpack-check-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.modpack-check-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.modpack-debug-limit {
  grid-column: 1 / 2;
}

.modpack-server-actions {
  grid-column: 2 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: end;
}

.modpack-server-actions .btn {
  min-width: 240px;
  padding: 0 12px;
}

.server-profile-panel {
  padding: 12px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(13, 24, 46, 0.72), rgba(7, 15, 30, 0.72));
}

.server-profile-panel > label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
}

.server-install-tool {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(13, 24, 46, 0.72), rgba(7, 15, 30, 0.72));
}

.server-install-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.server-install-tool-actions .btn {
  min-width: 190px;
}

.server-profile-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, auto);
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.server-profile-toolbar label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.server-profile-toolbar .input,
.server-profile-toolbar .select {
  width: 100%;
  margin-left: 0;
}

.server-profile-toolbar .btn {
  white-space: nowrap;
}

.server-profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.server-profile-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.86), rgba(16, 26, 49, 0.86));
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.server-profile-card.active {
  border-color: rgba(116, 84, 244, 0.7);
  box-shadow: 0 0 18px rgba(116, 84, 244, 0.24), inset 3px 0 0 rgba(116, 84, 244, 0.9);
}

.server-profile-card strong {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.server-profile-card span,
.server-profile-card small,
.server-profile-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.server-profile-empty {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px dashed rgba(132, 153, 210, 0.22);
  border-radius: 10px;
}

.game-mode-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.game-mode-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main actions"
    "meta actions";
  gap: 10px 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.86), rgba(16, 26, 49, 0.86));
}

.game-mode-card.loaded {
  border-color: rgba(49, 208, 117, 0.36);
  box-shadow: inset 3px 0 0 rgba(49, 208, 117, 0.72);
}

.game-mode-card.locked {
  opacity: 0.72;
  border-color: rgba(154, 120, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(23, 35, 61, 0.68), rgba(16, 26, 49, 0.68));
}

.game-mode-card.locked .game-mode-command code {
  color: #cbb8ff;
  border-color: rgba(154, 120, 255, 0.26);
}

.game-mode-card strong,
.game-mode-card span {
  display: block;
}

.game-mode-main {
  grid-area: main;
  min-width: 0;
}

.game-mode-card strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.game-mode-card span {
  margin-top: 4px;
  color: #c7d3f0;
  font-size: 12px;
  line-height: 1.35;
}

.game-mode-command {
  display: grid;
  gap: 4px;
  margin-top: 9px;
  min-width: 0;
}

.game-mode-command span {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.game-mode-command code {
  display: block;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(98, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 10, 22, 0.5);
  color: #dbe8ff;
  font: 800 12px/1.35 Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.game-mode-meta {
  grid-area: meta;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}

.game-mode-meta b,
.game-mode-meta em,
.game-mode-meta i,
.game-mode-meta small {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.game-mode-meta b {
  color: #62d9ff;
  background: rgba(42, 168, 255, 0.12);
  border: 1px solid rgba(98, 217, 255, 0.25);
}

.game-mode-meta em {
  color: #cbb8ff;
  background: rgba(116, 77, 255, 0.13);
  border: 1px solid rgba(190, 170, 255, 0.24);
}

.game-mode-meta i {
  color: #a8ffc9;
  background: rgba(49, 208, 117, 0.13);
  border: 1px solid rgba(49, 208, 117, 0.28);
}

.game-mode-meta small {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
}

.game-mode-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.game-mode-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-self: end;
  min-width: 160px;
}

.game-mode-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.push-right {
  justify-self: end;
}

.sortable-row {
  position: relative;
  min-height: 78px;
  padding-left: 46px;
  transition:
    opacity 0.16s ease,
    outline-color 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}


.table.sortable-row,
.random-list-row.sortable-row {
  align-items: center;
}

.custom-command-row.sortable-row {
  align-items: start;
}

.sortable-row.dragging {
  will-change: transform;
  opacity: 0.55;
  outline: 1px dashed rgba(154, 120, 255, 0.7);
  outline-offset: 3px;
}

.sortable-row.live-action-row.dragging {
  opacity: 0;
  outline: none;
  box-shadow: none;
}

.sortable-drag-preview {
  opacity: 0.92;
  outline: 1px solid rgba(154, 120, 255, 0.78);
  outline-offset: 0;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 0 30px rgba(116, 84, 244, 0.24);
}

.sortable-drag-preview .row-move-controls,
.sortable-drag-preview .drag-handle,
.sortable-drag-preview button,
.sortable-drag-preview input,
.sortable-drag-preview textarea,
.sortable-drag-preview select {
  pointer-events: none;
}

.sortable-row.drag-target {
  outline: 1px solid rgba(82, 217, 255, 0.45);
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(82, 217, 255, 0.16);
}

.sortable-row.row-reorder-animating {
  z-index: 3;
  pointer-events: none;
}

.drag-handle {
  position: absolute;
  left: 0;
  top: 50%;
  width: 28px;
  height: 34px;
  transform: translateY(-50%);
  border: 1px solid rgba(154, 120, 255, 0.34);
  border-radius: 8px;
  background: rgba(116, 84, 244, 0.14);
  color: #a98cff;
  box-shadow: 0 0 12px rgba(116, 84, 244, 0.12);
  cursor: grab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 4;
}

.drag-handle:hover {
  border-color: rgba(154, 120, 255, 0.72);
  background: rgba(116, 84, 244, 0.28);
  color: #fff;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.row-move-controls {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: 30px;
  grid-template-rows: 17px 34px 17px;
  gap: 3px;
  align-items: center;
  justify-items: center;
  z-index: 4;
}

.row-move-controls .drag-handle {
  position: static;
  transform: none;
}

.row-move-arrow {
  width: 26px;
  height: 17px;
  border: 1px solid rgba(154, 120, 255, 0.34);
  border-radius: 6px;
  background: rgba(116, 84, 244, 0.12);
  color: #a98cff;
  box-shadow: 0 0 10px rgba(116, 84, 244, 0.1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.row-move-arrow:hover {
  border-color: rgba(154, 120, 255, 0.72);
  background: rgba(116, 84, 244, 0.3);
  color: #fff;
}

.row-move-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table {
  display: grid;
  gap: 5px 6px;
  align-items: center;
}

.table > * {
  min-width: 0;
}

.table .input,
.table .select,
.table .textarea {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

.table .switch {
  justify-self: center;
}

.table .goal-enable-toggle {
  justify-self: center;
}

.goals {
  grid-template-columns: 100px minmax(130px, 0.8fr) minmax(190px, 1.25fr) 64px minmax(140px, 0.92fr) 34px 126px;
}

.coin-goals {
  grid-template-columns: 100px minmax(130px, 0.8fr) minmax(190px, 1.25fr) 64px minmax(140px, 0.92fr) 34px 126px;
}

.donor-levels {
  grid-template-columns: minmax(105px, 150px) minmax(150px, 1fr) 76px 34px 74px;
}

.donor-color {
  width: 64px;
  padding: 4px;
}

.gift-goals {
  grid-template-columns: 64px minmax(170px, 1.15fr) minmax(120px, 0.78fr) minmax(175px, 1.25fr) 54px minmax(118px, 0.78fr) 34px 126px;
}

.follow-goals {
  grid-template-columns: 100px minmax(130px, 0.8fr) minmax(180px, 1.2fr) 64px minmax(140px, 0.92fr) 34px 126px;
}

.gifts {
  grid-template-columns: minmax(240px, 280px) 170px minmax(240px, 1fr) 70px 34px 60px;
}

.gift-ranges {
  grid-template-columns: minmax(240px, 280px) 170px minmax(240px, 1fr) 70px 34px 60px;
}

.coin-range-control {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) auto minmax(86px, 1fr);
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.coin-range-control label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.coin-range-control label span {
  white-space: nowrap;
}

.coin-range-control .input {
  width: 100%;
  margin-left: 0;
}

.coin-range-separator {
  align-self: center;
  color: var(--muted);
  font-weight: 900;
}

.gift-range-row .value-rich-select .search-select-button {
  min-height: 34px;
  height: 34px;
  padding: 4px 11px;
}

.gift-range-row .search-select-preview .value-visual.large {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 8px;
}

.comments {
  grid-template-columns: 180px 160px minmax(190px, 1fr) 70px 34px;
}

.scoreboard-body {
  display: grid;
  gap: 10px;
}

.scoreboard-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto minmax(170px, 220px);
  gap: 10px;
  align-items: end;
  max-width: 780px;
}

.scoreboard-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.scoreboard-toolbar .btn {
  min-height: 42px;
}

.scoreboard-lines {
  grid-template-columns: 36px minmax(210px, 280px) minmax(220px, 1fr) 34px;
}

[data-section="scoreboard_config"].scoreboard-collapsed .scoreboard-body {
  display: none;
}

.table-head {
  margin-bottom: 6px;
  padding-left: 36px;
  box-sizing: border-box;
}

.table-head.gifts,
.table-head.gift-ranges,
.table-head.goals,
.table-head.coin-goals,
.table-head.donor-levels,
.table-head.gift-goals,
.table-head.follow-goals,
.table-head.comments {
  padding-left: 46px;
}

.table-head.scoreboard-lines {
  padding-left: 36px;
  grid-template-columns: minmax(210px, 280px) minmax(220px, 1fr) 34px;
}

.scoreboard-row .native-select-wrap,
.scoreboard-row .scoreboard-key,
.scoreboard-row .scoreboard-label {
  width: 100%;
  min-width: 0;
}

.scoreboard-empty {
  margin-top: 4px;
}

.table-head + div .table {
  margin-bottom: 5px;
}

.table > div {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.app-tooltip {
  position: fixed;
  z-index: 20000;
  max-width: min(360px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid rgba(154, 120, 255, 0.56);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(154, 120, 255, 0.24), transparent 58%),
    linear-gradient(180deg, rgba(24, 36, 68, 0.98), rgba(10, 18, 36, 0.98));
  color: #f5f8ff;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(154, 120, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: pre-line;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px) scale(0.98);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.app-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-tooltip[hidden] {
  display: none;
}

.app-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(10, 18, 36, 0.98);
  border-right: 1px solid rgba(154, 120, 255, 0.46);
  border-bottom: 1px solid rgba(154, 120, 255, 0.46);
}

.app-tooltip.below::before {
  top: -5px;
  bottom: auto;
  background: rgba(24, 36, 68, 0.98);
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(154, 120, 255, 0.46);
  border-top: 1px solid rgba(154, 120, 255, 0.46);
}

.trash {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 130, 145, 0.36);
  border-radius: 8px;
  background: rgba(229, 101, 115, 0.14);
  color: #ff8d9c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 12px rgba(229, 101, 115, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

.trash:hover {
  background: rgba(229, 101, 115, 0.28);
  border-color: rgba(255, 130, 145, 0.7);
  color: #fff;
  box-shadow: 0 0 16px rgba(229, 101, 115, 0.34);
}

.trash svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check {
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: var(--field1);
  border: 1px solid var(--accent-border-strong);
  vertical-align: -3px;
  margin: 0 7px 0 0;
  position: relative;
}

.check:checked {
  background: linear-gradient(180deg, var(--purple), var(--purple2));
  box-shadow: 0 0 12px var(--accent-glow);
}

.check:checked::after {
  content: "\2713";
  color: white;
  font-size: 13px;
  font-weight: 900;
  position: absolute;
  left: 3px;
  top: -2px;
}

.switch {
  width: 40px;
  height: 22px;
  display: inline-block;
  position: relative;
}

.switch input {
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--field1);
  border: 1px solid var(--accent-border);
}

.switch span::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  top: 1px;
  left: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.14s ease;
}

.switch input:checked + span {
  background: linear-gradient(180deg, var(--purple), var(--purple2));
  box-shadow: 0 0 12px var(--accent-glow);
}

.switch input:checked + span::after {
  transform: translateX(17px);
}

.option-group {
  padding: 12px 0 13px;
  border-bottom: 1px solid rgba(120, 145, 255, 0.12);
}

.option-group:last-child {
  border-bottom: 0;
}

.group-title {
  color: #c7d3f0;
  font-size: 13px;
  margin-bottom: 10px;
}

.option-group label {
  display: block;
  margin: 10px 0;
  line-height: 1.2;
}

.option-summary {
  color: #c7d3f0;
}

.option-summary p {
  margin: 0 0 12px;
  line-height: 1.45;
}

.option-summary ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.option-summary li {
  line-height: 1.35;
}

.option-settings {
  display: grid;
  gap: 12px;
}

.option-card {
  padding: 12px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(24, 38, 70, 0.78), rgba(12, 24, 48, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.option-card-title {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(72, 199, 255, 0.34);
}

.option-card-subtitle {
  color: var(--muted);
  font-size: 11px;
  margin: 14px 0 6px;
  text-shadow: none;
}

.option-card label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.option-card label.check-row {
  display: flex;
}

.option-card .safety-option {
  margin: 10px 0;
}

.option-card label:first-child {
  margin-top: 0;
}

.option-card label:last-child {
  margin-bottom: 0;
}

.option-row {
  display: grid !important;
  grid-template-columns: minmax(92px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.option-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.option-inline.is-disabled {
  opacity: 0.52;
}

.option-inline small,
.option-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.option-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.option-actions .btn {
  width: 100%;
}

.options-scale-control {
  min-width: 150px;
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.options-scale-range {
  width: 100%;
  accent-color: #825cff;
}

.options-scale-value {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

body.app-compact-mode .panel.compact {
  padding-top: 14px;
  padding-bottom: 14px;
}

body.app-compact-mode .layout {
  gap: 10px;
  padding: 8px 10px 16px;
  max-width: calc(100vw - 20px);
}

body.app-compact-mode .content {
  gap: 0;
}

body.app-compact-mode .panel {
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
}

body.app-compact-mode .section-title {
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}

body.app-compact-mode .icon-box svg,
body.app-compact-mode .brand-icon svg {
  width: 24px;
  height: 24px;
}

body.app-compact-mode .workspace {
  gap: 10px;
}

body.app-compact-mode .form-row,
body.app-compact-mode .settings-grid,
body.app-compact-mode .table {
  row-gap: 10px;
}

body.app-compact-mode .form-row {
  gap: 10px;
}

body.app-compact-mode .settings-grid {
  gap: 8px 10px;
}

body.app-compact-mode .settings-grid label {
  gap: 4px;
}

body.app-compact-mode .settings-grid .check-row {
  min-height: 30px;
}

body.app-compact-mode .input,
body.app-compact-mode .select {
  height: 30px;
  padding: 5px 9px;
}

body.app-compact-mode .textarea {
  min-height: 54px;
  padding: 5px 9px;
}

body.app-compact-mode .btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

body.app-compact-mode .table {
  gap: 3px 5px;
}

body.app-compact-mode .sortable-row:not(.keyboard-action-row) {
  min-height: 64px;
  padding-left: 40px;
}

body.app-compact-mode .live-action-row {
  padding-left: 10px;
}

body.app-compact-mode .row-move-controls {
  grid-template-columns: 26px;
  grid-template-rows: 15px 30px 15px;
  gap: 2px;
}

body.app-compact-mode .row-move-arrow {
  width: 24px;
  height: 15px;
}

body.app-compact-mode .table-head {
  padding-left: 40px;
}

body.app-compact-mode .table-head {
  margin-bottom: 3px;
}

body.app-compact-mode .table > div {
  font-size: 11px;
}

body.app-compact-mode .gift-select-button,
body.app-compact-mode .value-rich-select .search-select-button {
  min-height: 46px;
}

body.app-compact-mode .random-image-control {
  grid-template-columns: 48px 32px;
  gap: 5px;
}

body.app-compact-mode .png-upload-slot {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

body.app-compact-mode .random-image-preview {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

body.app-compact-mode .random-image-clear {
  width: 32px;
  height: 32px;
}

body.app-compact-mode .random-selected-values {
  min-height: 36px;
  padding: 5px;
}

body.app-compact-mode .centered {
  height: 30px;
  margin-top: 7px;
}

body.app-compact-mode .gift-thumb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

body.app-compact-mode .value-visual {
  width: 30px;
  height: 30px;
}

body.app-compact-mode .option-card {
  padding: 10px;
}

body.app-compact-mode .option-card-title {
  margin-bottom: 7px;
}

body.app-compact-mode .option-card label,
body.app-compact-mode .option-card .safety-option {
  margin: 7px 0;
}

.panel.manual-collapsed {
  min-height: 70px;
}

.panel.manual-collapsed > :not(.section-title) {
  display: none !important;
}

.panel.manual-collapsed > .section-title {
  cursor: pointer;
}

.section-chip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.section-chip {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(120, 145, 255, 0.20);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(19, 31, 58, 0.74), rgba(10, 18, 34, 0.74));
  color: #dfe8ff;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.section-chip:hover {
  border-color: rgba(116, 84, 244, 0.54);
}

.section-chip.active,
.section-chip[aria-pressed="true"] {
  border-color: rgba(142, 104, 255, 0.74);
  background: linear-gradient(180deg, rgba(118, 84, 244, 0.70), rgba(48, 39, 116, 0.72));
  color: #ffffff;
  box-shadow: 0 0 14px rgba(116, 84, 244, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.section-chip[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.inline-mode {
  float: right;
  color: #c7d3f0;
}

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

.inline-options label {
  margin: 4px 0;
}

.goals-settings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(340px, 1fr) 150px;
  gap: 12px;
  align-items: end;
}

.goal-display-settings,
.goal-threshold-settings {
  border: 1px solid rgba(120, 145, 255, 0.14);
  border-radius: 7px;
  padding: 10px;
}

.goal-display-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.goal-threshold-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 8px;
}

.goal-display-settings legend,
.goal-threshold-settings legend {
  padding: 0 6px;
  color: #c7d3f0;
  font-size: 12px;
}

.goal-display-settings label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.goal-threshold-option {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(18, 30, 58, 0.66), rgba(9, 17, 35, 0.72));
  color: #b7c4e0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.goal-threshold-option:hover {
  border-color: rgba(85, 202, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(22, 38, 70, 0.76), rgba(12, 23, 45, 0.82));
  color: #dce8ff;
}

.goal-threshold-option .check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 5px;
  border: 2px solid rgba(151, 171, 218, 0.62);
  background: rgba(5, 12, 26, 0.88);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
}

.goal-threshold-option .check:checked {
  border-color: rgba(92, 224, 255, 0.95);
  background: linear-gradient(180deg, #49d9ff, #7a55f4);
  box-shadow:
    0 0 0 3px rgba(73, 217, 255, 0.12),
    0 0 14px rgba(122, 85, 244, 0.32);
}

.goal-threshold-option .check:checked::after {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -56%);
  font-size: 13px;
  line-height: 1;
}

.goal-threshold-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-threshold-option:has(.check:checked) {
  border-color: rgba(85, 202, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(23, 41, 75, 0.82), rgba(12, 27, 54, 0.9));
  box-shadow:
    0 0 0 1px rgba(85, 202, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.goal-enable-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.goal-enable-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.goal-enable-toggle .switch {
  flex: 0 0 40px;
}

@media (max-width: 1180px) {
  .goals-settings-layout {
    grid-template-columns: 1fr;
  }

  .goal-display-settings {
    grid-template-columns: minmax(220px, 360px);
  }

  .goal-threshold-settings {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 720px) {
  .goal-display-settings,
  .goal-threshold-settings {
    grid-template-columns: 1fr;
  }
}




/* styles/overlays.css */
.overlay-studio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 12px 14px;
  align-items: end;
}

.alerts-overlay-panel {
  display: grid;
  gap: 14px;
}

.alert-overlay-toolbar,
.alert-overlay-workbench {
  display: grid;
  gap: 12px;
}

.alert-overlay-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.alert-overlay-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-overlay-actions-row .btn {
  min-width: 132px;
}

.overlay-demo-pulse {
  transform: translateY(1px) scale(.985);
  filter: brightness(1.16);
}

.overlay-card-settings.alert-overlay-settings {
  grid-template-columns: minmax(150px, 1fr) minmax(118px, 160px) minmax(82px, 100px);
}

.overlay-card-settings.gift-jar-settings {
  grid-template-columns: minmax(160px, 220px) minmax(150px, 1fr) minmax(118px, 160px);
}

.overlay-card-settings.gift-jar-settings:has([data-field="gift_jar_gift_size_mode"] option[value="value"]:checked) {
  grid-template-columns: minmax(160px, 220px) minmax(150px, 1fr);
}

.overlay-card-settings.gift-jar-settings:has([data-field="gift_jar_gift_size_mode"] option[value="value"]:checked) [data-gift-jar-size-fixed-only] {
  display: none;
}

.alert-overlay-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-overlay-limit {
  font-weight: 850;
  color: #9eb5df;
}

.alert-overlay-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.alert-overlay-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 280px) minmax(0, 1fr) 126px;
  gap: 0;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(83, 116, 185, .42);
  border-radius: 8px;
  background: rgba(7, 14, 31, .66);
}

.alert-rule-left {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding-right: 12px;
  border-right: 1px solid rgba(105, 132, 190, .24);
  min-width: 0;
}

.alert-rule-left .row-move-controls {
  display: grid;
  gap: 4px;
}

.alert-rule-left .row-move-arrow,
.alert-rule-left .drag-handle {
  width: 34px;
  height: 32px;
}

.alert-rule-enabled {
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-rule-trigger {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid rgba(105, 132, 190, .24);
  border-radius: 8px 0 0 8px;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.alert-rule-trigger:hover,
.alert-rule-trigger:focus-visible {
  background: rgba(132, 153, 210, 0.08);
  outline: none;
}

.alert-rule-trigger .live-action-trigger-icon {
  justify-self: center;
}

.alert-rule-trigger strong,
.alert-rule-trigger .live-action-trigger-text strong {
  color: #eef5ff;
  font-size: 15px;
  font-weight: 900;
}

.alert-rule-trigger span,
.alert-rule-trigger .live-action-trigger-source,
.alert-rule-trigger .live-action-trigger-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-rule-groups {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.12fr)
    minmax(178px, 0.86fr)
    minmax(218px, 1fr);
  gap: 0;
  min-width: 0;
}

.alert-rule-group {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid rgba(105, 132, 190, .2);
}

.alert-rule-group:last-child {
  border-right: 0;
}

.alert-rule-group label {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: #c7d3f0;
  font-size: 11px;
  font-weight: 900;
}

.alert-rule-group .input,
.alert-rule-group .select,
.alert-rule-group .native-select-button {
  width: 100%;
  height: 31px;
  min-width: 0;
  margin-left: 0;
  padding: 5px 8px;
  font-size: 12px;
}

.alert-rule-group .native-select-wrap {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

.alert-rule-content-group,
.alert-rule-media-group {
  grid-template-columns: minmax(0, 1fr);
}

.alert-overlay-row[data-alert-live-event="gift"] .live-action-trigger-icon,
.alert-overlay-row[data-alert-live-event^="likes"] .live-action-trigger-icon {
  color: #ff77dd;
}

.alert-overlay-row[data-alert-live-event="gift_range"] .live-action-trigger-icon,
.alert-overlay-row[data-alert-live-event="subscribe"] .live-action-trigger-icon {
  color: #ffd760;
}

.alert-overlay-row[data-alert-live-event="follow"] .live-action-trigger-icon,
.alert-overlay-row[data-alert-live-event="join"] .live-action-trigger-icon,
.alert-overlay-row[data-alert-live-event="share"] .live-action-trigger-icon,
.alert-overlay-row[data-alert-live-event="comment"] .live-action-trigger-icon,
.alert-overlay-row[data-alert-live-event="custom"] .live-action-trigger-icon {
  color: #54d7ff;
}

.alert-rule-audio-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alert-rule-audio-url-field,
.alert-rule-duration-field {
  grid-column: 1 / -1;
}

.alert-rule-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-content: center;
  align-items: center;
  justify-items: stretch;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(105, 132, 190, .24);
}

.alert-rule-actions .btn {
  width: 100%;
  min-width: 0;
}

.alert-rule-actions .trash {
  flex: 0 0 auto;
}

.alerts-preview {
  height: 170px;
  min-height: 130px;
}

.alerts-preview iframe {
  min-height: 130px;
}

.gift-jar-preview {
  height: 460px;
  min-height: 340px;
}

.gift-jar-preview iframe {
  min-height: 340px;
}

@media (max-width: 1240px) {
  .alert-overlay-row {
    grid-template-columns: 54px minmax(210px, 250px) minmax(0, 1fr);
  }

  .alert-rule-trigger {
    border-right: 1px solid rgba(105, 132, 190, .24);
  }

  .alert-rule-groups {
    grid-column: 3 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 12px;
  }

  .alert-rule-actions {
    grid-column: 3 / -1;
    grid-template-columns: 96px 42px;
    justify-content: end;
    justify-items: stretch;
    padding: 10px 0 0 12px;
    border-left: 0;
    border-top: 1px solid rgba(105, 132, 190, .24);
  }

  .alert-rule-actions .trash {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .alert-overlay-url-row,
  .alert-overlay-actions-row,
  .overlay-card-settings.alert-overlay-settings,
  .overlay-card-settings.gift-jar-settings,
  .alert-rule-groups {
    grid-template-columns: 1fr;
  }

  .alert-overlay-actions-row {
    display: grid;
  }

  .alert-overlay-actions-row .btn {
    width: 100%;
  }

  .alert-overlay-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .alert-rule-left {
    padding-right: 0;
    border-right: 0;
  }

  .alert-rule-enabled {
    justify-content: flex-start;
  }

  .alert-rule-trigger,
  .alert-rule-groups,
  .alert-rule-actions {
    grid-column: 2 / -1;
  }

  .alert-rule-trigger {
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(105, 132, 190, .24);
  }

  .alert-rule-groups {
    padding-left: 0;
  }

  .alert-rule-group {
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(105, 132, 190, .16);
  }

  .alert-rule-condition-group,
  .alert-rule-audio-group {
    grid-template-columns: 1fr;
  }

  .alert-rule-actions {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 0;
    border-top: 0;
  }
}

.overlay-studio-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.overlay-studio-grid .check-row,
.server-eula-check {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.timer-options-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(13, 24, 46, 0.78), rgba(7, 15, 30, 0.78));
  border: 1px solid rgba(120, 145, 255, 0.18);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.timer-options-panel.in-overlay {
  margin-top: 0;
}

.timer-options-panel.in-overlay * {
  min-width: 0;
}

.timer-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 14px;
  align-items: stretch;
}

.timer-basic-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(72px, 92px) minmax(180px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.timer-basic-grid label,
.timer-rule-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #c7d3f0;
  font-size: 11px;
  font-weight: 900;
}

.timer-basic-grid .input,
.timer-basic-grid .select,
.timer-rule-field .input,
.timer-rule-field .select {
  width: 100%;
  margin-left: 0;
}

.timer-control-panel {
  display: grid;
  gap: 10px;
  align-content: end;
}

.timer-controls-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}

.timer-controls-row .btn {
  flex: 1 1 92px;
  min-width: 92px;
}

.timer-switch-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
}

.timer-switch-row label,
.timer-rule-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.timer-options-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 -2px;
}

.timer-options-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(120, 145, 255, 0.16);
}

.timer-options-head strong {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.timer-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.timer-rule-item {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 11px;
  align-items: stretch;
  min-height: 112px;
  padding: 12px;
  border: 1px solid rgba(120, 145, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 20, 42, 0.52);
}

.timer-rule-item-wide {
  grid-column: span 2;
}

.timer-rule-toggle {
  min-height: 30px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(120, 145, 255, 0.14);
}

.timer-rule-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  align-items: end;
}

.timer-rule-item-wide .timer-rule-fields {
  grid-template-columns: minmax(180px, 1fr) minmax(90px, 120px);
}

.timer-end-fields {
  grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1fr) minmax(76px, 96px);
}

.timer-rule-field .tiny-input,
.timer-end-grid .tiny-input {
  width: 100%;
  justify-self: stretch;
}

.timer-end-grid {
  margin-top: 12px;
}

.tts-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 4px 0 8px 28px;
}

.tts-settings label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tts-web-speech-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
}

.tts-web-speech-tools .input {
  min-width: 0;
}

@media (max-width: 720px) {
  .tts-web-speech-tools {
    grid-template-columns: 1fr;
  }
}

.thanks-template-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 12px 0 10px;
  padding: 14px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 35, 0.45);
}

.thanks-template-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 2px;
}

.thanks-template-head strong {
  color: #f5f8ff;
  font-size: 13px;
  font-weight: 950;
}

.thanks-template-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.thanks-template-settings label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.thanks-template-input {
  min-height: 52px;
  resize: vertical;
  line-height: 1.35;
}

.overlay-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.overlay-studio-panel > .overlay-preview-grid:not(.live-preview-grid) {
  display: none;
}

.overlay-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(132, 153, 210, 0.14);
}

.overlay-preview-toolbar strong {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.overlay-preview-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overlay-preview-toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.overlay-sync-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 23, 44, 0.76), rgba(7, 14, 28, 0.72));
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overlay-sync-status strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.overlay-sync-status span:not(.overlay-sync-dot) {
  display: block;
  line-height: 1.35;
}

.overlay-sync-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 16px rgba(158, 176, 210, 0.42);
}

.overlay-sync-ok {
  border-color: rgba(54, 214, 130, 0.22);
  background: linear-gradient(180deg, rgba(17, 48, 42, 0.66), rgba(7, 18, 26, 0.72));
}

.overlay-sync-ok .overlay-sync-dot {
  background: #36d682;
  box-shadow: 0 0 16px rgba(54, 214, 130, 0.58);
}

.overlay-sync-warn {
  border-color: rgba(255, 104, 130, 0.32);
  background: linear-gradient(180deg, rgba(58, 20, 38, 0.58), rgba(20, 12, 26, 0.72));
}

.overlay-sync-warn .overlay-sync-dot {
  background: #ff6882;
  box-shadow: 0 0 16px rgba(255, 104, 130, 0.58);
}

.overlay-sync-pending .overlay-sync-dot {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(53, 200, 255, 0.7);
  animation: overlay-sync-pulse 1s ease-in-out infinite;
}

@keyframes overlay-sync-pulse {
  0%, 100% { opacity: 0.52; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

.overlay-preview-grid.live-preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  justify-content: start;
  align-items: start;
  grid-auto-flow: row dense;
  gap: 14px;
}

.overlay-preview-card {
  min-height: 92px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 32, 61, 0.88), rgba(10, 18, 34, 0.9));
  border: 1px solid rgba(120, 145, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 24px rgba(0,0,0,.22);
}

.live-overlay-card {
  min-height: 0;
  display: grid;
  gap: 9px;
  min-width: 0;
  align-self: start;
  align-content: start;
  width: 100%;
  max-width: none;
}

.live-overlay-card.wide-preview {
  grid-column: span 2;
  max-width: 100%;
}

.overlay-preview-grid.live-preview-grid > .event-overlay-card,
.overlay-preview-grid.live-preview-grid > .winlose-studio-card {
  grid-column: 1 / -1;
}

.event-overlay-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.event-overlay-card .overlay-preview-head {
  grid-column: auto;
}

.event-overlay-card .overlay-card-settings,
.event-overlay-card .overlay-preview-url {
  grid-column: auto;
}

.event-overlay-card .overlay-frame-wrap.events {
  grid-column: auto;
  grid-row: auto;
  height: 330px;
  min-height: 260px;
}

.overlay-card-cluster {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-self: start;
}

.gift-insights-layout {
  grid-column: 1 / -1;
  grid-template-columns: minmax(460px, 0.95fr) minmax(420px, 1fr);
  align-items: start;
}

.gift-insights-layout .live-overlay-card {
  max-width: none;
}

.gift-insights-side {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
}

.timer-overlay-card {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow: hidden;
}

.winlose-studio-card {
  grid-column: 1 / -1;
  max-width: 100%;
  gap: 10px;
  overflow: hidden;
}

.winlose-studio-head {
  min-height: 34px;
  padding: 2px 0 8px;
  border-bottom: 1px solid rgba(132, 153, 210, 0.12);
}

.overlay-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.overlay-preview-head strong {
  margin: 0;
}

.overlay-preview-head > .btn {
  margin-left: auto;
}

.overlay-preview-head-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.overlay-preview-head-actions .btn {
  margin-left: 0;
}

.overlay-preview-url {
  width: 100%;
  height: 32px;
  font-size: 12px;
}

.overlay-card-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  align-items: start;
  align-content: start;
  justify-content: start;
  padding: 9px;
  border: 1px solid rgba(132, 153, 210, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 24, 0.24);
  min-width: 0;
}

.overlay-card-settings.ranking-settings {
  grid-template-columns: minmax(120px, 1.2fr) minmax(100px, 0.9fr) minmax(68px, 0.55fr) minmax(68px, 0.55fr);
}

.overlay-card-settings.event-settings {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(82px, 0.6fr) repeat(4, minmax(72px, 0.55fr));
}

.overlay-card-settings.goals-settings {
  grid-template-columns: minmax(132px, 1fr) minmax(104px, 0.65fr) minmax(84px, 0.55fr);
}

.overlay-card-settings.small-list-settings {
  grid-template-columns: minmax(132px, 1fr) minmax(104px, 0.7fr) minmax(84px, 0.55fr);
}

.overlay-card-settings.small-width-settings {
  grid-template-columns: minmax(132px, 1fr) minmax(104px, 0.7fr) minmax(84px, 0.55fr);
}

.overlay-card-settings.roulette-settings {
  grid-template-columns: minmax(132px, 1fr) minmax(112px, 0.7fr) minmax(76px, 0.48fr);
}

.overlay-card-settings.followers-settings {
  grid-template-columns: minmax(86px, 1fr) minmax(86px, 1fr) minmax(58px, 0.46fr) minmax(48px, max-content) minmax(68px, 0.52fr);
}

.overlay-card-settings.followers-settings .overlay-followers-names {
  align-self: end;
  min-width: 0;
  white-space: nowrap;
  gap: 5px;
  padding-left: 6px;
  padding-right: 6px;
}

.overlay-card-settings.timer-settings {
  grid-template-columns: minmax(118px, 1fr) repeat(2, minmax(54px, 72px)) minmax(104px, 0.9fr) minmax(84px, 0.75fr);
}

.overlay-card-settings.timer-settings label,
.overlay-card-settings.timer-settings .select,
.overlay-card-settings.timer-settings .input {
  min-width: 0;
}

.overlay-card-settings.smart-bar-settings {
  grid-template-columns:
    minmax(86px, 0.8fr)
    minmax(82px, 0.76fr)
    minmax(112px, 1fr)
    minmax(58px, 0.54fr)
    minmax(58px, 0.54fr)
    minmax(48px, 0.44fr);
}

.overlay-card-settings.smart-bar-toggle-settings {
  grid-template-columns: repeat(6, minmax(74px, 1fr));
}

.overlay-card-settings.minecraft-smart-bar-settings {
  grid-template-columns:
    minmax(94px, 0.82fr)
    minmax(128px, 1fr)
    minmax(58px, 0.52fr)
    minmax(62px, 0.56fr)
    minmax(48px, 0.44fr);
}

.overlay-card-settings.minecraft-smart-bar-toggle-settings {
  grid-template-columns: repeat(4, minmax(78px, 1fr));
}

.overlay-card-settings.game-smart-bar-settings {
  grid-template-columns:
    minmax(94px, 0.82fr)
    minmax(128px, 1fr)
    minmax(58px, 0.52fr)
    minmax(62px, 0.56fr)
    minmax(48px, 0.44fr);
}

.overlay-card-settings.game-smart-bar-toggle-settings {
  grid-template-columns: repeat(4, minmax(78px, 1fr));
}

.overlay-card-settings.smart-bar-settings label,
.overlay-card-settings.smart-bar-toggle-settings label,
.overlay-card-settings.minecraft-smart-bar-settings label,
.overlay-card-settings.minecraft-smart-bar-toggle-settings label,
.overlay-card-settings.game-smart-bar-settings label,
.overlay-card-settings.game-smart-bar-toggle-settings label,
.overlay-card-settings.smart-bar-settings .select,
.overlay-card-settings.minecraft-smart-bar-settings .select,
.overlay-card-settings.game-smart-bar-settings .select,
.overlay-card-settings.smart-bar-settings .input,
.overlay-card-settings.minecraft-smart-bar-settings .input,
.overlay-card-settings.game-smart-bar-settings .input {
  min-width: 0;
}

.overlay-card-settings.winlose-settings {
  grid-template-columns: minmax(86px, 0.7fr) minmax(130px, 0.9fr) minmax(140px, 1fr) repeat(2, minmax(110px, 0.8fr)) repeat(3, minmax(78px, 0.55fr));
}

.overlay-card-settings.winlose-actions-settings {
  grid-template-columns: minmax(90px, 0.62fr) minmax(120px, 0.82fr) repeat(5, minmax(80px, 0.58fr)) minmax(86px, 0.6fr);
}

.winlose-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.winlose-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  align-content: start;
}

.winlose-preview-pane .winlose-preview-url-row,
.winlose-preview-pane .overlay-card-settings {
  grid-column: auto;
}

.winlose-preview-pane .overlay-frame-wrap {
  grid-column: auto;
  grid-row: auto;
}

.winlose-preview-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.winlose-preview-url-row .overlay-preview-url {
  min-width: 0;
}

.winlose-preview-url-row .btn {
  min-height: 32px;
  white-space: nowrap;
}

.winlose-preview-url-row [data-click="reset-winlose-state"] {
  min-width: 112px;
}

.winlose-preview-url-row .copy-link {
  min-width: 74px;
}

.winlose-studio-card .overlay-card-settings.winlose-settings {
  grid-template-columns: repeat(4, minmax(82px, 1fr));
}

.winlose-studio-card .overlay-card-settings.winlose-actions-settings {
  grid-template-columns: repeat(4, minmax(82px, 1fr));
}

.overlay-card-settings.single-setting {
  grid-template-columns: minmax(0, 190px);
}

.overlay-card-settings label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #c7d3f0;
  font-size: 11px;
  font-weight: 900;
  min-width: 0;
}

.overlay-card-settings .overlay-inline-check {
  min-height: 31px;
  align-self: end;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 6px;
  background: rgba(8, 15, 30, 0.36);
  color: #eef5ff;
  line-height: 1.1;
}

.overlay-card-settings .input,
.overlay-card-settings .select {
  width: 100%;
  height: 31px;
  min-width: 0;
  margin-left: 0;
  padding: 5px 8px;
  font-size: 12px;
}

.overlay-card-settings .native-select-wrap {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

.overlay-card-settings .native-select-button {
  height: 31px;
  padding: 5px 8px;
  font-size: 12px;
}

.overlay-card-settings .color-input {
  min-width: 0;
  padding: 3px;
  cursor: pointer;
}

.overlay-card-settings label.control-disabled {
  opacity: 0.45;
}

.overlay-card-settings label.control-disabled .input,
.overlay-card-settings label.control-disabled .select,
.overlay-card-settings label.control-disabled .native-select-button {
  cursor: not-allowed;
  filter: grayscale(0.75);
}

.overlay-card-settings label.control-disabled .native-select-button {
  box-shadow: none;
}

.winlose-rules-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(132, 153, 210, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 24, 0.24);
}

.winlose-rules-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.winlose-rules-head strong {
  margin: 0;
  color: var(--cyan);
}

.winlose-rules-head .btn {
  margin-left: auto;
}

.winlose-rule-list {
  display: grid;
  gap: 7px;
}

.winlose-rule-row {
  display: grid;
  grid-template-columns: 34px minmax(330px, 1.18fr) minmax(190px, 0.58fr) minmax(96px, 0.22fr) 92px;
  grid-template-areas: "move trigger counter delta buttons";
  gap: 10px;
  align-items: stretch;
  min-height: 82px;
  padding: 10px 10px 10px 6px;
  border: 1px solid rgba(132, 153, 210, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 26, 48, 0.94), rgba(8, 17, 32, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.winlose-rule-row .row-move-controls {
  grid-area: move;
  position: static;
  transform: none;
  align-self: center;
  justify-self: start;
}

.winlose-rule-row .drag-handle {
  height: 34px;
  min-height: 0;
}

.winlose-rule-trigger {
  grid-area: trigger;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 4px 14px 4px 0;
  border: 0;
  border-right: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px 0 0 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.winlose-rule-trigger:hover,
.winlose-rule-trigger:focus-visible {
  background: rgba(40, 199, 255, 0.06);
  outline: 1px solid rgba(40, 199, 255, 0.26);
  outline-offset: -1px;
}

.winlose-rule-trigger-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.winlose-rule-trigger-icon svg {
  width: 52px;
  height: 52px;
}

.winlose-rule-trigger-icon .data-icon-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.42));
}

.winlose-rule-trigger-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.winlose-rule-trigger-copy strong,
.winlose-rule-trigger-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winlose-rule-trigger-copy strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.winlose-rule-trigger-copy small {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 800;
}

.winlose-rule-trigger-fields,
.winlose-rule-counter-card,
.winlose-rule-delta-card {
  display: grid;
  gap: 7px;
  align-content: center;
  min-width: 0;
}

.winlose-rule-trigger-fields {
  grid-template-columns: minmax(164px, 1.15fr) minmax(136px, 0.85fr);
}

.winlose-rule-trigger-fields[hidden],
.winlose-condition-panel[hidden] {
  display: none !important;
}

.winlose-rule-counter-card {
  grid-area: counter;
  padding-left: 4px;
}

.winlose-rule-delta-card {
  grid-area: delta;
}

.winlose-rule-buttons {
  grid-area: buttons;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.winlose-condition-panel {
  grid-area: details;
  display: grid;
  grid-template-columns: auto minmax(190px, 0.95fr) repeat(3, minmax(118px, 1fr));
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(132, 153, 210, 0.12);
  border-radius: 7px;
  background: rgba(5, 12, 24, 0.22);
}

.winlose-condition-title {
  align-self: center;
  min-width: 124px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.winlose-rule-row label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  color: #c7d3f0;
  font-size: 10px;
  font-weight: 900;
}

.winlose-condition-empty {
  align-self: stretch;
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px dashed rgba(132, 153, 210, 0.22);
  border-radius: 6px;
  color: rgba(199, 211, 240, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.winlose-rule-row .input,
.winlose-rule-row .select,
.winlose-rule-row .gift-select,
.winlose-rule-row .native-select-button {
  width: 100%;
  min-width: 0;
}

.winlose-rule-row .input,
.winlose-rule-row .select,
.winlose-rule-row .native-select-button,
.winlose-rule-row .gift-select-button {
  height: 36px;
  margin: 0;
  padding: 6px 9px;
  font-size: 13px;
}

.winlose-rule-row .gift-select-button {
  width: 100%;
}

.winlose-rule-row .winlose-rule-enabled {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid rgba(132, 153, 210, 0.28);
  border-radius: 8px;
  background: rgba(13, 27, 54, 0.82);
  cursor: pointer;
}

.winlose-rule-row .winlose-rule-enabled span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.winlose-rule-row .trash {
  align-self: center;
  justify-self: center;
}

.overlay-frame-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(132, 153, 210, 0.16);
  background:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25% 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25% 75%, rgba(255,255,255,.035) 75%),
    rgba(5, 10, 18, 0.64);
  background-position: 0 0, 8px 8px, 0 0;
  background-size: 16px 16px, 16px 16px, auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.overlay-frame-wrap.ranking {
  height: 430px;
}

.overlay-frame-wrap.events {
  height: 260px;
}

.overlay-frame-wrap.overlay-size-exceeded::after {
  content: "Przekroczono 800x600: " attr(data-overlay-size);
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  border: 1px solid rgba(255, 211, 93, 0.44);
  border-radius: 8px;
  background: rgba(38, 27, 8, 0.88);
  color: #ffd35d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.overlay-frame-wrap.small-overlay {
  height: 130px;
}

.overlay-frame-wrap.smart-bar-preview {
  height: 96px;
}

.overlay-frame-wrap.minecraft-smart-bar-preview {
  height: 118px;
}

.overlay-frame-wrap.game-smart-bar-preview {
  height: 118px;
}

.overlay-frame-wrap.winlose-preview {
  height: 286px;
}

.overlay-frame-wrap.winlose-actions-preview {
  height: 270px;
}

.overlay-frame-wrap.small-overlay.showcase-capable {
  height: 248px;
}

.overlay-frame-wrap.small-overlay.multi-capable {
  height: 340px;
}

.overlay-frame-wrap iframe {
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: 0;
  display: block;
  margin: 0 auto;
  background: transparent;
  transform-origin: top left;
}

.overlay-frame-wrap iframe.overlay-frame-loading {
  opacity: 0;
  background: transparent !important;
}

.overlay-preview-card strong {
  display: block;
  color: var(--cyan);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 12px;
}

.overlay-preview-card .winlose-rules-head strong {
  display: inline;
  margin: 0;
  color: var(--cyan);
}

.preview-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
}

.preview-row b {
  grid-column: 2;
  color: #fff;
}

.preview-icon {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: linear-gradient(180deg, #7654f4, #4d2cc7);
  box-shadow: 0 0 16px rgba(116,84,244,.35);
}

@media (max-width: 1200px) {
  .overlay-studio-grid,
  .overlay-preview-grid:not(.live-preview-grid) {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .overlay-preview-grid.live-preview-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  }

  .timer-top-grid {
    grid-template-columns: 1fr;
  }

  .timer-basic-grid {
    grid-template-columns: minmax(180px, 1.4fr) minmax(72px, 0.45fr) minmax(160px, 1fr);
  }

  .timer-rule-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .timer-rule-item-wide {
    grid-column: 1 / -1;
  }

  .youtube-playlist-settings {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .music-command-grid,
  .spotify-command-grid,
  .music-toggle-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .overlay-card-settings.event-settings,
  .overlay-card-settings.winlose-settings,
  .overlay-card-settings.winlose-actions-settings,
  .overlay-card-settings.smart-bar-settings,
  .overlay-card-settings.smart-bar-toggle-settings,
  .overlay-card-settings.minecraft-smart-bar-settings,
  .overlay-card-settings.minecraft-smart-bar-toggle-settings,
  .overlay-card-settings.game-smart-bar-settings,
  .overlay-card-settings.game-smart-bar-toggle-settings {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .overlay-card-settings.event-settings {
    grid-template-columns: minmax(112px, 1fr) minmax(112px, 1fr) minmax(74px, 0.58fr) repeat(4, minmax(66px, 0.52fr));
  }

  .winlose-rule-row {
    grid-template-columns: 34px minmax(0, 1fr) minmax(140px, 0.48fr) 92px;
    grid-template-areas:
      "move trigger trigger buttons"
      ". counter delta buttons";
  }

  .winlose-rule-trigger {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .winlose-condition-panel {
    grid-template-columns: minmax(120px, 0.55fr) repeat(2, minmax(120px, 1fr));
  }

  .game-mode-toolbar,
  .server-install-compact,
  .server-profile-toolbar,
  .server-tool-switch,
  .server-profile-panel .path-picker-inline,
  .modpack-server-tool,
  .modpack-server-checks,
  .modpack-server-actions,
  .server-install-tool-actions,
  .paper-via-toolbar,
  .game-mode-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "meta"
      "actions";
  }

  .server-tool-main-actions,
  .modpack-server-actions,
  .server-install-tool-actions {
    justify-content: stretch;
  }

  .server-tool-main-actions .btn,
  .modpack-server-actions .btn,
  .server-install-tool-actions .btn {
    flex: 1 1 140px;
  }

  .modpack-debug-limit,
  .modpack-server-actions {
    grid-column: 1 / -1;
  }

  .game-mode-meta {
    justify-content: flex-start;
  }

  .game-mode-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .game-mode-wizard-grid {
    grid-template-columns: 1fr;
  }

  .live-overlay-card.wide-preview {
    grid-column: span 1;
  }

  .overlay-preview-grid.live-preview-grid > .event-overlay-card,
  .overlay-preview-grid.live-preview-grid > .winlose-studio-card,
  .timer-overlay-card {
    grid-column: 1 / -1;
  }

  .gift-insights-layout {
    grid-template-columns: 1fr;
  }

  .timer-overlay-card {
    grid-column: 1 / -1;
  }

  .event-overlay-card,
  .winlose-preview-pane {
    grid-template-columns: 1fr;
  }

  .event-overlay-card .overlay-card-settings,
  .event-overlay-card .overlay-preview-url,
  .event-overlay-card .overlay-frame-wrap.events,
  .winlose-preview-pane .winlose-preview-url-row,
  .winlose-preview-pane .overlay-card-settings,
  .winlose-preview-pane .overlay-frame-wrap {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .overlay-preview-grid.live-preview-grid,
  .timer-top-grid,
  .timer-basic-grid,
  .timer-options-head,
  .timer-rule-grid,
  .timer-end-grid,
  .timer-rule-item,
  .timer-rule-item-wide,
  .overlay-card-settings.ranking-settings,
  .overlay-card-settings.roulette-settings,
  .overlay-card-settings.goals-settings,
  .overlay-card-settings.alert-overlay-settings,
  .overlay-card-settings.gift-jar-settings,
  .overlay-card-settings.small-list-settings,
  .overlay-card-settings.small-width-settings,
  .overlay-card-settings.followers-settings,
  .overlay-card-settings.timer-settings,
  .overlay-card-settings.winlose-settings,
  .overlay-card-settings.winlose-actions-settings,
  .overlay-card-settings.smart-bar-settings,
  .overlay-card-settings.smart-bar-toggle-settings,
  .overlay-card-settings.minecraft-smart-bar-settings,
  .overlay-card-settings.minecraft-smart-bar-toggle-settings,
  .overlay-card-settings.game-smart-bar-settings,
  .overlay-card-settings.game-smart-bar-toggle-settings,
  .winlose-rule-row,
  .winlose-condition-panel,
  .winlose-preview-grid,
  .winlose-preview-url-row,
  .png-picker-toolbar,
  .music-command-grid,
  .spotify-command-grid,
  .music-toggle-grid,
  .game-control-grid,
  .console-row {
    grid-template-columns: 1fr;
  }

  .winlose-rule-row {
    grid-template-areas:
      "move"
      "trigger"
      "counter"
      "delta"
      "buttons";
  }

  .winlose-rule-trigger {
    grid-template-columns: 50px minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid rgba(132, 153, 210, 0.18);
    padding: 0 0 10px;
  }

  .winlose-rule-trigger-icon {
    width: 50px;
    height: 50px;
  }

  .winlose-rule-trigger-fields {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .winlose-rule-counter-card {
    padding-left: 0;
  }

  .winlose-condition-title {
    min-width: 0;
  }

  .winlose-rule-buttons {
    justify-content: flex-start;
  }

  .overlay-preview-head > .btn,
  .overlay-preview-head-actions {
    margin-left: 0;
    width: 100%;
  }

  .overlay-preview-head-actions .btn {
    flex: 1 1 150px;
  }

  .winlose-preview-url-row .btn {
    width: 100%;
  }

  .timer-controls-row,
  .timer-switch-row {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .timer-switch-row label {
    flex: 1 1 120px;
  }

  .timer-rule-field .tiny-input,
  .timer-end-grid .tiny-input {
    width: 100%;
    justify-self: stretch;
  }

  .timer-rule-fields,
  .timer-rule-item-wide .timer-rule-fields,
  .timer-end-fields {
    grid-template-columns: 1fr;
  }

  .winlose-rule-enabled,
  .winlose-rule-row .trash {
    justify-self: start;
  }
}

.alert-overlay-row {
  grid-template-columns:
    58px
    minmax(180px, 0.78fr)
    minmax(190px, 0.84fr)
    minmax(330px, 1.36fr)
    minmax(176px, 0.76fr)
    204px;
  gap: 0;
  min-height: 154px;
  padding: 10px;
  border-color: rgba(132, 153, 210, 0.22);
  background: linear-gradient(180deg, rgba(14, 26, 48, 0.94), rgba(8, 17, 32, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.alert-overlay-row .alert-rule-left {
  padding: 0 10px 0 0;
  border-right: 1px solid rgba(132, 153, 210, 0.18);
}

.alert-overlay-row .alert-rule-left .row-move-controls {
  position: static;
  transform: none;
}

.alert-overlay-row .alert-rule-trigger,
.alert-rule-media-cell,
.alert-rule-settings-panel,
.alert-rule-audio-slot {
  border-right: 1px solid rgba(132, 153, 210, 0.18);
}

.alert-overlay-row .alert-rule-trigger {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  min-height: 132px;
  padding: 8px 14px;
  border-radius: 0;
}

.alert-rule-media-cell {
  display: grid;
  min-width: 0;
  padding: 0 12px;
}

.alert-rule-media-slot,
.alert-rule-audio-slot {
  width: 100%;
  min-width: 0;
  min-height: 132px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d8e5ff;
  cursor: pointer;
}

.alert-rule-media-slot {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 10px 14px;
  text-align: left;
}

.alert-rule-media-slot.configured {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  align-content: center;
}

.alert-rule-media-slot:hover,
.alert-rule-media-slot:focus-visible,
.alert-rule-audio-slot:hover,
.alert-rule-audio-slot:focus-visible,
.alert-rule-trigger:hover,
.alert-rule-trigger:focus-visible {
  background: rgba(132, 153, 210, 0.08);
  outline: none;
}

.alert-rule-media-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(53, 207, 255, 0.28);
  border-radius: 10px;
  background: rgba(7, 20, 39, 0.72);
  color: #8bcfff;
  font-size: 10px;
  font-weight: 950;
  overflow: hidden;
}

.alert-rule-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.alert-rule-media-copy,
.alert-rule-audio-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.alert-rule-media-copy strong,
.alert-rule-audio-copy strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.12;
}

.alert-rule-media-copy small,
.alert-rule-audio-copy small {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-rule-media-copy strong,
.alert-rule-audio-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-rule-settings-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  align-content: center;
}

.alert-rule-settings-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #d5ddf0;
  font-size: 12px;
  font-weight: 850;
}

.alert-rule-settings-panel .input,
.alert-rule-settings-panel .select,
.alert-rule-settings-panel .native-select-button {
  width: 100%;
  min-width: 0;
  height: 42px;
  margin: 0;
  font-size: 14px;
}

.alert-rule-settings-panel .native-select-wrap {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.alert-rule-duration-label {
  position: relative;
}

.alert-rule-duration-label span {
  justify-self: end;
  margin-bottom: -22px;
  padding-right: 2px;
  color: #d5ddf0;
  font-size: 11px;
  font-weight: 850;
  pointer-events: none;
  z-index: 1;
}

.alert-rule-duration-label .input {
  padding-right: 48px;
}

.alert-rule-audio-slot {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  text-align: left;
}

.alert-rule-audio-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.alert-rule-audio-slot.configured .alert-rule-audio-plus,
.alert-rule-audio-slot.configured .alert-rule-audio-copy strong {
  color: #ffe39a;
}

.alert-overlay-row .alert-rule-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 0 0 0 12px;
  border-left: 0;
}

.alert-rule-test-button {
  height: 50px;
  min-width: 72px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #198bed, #1169ce);
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.42);
}

.alert-rule-icon-button {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alert-media-modal-card {
  width: min(1200px, calc(100vw - 48px));
  max-height: min(92vh, 940px);
  overflow: auto;
}

.alert-media-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.alert-media-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(5, 10, 18, 0.78);
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
}

.alert-media-tab.active {
  background: linear-gradient(180deg, #1687ee, #0d63c5);
}

.alert-media-tab em {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #dce7ff;
  font-style: normal;
  font-size: 11px;
}

.alert-media-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.alert-media-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
  gap: 12px;
  margin-top: 12px;
  min-height: 420px;
}

.alert-media-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  max-height: min(56vh, 560px);
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.alert-media-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(6, 9, 14, 0.7);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.alert-media-item.active,
.alert-media-item:hover,
.alert-media-item:focus-visible {
  background: rgba(10, 32, 58, 0.86);
  outline: none;
}

.alert-media-item-thumb {
  width: 66px;
  height: 42px;
  border-radius: 4px;
  background: #05070c;
  color: #8bcfff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 10px;
  font-weight: 950;
}

.alert-media-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.alert-media-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.alert-media-item-copy strong,
.alert-media-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-media-item-copy strong {
  font-size: 15px;
  font-weight: 850;
}

.alert-media-item-copy small {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 750;
}

.alert-media-item em {
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 172, 60, 0.42);
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.alert-media-preview-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  border-radius: 8px;
  background: rgba(5, 9, 16, 0.72);
  overflow: hidden;
}

.alert-media-preview {
  min-height: 320px;
  display: grid;
  place-items: center;
  background: rgba(2, 7, 16, 0.62);
}

.alert-media-preview img,
.alert-media-preview video {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.alert-media-preview-empty,
.alert-media-empty {
  color: #9eb5df;
  font-size: 13px;
  font-weight: 850;
}

.alert-media-empty {
  padding: 14px;
  border: 1px dashed rgba(132, 153, 210, 0.28);
  border-radius: 8px;
}

.alert-media-preview-copy {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-top: 1px solid rgba(132, 153, 210, 0.16);
}

.alert-media-preview-copy strong,
.alert-media-preview-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-media-preview-copy strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.alert-media-preview-copy span {
  color: #9eb5df;
  font-size: 12px;
  font-weight: 800;
}

.alert-media-url-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: #d5ddf0;
  font-size: 12px;
  font-weight: 850;
}

.alert-media-modal-actions {
  margin-top: 12px;
}

@media (max-width: 1480px) {
  .alert-overlay-row {
    grid-template-columns: 58px minmax(170px, 0.8fr) minmax(180px, 0.82fr) minmax(300px, 1.2fr) minmax(160px, 0.72fr) 188px;
  }

  .alert-rule-icon-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 1220px) {
  .alert-overlay-row {
    grid-template-columns: 48px minmax(132px, 0.72fr) minmax(144px, 0.78fr) minmax(258px, 1.18fr) minmax(142px, 0.72fr) minmax(102px, auto);
    min-width: 900px;
    min-height: 132px;
  }

  .alert-overlay-row .alert-rule-left,
  .alert-overlay-row .alert-rule-trigger,
  .alert-rule-media-cell,
  .alert-rule-settings-panel {
    grid-column: auto;
    grid-row: auto;
    border-top: 0;
  }

  .alert-rule-audio-slot {
    grid-column: auto;
    grid-row: auto;
    border-top: 0;
    border-right: 1px solid rgba(132, 153, 210, 0.18);
  }

  .alert-overlay-row .alert-rule-actions {
    grid-column: auto;
    grid-row: auto;
    justify-content: center;
    padding: 0 0 0 10px;
    border-top: 0;
  }

  .alert-overlay-row .alert-rule-left {
    padding-right: 8px;
  }

  .alert-overlay-row .alert-rule-trigger {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    min-height: 112px;
    padding: 8px 10px;
  }

  .alert-rule-media-cell,
  .alert-rule-settings-panel,
  .alert-rule-audio-slot {
    padding-left: 10px;
    padding-right: 10px;
  }

  .alert-rule-settings-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .alert-rule-settings-panel .input,
  .alert-rule-settings-panel .select,
  .alert-rule-settings-panel .native-select-button {
    height: 36px;
    font-size: 12px;
  }

  .alert-rule-media-slot,
  .alert-rule-audio-slot {
    min-height: 112px;
  }

  .alert-rule-test-button {
    min-width: 64px;
    height: 44px;
    padding: 0 12px;
  }

  .alert-rule-icon-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .alert-media-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .alert-overlay-url-row,
  .alert-media-toolbar {
    grid-template-columns: 1fr;
  }

  .alert-overlay-row {
    grid-template-columns: 44px minmax(118px, 0.72fr) minmax(128px, 0.78fr) minmax(236px, 1.18fr) minmax(126px, 0.72fr) minmax(92px, auto);
    min-width: 790px;
    padding: 8px;
  }

  .alert-overlay-row .alert-rule-left,
  .alert-overlay-row .alert-rule-trigger,
  .alert-rule-media-cell,
  .alert-rule-settings-panel,
  .alert-rule-audio-slot,
  .alert-overlay-row .alert-rule-actions {
    grid-column: auto;
    grid-row: auto;
    border-top: 0;
  }

  .alert-overlay-row .alert-rule-left {
    border-top: 0;
    border-right: 1px solid rgba(132, 153, 210, 0.18);
    padding: 0 8px 0 0;
  }

  .alert-rule-settings-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 1px solid rgba(132, 153, 210, 0.18);
  }

  .alert-rule-media-slot,
  .alert-rule-audio-slot,
  .alert-overlay-row .alert-rule-trigger {
    min-height: 86px;
  }

  .alert-media-modal-card {
    width: calc(100vw - 24px);
  }

  .alert-media-tabs {
    flex-wrap: wrap;
  }
}



/* styles/diagnostics_modals.css */
.play,
.save,
.stop,
.refresh {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -1px;
}

.play {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255, 255, 255, 0.9);
}

.save {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-top-width: 4px;
}

.stop {
  background: rgba(255, 255, 255, 0.75);
}

.refresh {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left-color: transparent;
  border-radius: 50%;
}

.preset-list {
  margin-top: 10px;
}

.preset-list-head {
  display: grid;
  grid-template-columns: 260px 130px 1fr;
  gap: 12px;
  margin-top: 18px;
  padding: 0 0 2px;
  color: var(--text-strong);
  font-weight: 900;
  line-height: 1.2;
}

.preset-list-head > span {
  min-width: 0;
}

.preset-row {
  display: grid;
  grid-template-columns: 260px 130px 1fr;
  gap: 12px;
  margin-bottom: 5px;
}

.preset-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.preset-name-cell .input {
  min-width: 0;
  flex: 1;
}

.render-report-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.render-missing-chip {
  padding: 6px 9px;
  border: 1px solid rgba(255, 130, 145, 0.32);
  border-radius: 999px;
  background: rgba(229, 101, 115, 0.13);
  color: #ffd6dd;
  font-size: 12px;
  font-weight: 800;
}

.render-ok {
  color: #79f0a4;
  font-weight: 900;
}

.preset-group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 145, 255, 0.12);
}

.preset-group-title {
  display: grid;
  grid-template-columns: 1fr 34px 34px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.preset-group-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(190, 170, 255, 0.25);
  color: #fff;
  background: linear-gradient(180deg, #202947, #111a31);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.preset-group-toggle:hover {
  filter: brightness(1.12);
}

.preset-group.collapsed .preset-group-rows {
  display: none;
}

.empty-presets {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.console-row {
  display: grid;
  grid-template-columns: 1fr 90px 110px;
  gap: 12px;
}

.game-control-panel {
  gap: 14px;
}

.game-control-note {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(72, 199, 255, 0.28);
  background: rgba(4, 12, 28, 0.42);
  color: #b8c7ea;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.game-submode-panel {
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--accent-border-strong);
  background: linear-gradient(180deg, var(--panel0), var(--panel1));
}

.game-submode-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.game-submode-head strong {
  color: var(--text);
}

.game-submode-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.game-submode-button {
  min-height: 62px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.game-submode-button span {
  display: block;
  color: inherit;
  font-size: 13px;
  font-weight: 1000;
}

.game-submode-button small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.game-submode-button:hover {
  border-color: var(--cyan);
  background: var(--accent-soft);
}

.game-submode-button.active {
  border-color: var(--cyan);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface-field));
  box-shadow: 0 0 18px var(--blue-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-submode-button.active small {
  color: var(--text);
}

.game-submode-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-control-card {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(72, 199, 255, 0.22);
  background: linear-gradient(180deg, rgba(17, 31, 59, 0.92), rgba(7, 18, 38, 0.9));
}

.game-control-card + .game-control-card {
  margin-top: 10px;
}

.game-control-card-title {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 1000;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.game-control-card p {
  margin: 0 0 12px;
  color: #aebce0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.game-control-card code {
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.game-control-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.55fr) minmax(180px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.game-control-card label {
  color: #d8e2fb;
  font-size: 13px;
  font-weight: 900;
}

.game-control-card label .input,
.game-control-card label .select {
  margin-top: 6px;
}

.game-control-textarea {
  min-height: 84px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.35;
}

.game-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.status-line {
  color: #c7d3f0;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.diagnostic-card {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.92), rgba(16, 26, 49, 0.94));
  border: 1px solid rgba(132, 153, 210, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.diagnostic-card.diagnostic-ok {
  border-color: rgba(93, 232, 139, 0.36);
}

.diagnostic-card.diagnostic-warn {
  border-color: rgba(255, 190, 88, 0.42);
}

.diagnostic-card.diagnostic-info {
  border-color: rgba(112, 161, 255, 0.28);
}

.diagnostic-title {
  color: #9fb0d8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diagnostic-value {
  margin-top: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.diagnostic-ok .diagnostic-value {
  color: #90f5ae;
}

.diagnostic-warn .diagnostic-value {
  color: #ffd175;
}

.diagnostic-detail {
  margin-top: 4px;
  color: #b7c5e6;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.config-issues-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
}

.config-issue {
  display: grid;
  grid-template-columns: minmax(135px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid rgba(112, 161, 255, 0.22);
  background: rgba(7, 15, 31, 0.56);
}

.config-issue strong {
  color: #dce6ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.config-issue span {
  color: #b7c5e6;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.config-issue-ok {
  border-color: rgba(93, 232, 139, 0.24);
}

.config-issue-ok strong {
  color: #90f5ae;
}

.config-issue-warn {
  border-color: rgba(255, 190, 88, 0.42);
  background: rgba(54, 37, 13, 0.28);
}

.config-issue-warn strong {
  color: #ffd175;
}

.config-issue-info strong {
  color: #8ec7ff;
}

.profile-history-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 10px;
}

.profile-history-title {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-history-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  background: rgba(7, 15, 31, 0.38);
}

.profile-history-row strong {
  min-width: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-history-row span,
.profile-history-row time {
  min-width: 0;
  color: #b7c5e6;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 8px;
  margin: 8px 0 10px;
}

.stats-grid div {
  padding: 8px 10px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(23, 35, 61, 0.92), rgba(16, 26, 49, 0.92));
  border: 1px solid rgba(132, 153, 210, 0.18);
  color: #c7d3f0;
  font-size: 12px;
  font-weight: 800;
}

.stats-grid strong {
  float: right;
  color: #fff;
}

.render-stats-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  align-items: stretch;
  margin-top: 10px;
}

.render-stats-grid .btn {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.stats-grid strong.stat-ok {
  color: #79f0a4;
}

.stats-grid strong.stat-warn {
  color: #ff8291;
}

.render-report-compact {
  margin: -2px 0 10px;
  min-height: 0;
}

.render-report-compact .render-ok {
  font-size: 12px;
}

.log-box {
  min-height: 110px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  color: #dce6ff;
  background: linear-gradient(180deg, var(--field0), var(--field1));
  border: 1px solid rgba(132, 153, 210, 0.22);
  border-radius: 6px;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 32, 61, 0.98), rgba(12, 22, 43, 0.98));
  border: 1px solid rgba(120, 145, 255, 0.28);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), 0 0 28px rgba(116, 84, 244, 0.16);
}

.subscription-modal-card {
  width: min(760px, 100%);
}

.profile-template-modal-card {
  width: min(640px, 100%);
  overflow: visible;
}

.profile-template-modal-card.wizard-active {
  width: min(1280px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  min-height: 0;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}

.profile-template-modal-card.wizard-active .section-title {
  margin-right: 48px;
}

#profileModal .native-select-wrap:has(> .profile-template-mode-source) {
  display: none !important;
}

.subscription-status-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.subscription-status-card > div,
.subscription-referral,
.subscription-error {
  padding: 12px;
  border: 1px solid rgba(72, 199, 255, 0.2);
  border-radius: 10px;
  background: rgba(5, 14, 29, 0.42);
}

.subscription-status-card strong {
  display: block;
  margin-top: 3px;
  color: #f2f6ff;
  font-size: 20px;
  font-weight: 950;
}

.subscription-status-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-status-card .subscription-expiry {
  color: #8edbff;
  font-size: 11px;
}

.subscription-status-label,
.subscription-referral span {
  color: #48c7ff;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.subscription-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.subscription-form-grid label {
  display: grid;
  gap: 7px;
  color: #dce6ff;
  font-size: 13px;
  font-weight: 850;
}

.subscription-form-grid .subscription-remember-row {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 44px;
  margin: 0;
}

.subscription-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.subscription-status-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}

.subscription-status-tools .subscription-actions {
  align-self: start;
}

.subscription-links {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.subscription-links a {
  color: #48c7ff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.subscription-links a:hover {
  color: #f2f6ff;
}

.subscription-referral {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.subscription-referral-toggle {
  width: 100%;
}

.subscription-referral-details {
  display: grid;
  gap: 12px;
}

.subscription-referral-details[hidden] {
  display: none;
}

.subscription-referral-copy {
  display: grid;
  gap: 4px;
}

.subscription-referral-copy strong {
  color: #f2f6ff;
  font-size: 14px;
}

.subscription-referral-copy p,
.subscription-referral-details small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.subscription-referral-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(72, 199, 255, 0.16);
  border-bottom: 1px solid rgba(72, 199, 255, 0.16);
}

.subscription-referral-benefits > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.subscription-referral-benefits > div + div {
  border-left: 1px solid rgba(72, 199, 255, 0.16);
}

.subscription-referral-benefits strong {
  color: #dce6ff;
  font-size: 12px;
  line-height: 1.4;
}

.subscription-referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.subscription-activation {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.subscription-activation-toggle {
  width: 100%;
}

.subscription-activation-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.subscription-activation-form[hidden] {
  display: none;
}

.subscription-activation-form .input {
  min-width: 0;
}

@media (max-width: 620px) {
  .subscription-status-card,
  .subscription-status-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .subscription-status-tools .subscription-actions {
    justify-content: stretch;
  }

  .subscription-status-tools .subscription-actions .btn {
    flex: 1 1 auto;
  }

  .subscription-activation-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .subscription-referral-benefits,
  .subscription-referral-link-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .subscription-referral-benefits > div + div {
    border-left: 0;
    border-top: 1px solid rgba(72, 199, 255, 0.16);
  }
}

.account-png-storage {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(72, 199, 255, 0.2);
  border-radius: 10px;
  background: rgba(5, 14, 29, 0.48);
}

.account-png-head,
.account-png-actions,
.account-png-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-png-head {
  justify-content: space-between;
}

.account-png-head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-png-head strong {
  color: #48c7ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-png-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-png-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.account-png-tab {
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 10px;
  background: rgba(23, 40, 76, 0.88);
  color: var(--text);
  font-weight: 850;
  padding: 10px;
  cursor: pointer;
}

.account-png-tab.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.82), rgba(32, 158, 229, 0.58));
  border-color: rgba(151, 119, 255, 0.75);
}

.account-png-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
}

.account-png-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb name delete"
    "thumb meta delete";
  gap: 4px 10px;
  align-items: center;
  min-height: 66px;
  padding: 8px;
  border: 1px solid rgba(72, 199, 255, 0.18);
  border-radius: 10px;
  background: rgba(15, 28, 56, 0.86);
}

.account-png-thumb {
  grid-area: thumb;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.account-png-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-png-thumb-audio {
  background: radial-gradient(circle at 35% 25%, rgba(72, 199, 255, 0.28), rgba(124, 92, 255, 0.12) 44%, rgba(5, 14, 29, 0.82));
  border: 1px solid rgba(72, 199, 255, 0.24);
  color: #dff6ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
}

.account-png-name {
  grid-area: name;
  min-width: 0;
  color: var(--text);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-png-item small {
  grid-area: meta;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.account-png-delete {
  grid-area: delete;
}

.account-png-empty {
  padding: 14px;
  border: 1px dashed rgba(72, 199, 255, 0.22);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.account-png-empty[hidden] {
  display: none;
}

.subscription-error {
  margin-top: 14px;
  color: #ffd4dc;
  border-color: rgba(244, 107, 134, 0.38);
  background: rgba(79, 18, 34, 0.34);
  font-size: 12px;
  font-weight: 800;
}

.subscription-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.subscription-plan-card {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 12px;
  border: 1px solid rgba(120, 145, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 31, 61, 0.78), rgba(10, 19, 38, 0.78));
}

.subscription-plan-card.active {
  border-color: rgba(72, 199, 255, 0.74);
  box-shadow: 0 0 24px rgba(72, 199, 255, 0.12);
}

.subscription-plan-card strong {
  display: block;
  color: #f2f6ff;
  font-size: 18px;
  font-weight: 950;
}

.subscription-plan-card span,
.subscription-plan-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-plan-card ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: #dce6ff;
  font-size: 12px;
  font-weight: 750;
}

.subscription-plan-actions {
  align-self: end;
  display: flex;
  justify-content: flex-start;
}

.subscription-plan-actions .btn {
  min-width: 110px;
}

.close-modal-card {
  width: min(520px, 100%);
}

.modal-dirty-areas {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(72, 199, 255, 0.22);
  border-radius: 10px;
  background: rgba(72, 199, 255, 0.07);
  color: #cfe1ff;
  font-size: 13px;
  font-weight: 800;
}

.modal-label {
  display: block;
  margin: 16px 0 7px;
  color: #dce6ff;
  font-size: 13px;
  font-weight: 800;
}

.template-profile-game-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.template-profile-game-field[hidden] {
  display: none !important;
}

.template-profile-game-field .modal-label {
  margin: 0;
}

.template-profile-game-field .native-select-wrap,
.template-profile-game-field .select {
  width: 100%;
}

.modal-input {
  width: 100%;
  height: 38px;
}

.profile-template-simple-step[hidden],
.profile-template-wizard[hidden],
.profile-game-step[hidden],
.profile-template-step[hidden],
.profile-template-save-actions[hidden] {
  display: none !important;
}

.profile-template-wizard {
  display: grid;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.profile-game-step {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.profile-template-intro {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  min-height: 300px;
  padding: 18px;
  border: 1px solid rgba(120, 145, 255, 0.22);
  border-radius: 10px;
  background: rgba(6, 13, 28, 0.5);
}

.profile-template-intro strong {
  color: #f2f6ff;
  font-size: 24px;
  font-weight: 950;
}

.profile-template-intro span {
  color: #b7c6e6;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.profile-game-list {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 8px;
}

.profile-game-group {
  display: grid;
  gap: 8px;
}

.profile-game-group-title {
  color: #dce6ff;
  font-size: 18px;
  font-weight: 950;
}

.profile-game-group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.profile-game-card {
  min-width: 0;
  min-height: 70px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border: 1px solid rgba(72, 199, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 33, 64, 0.96), rgba(12, 24, 48, 0.96));
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(4, 9, 22, 0.18);
}

.profile-game-card:hover,
.profile-game-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(28, 65, 110, 0.98), rgba(16, 38, 75, 0.98));
  outline: none;
}

.profile-game-card.selected {
  border-color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, #2189ea, #1673d5);
  box-shadow: 0 12px 30px rgba(18, 103, 189, 0.18);
}

.profile-game-card span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-game-card span:last-child strong,
.profile-game-card span:last-child small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-game-card span:last-child strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.12;
}

.profile-game-card span:last-child small {
  color: #aebdde;
  font-size: 11px;
  font-weight: 850;
}

.profile-game-card.selected span:last-child small,
.profile-game-card:hover span:last-child small,
.profile-game-card:focus-visible span:last-child small {
  color: #e6f5ff;
}

.profile-game-icon,
.profile-template-choice-icon,
.profile-template-detail-icon-inner {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(4, 10, 22, 0.3);
}

.profile-game-icon svg,
.profile-template-choice-icon svg,
.profile-template-detail-icon-inner svg,
.profile-game-icon img,
.profile-template-choice-icon img,
.profile-template-detail-icon-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.profile-template-step {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
}

.profile-template-sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  border-radius: 10px;
  background: rgba(6, 13, 28, 0.56);
  border: 1px solid rgba(120, 145, 255, 0.16);
}

.profile-template-back {
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(120, 145, 255, 0.28);
  border-radius: 8px;
  background: rgba(18, 31, 61, 0.72);
  color: #dce6ff;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.profile-template-back:hover,
.profile-template-back:focus-visible {
  border-color: rgba(72, 199, 255, 0.62);
  color: #fff;
  outline: none;
}

.profile-template-sidebar-title {
  color: #f2f6ff;
  font-size: 14px;
  font-weight: 950;
}

.profile-template-choice-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.profile-template-choice {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(15, 24, 43, 0.86);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.profile-template-choice:hover,
.profile-template-choice:focus-visible,
.profile-template-choice.selected {
  border-color: rgba(72, 199, 255, 0.68);
  background: linear-gradient(180deg, rgba(31, 121, 211, 0.94), rgba(20, 96, 183, 0.92));
  outline: none;
}

.profile-template-choice.locked:not(.selected) {
  border-color: rgba(244, 197, 66, 0.24);
  background: linear-gradient(180deg, rgba(37, 31, 16, 0.72), rgba(15, 24, 43, 0.86));
}

.profile-template-choice span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.profile-template-choice strong,
.profile-template-choice small,
.profile-template-choice em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-template-choice strong {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.profile-template-choice small,
.profile-template-choice em {
  color: #d7e1f6;
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
}

.profile-template-detail {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 18px;
  border: 10px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(13, 17, 20, 0.92);
  color: #f2f6ff;
}

.profile-template-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-template-detail-icon {
  flex: 0 0 auto;
}

.profile-template-detail-icon-inner {
  width: 52px;
  height: 52px;
  background: transparent;
}

.profile-template-detail-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-template-detail-head strong {
  min-width: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.profile-template-detail-head small {
  color: #9adfff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-template-detail p {
  max-width: 860px;
  margin: 0;
  color: #dce6ff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.profile-template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-template-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(72, 199, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 22, 42, 0.72);
  color: #b7c6e6;
  font-size: 12px;
  font-weight: 850;
}

.profile-template-detail-anchor {
  max-width: 520px;
}

.profile-template-detail-anchor .modal-input {
  height: 42px;
  background: rgba(20, 32, 61, 0.92);
}

.ready-template-box {
  display: grid;
  gap: 10px;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 82px;
  z-index: 6;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(72, 199, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 18, 37, 0.98), rgba(6, 13, 28, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.46), 0 0 28px rgba(72, 199, 255, 0.1);
}

.ready-template-box[hidden] {
  display: none !important;
}

.ready-template-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.ready-template-head span {
  color: #48c7ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.ready-template-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.ready-template-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(230px, calc(100vh - 360px));
  overflow: auto;
  padding-right: 2px;
}

.ready-template-card {
  min-width: 0;
  min-height: 78px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(120, 145, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 31, 61, 0.78), rgba(10, 19, 38, 0.78));
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ready-template-card strong,
.ready-template-card span,
.ready-template-card small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ready-template-card strong {
  color: #f2f6ff;
  font-size: 13px;
  font-weight: 950;
}

.ready-template-card span {
  color: #48c7ff;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.ready-template-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ready-template-card:hover,
.ready-template-card:focus-visible,
.ready-template-card.selected {
  border-color: rgba(72, 199, 255, 0.72);
  background: linear-gradient(180deg, rgba(28, 55, 96, 0.92), rgba(26, 34, 78, 0.9));
  box-shadow: 0 0 18px rgba(72, 199, 255, 0.12);
  outline: none;
}

.ready-template-card.locked:not(.selected) {
  border-color: rgba(244, 197, 66, 0.28);
  background: linear-gradient(180deg, rgba(36, 31, 14, 0.84), rgba(12, 20, 38, 0.78));
}

.ready-template-card.selected {
  box-shadow: 0 0 18px rgba(72, 199, 255, 0.14), inset 3px 0 0 rgba(72, 199, 255, 0.95);
}

.ready-template-empty {
  grid-column: 1 / -1;
  padding: 11px 10px;
  border: 1px dashed rgba(120, 145, 255, 0.2);
  border-radius: 8px;
  background: rgba(14, 25, 47, 0.36);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-text {
  margin: 16px 0 6px;
  color: #f2f6ff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.modal-subtext {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.profile-template-actions {
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 50px;
}

.profile-template-ready-actions,
.profile-template-save-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-template-ready-actions[hidden] {
  display: none !important;
}

.profile-template-ready-actions {
  min-width: 230px;
  margin-right: auto;
}

.ready-template-toggle {
  min-width: 190px;
}

.ready-template-toggle.active {
  border-color: rgba(72, 199, 255, 0.72);
  color: #48c7ff;
  box-shadow: 0 0 18px rgba(72, 199, 255, 0.12);
}

.ready-template-selected {
  max-width: 210px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .profile-template-modal-card.wizard-active {
    width: min(100%, calc(100vw - 24px));
    min-height: min(760px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

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

  .profile-template-intro {
    min-height: auto;
  }

  .profile-game-list {
    max-height: calc(100vh - 310px);
  }

  .profile-game-group-list {
    grid-template-columns: 1fr;
  }

  .profile-template-sidebar {
    max-height: 260px;
  }

  .profile-template-detail {
    border-width: 6px;
    padding: 14px;
  }

  .profile-template-detail-head strong {
    font-size: 22px;
  }

  .profile-template-actions,
  .profile-template-ready-actions,
  .profile-template-save-actions {
    width: 100%;
  }

  .profile-template-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-template-save-actions {
    justify-content: flex-end;
  }

  .ready-template-toggle {
    min-width: 0;
  }

  .ready-template-selected {
    max-width: none;
  }

  .ready-template-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ready-template-head small {
    text-align: left;
  }

  .ready-template-list {
    grid-template-columns: 1fr;
  }
}

.media-scan-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.media-scan-summary,
.media-scan-empty,
.media-scan-row {
  border: 1px solid rgba(79, 206, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 16, 32, 0.72);
  color: #d9e6ff;
}

.media-scan-summary,
.media-scan-empty {
  padding: 10px 12px;
}

.media-scan-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.media-scan-controls,
.media-scan-roots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-scan-mode,
.media-scan-root {
  border: 1px solid rgba(79, 206, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 18, 34, 0.86);
  color: #d9e6ff;
}

.media-scan-mode {
  min-height: 34px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.media-scan-mode span,
.media-scan-root em {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(108, 124, 255, 0.25);
  color: #dff2ff;
  text-align: center;
  font-style: normal;
}

.media-scan-mode.active {
  border-color: rgba(51, 197, 255, 0.7);
  background: linear-gradient(180deg, rgba(44, 155, 226, 0.96), rgba(25, 118, 207, 0.96));
  color: #ffffff;
}

.media-scan-root {
  max-width: 260px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.media-scan-root strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-scan-root.ok em {
  background: rgba(65, 226, 139, 0.18);
  color: #7cf5ab;
}

.media-scan-root.warn em {
  background: rgba(255, 128, 164, 0.18);
  color: #ff9aad;
}

.media-scan-summary strong,
.media-scan-row strong,
.media-scan-root strong {
  color: #ffffff;
}

.media-scan-summary span,
.media-scan-row span,
.media-scan-row em {
  color: #a9b8d8;
  font-style: normal;
}

.media-scan-row {
  min-height: 70px;
  padding: 8px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.media-scan-row img,
.media-scan-row > span {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid rgba(132, 153, 210, 0.24);
  background: rgba(10, 18, 34, 0.86);
  object-fit: contain;
  display: grid;
  place-items: center;
  color: #7bdcff;
  font-weight: 900;
  font-size: 11px;
}

.media-scan-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.media-scan-row strong,
.media-scan-row span,
.media-scan-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-scan-row em {
  color: #ff9aad;
}

.media-scan-row em.ok {
  color: #68e59a;
}

.media-scan-row em.warn {
  color: #ff9aad;
}



/* styles/server_tools.css */
.three-actions {
  justify-content: space-between;
}

.server-install-compact {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(72, 199, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.24);
}

.server-install-compact > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.server-install-compact strong {
  color: #f2f6ff;
  font-size: 14px;
  font-weight: 950;
}

.server-install-compact span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-tools-flow {
  display: grid;
  gap: 12px;
}

.server-tool-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.server-tool-main-actions .btn {
  min-width: 132px;
  padding: 0 14px;
}

.server-tool-panel[hidden] {
  display: none !important;
}

.server-tool-panel .btn:disabled,
.server-tool-panel .btn.btn-disabled {
  filter: saturate(0.55);
}

.server-install-modal-card {
  position: relative;
  width: min(720px, calc(100vw - 34px));
  max-height: min(92vh, 980px);
  overflow: auto;
  padding: 26px 18px 20px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 27, 30, 0.98), rgba(18, 21, 24, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.62);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 42px;
  line-height: 30px;
  font-weight: 300;
  cursor: pointer;
}

.server-install-modal-card h2 {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 21px;
  font-weight: 850;
}

.server-jdk-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.server-jdk-line .btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.server-java-detect-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
}

.server-java-detect-status[hidden] {
  display: none !important;
}

.server-java-detect-status.working {
  color: var(--cyan);
  border-color: var(--cyan);
}

.server-java-detect-status.ok {
  color: var(--green);
  border-color: var(--green);
}

.server-java-detect-status.error {
  color: var(--red);
  border-color: var(--red);
}

.server-java-advice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.server-java-advice strong {
  color: var(--cyan);
}

.server-java-advice.ok {
  border-color: var(--green);
  color: var(--green);
}

.server-java-advice.warn {
  border-color: var(--gold);
  color: var(--gold);
}

.server-java-advice.error {
  border-color: var(--red);
  color: var(--red);
}

.server-install-choice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.server-install-mode {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(132, 153, 210, 0.18);
  border-radius: 8px;
  background: rgba(5, 12, 24, 0.22);
}

.server-install-mode[hidden] {
  display: none !important;
}

.server-install-mode-button {
  min-height: 36px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 7px;
  background: rgba(12, 22, 43, 0.74);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.server-install-mode-button.active {
  border-color: rgba(98, 217, 255, 0.54);
  background: linear-gradient(180deg, rgba(36, 65, 102, 0.92), rgba(21, 35, 67, 0.92));
  color: var(--text);
}

.server-install-mode-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.server-install-choice label:first-child {
  grid-column: 1 / -1;
}

.server-install-choice label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #cfd4dc;
  font-size: 13px;
  font-weight: 800;
}

.server-install-choice .select,
.server-install-choice .native-select-wrap {
  width: 100%;
}

.server-install-choice label .select {
  margin-left: 0;
}

.server-recommended {
  align-self: end;
  padding: 0 0 9px;
  color: #35f75f;
  font-size: 12px;
  font-weight: 900;
}

.server-name-label {
  display: grid;
  gap: 7px;
  margin: 0 0 22px;
  color: #cfd4dc;
  font-size: 13px;
  font-weight: 800;
}

.server-name-label .input {
  width: 100%;
}

.server-name-label span {
  color: #9da8bd;
  font-size: 11px;
  font-weight: 750;
}

.server-memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 26px;
}

.server-memory-label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #cfd4dc;
  font-size: 13px;
  font-weight: 800;
}

.server-memory-label .input {
  width: min(160px, 100%);
  height: 40px;
  margin: 0;
}

.server-memory-label span {
  color: #9da8bd;
  font-size: 11px;
  font-weight: 700;
}

.server-via-options[hidden],
.server-paper-plugin-options[hidden] {
  display: none !important;
}

.server-required-label {
  display: block;
  margin: 0 0 12px;
  color: #d9dce2;
  font-size: 14px;
  font-weight: 800;
}

.server-required-label span,
.eula-row span {
  color: #ff68a7;
}

.server-required-label strong {
  color: #62d9ff;
}

.server-dir-picker {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
}

.server-dir-picker .input {
  width: 100%;
  height: 34px;
  margin: 0;
  border-color: transparent;
  background: rgba(12, 14, 17, 0.55);
}

.server-dir-picker .btn {
  min-width: 112px;
  height: 34px;
  padding: 0 12px;
}

.server-install-checks {
  display: grid;
  gap: 9px;
  margin-top: 28px;
}

.server-install-checks .check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d8dce5;
  font-size: 13px;
  font-weight: 760;
}

.server-install-checks .check-row span {
  color: #b6becd;
  font-size: 11px;
  font-weight: 750;
}

.server-install-checks .eula-row {
  align-items: center;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.eula-row .eula-required-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 104, 167, 0.78);
  border-radius: 999px;
  background: rgba(255, 104, 167, 0.18);
  box-shadow: 0 0 18px rgba(255, 104, 167, 0.24);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.eula-row small {
  color: #b6becd;
  font-size: 11px;
  font-weight: 750;
}

.server-install-progress {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(72, 199, 255, 0.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(9, 21, 42, 0.84), rgba(7, 16, 32, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 22px rgba(72, 199, 255, 0.12);
}

.server-install-progress[hidden] {
  display: none !important;
}

.server-install-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #eef5ff;
  font-size: 12px;
  font-weight: 900;
}

.server-install-progress-head span,
.server-install-progress-note {
  color: #aebbd3;
  font-size: 11px;
  font-weight: 750;
}

.server-install-progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(4, 11, 24, 0.85);
  border: 1px solid rgba(132, 153, 210, 0.22);
}

.server-install-progress-bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2aa8ff, #6d4cff, #31d075);
  box-shadow: 0 0 14px rgba(72, 199, 255, 0.48);
  animation: server-install-progress-slide 1.15s ease-in-out infinite;
}

.server-install-progress.determinate .server-install-progress-bar span {
  width: var(--progress-width, 5%);
  animation: none;
}

.server-install-progress.done {
  border-color: rgba(49, 208, 117, 0.45);
}

.server-install-progress.done .server-install-progress-bar span {
  width: 100%;
  background: linear-gradient(90deg, #1dbd68, #31d075);
  animation: none;
}

.server-install-progress.error {
  border-color: rgba(255, 100, 130, 0.56);
}

.server-install-progress.error .server-install-progress-bar span {
  width: 100%;
  background: linear-gradient(90deg, #e56573, #ff8da0);
  animation: none;
}

.server-install-modal-card.installing .server-install-choice,
.server-install-modal-card.installing .server-standard-option,
.server-install-modal-card.installing .server-install-checks,
.server-install-modal-card.installing .server-install-modpack-option {
  pointer-events: none;
  filter: saturate(0.72);
}

@keyframes server-install-progress-slide {
  0% {
    transform: translateX(-105%);
  }
  55% {
    transform: translateX(95%);
  }
  100% {
    transform: translateX(265%);
  }
}

.server-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.server-modal-actions.single {
  grid-template-columns: 1fr;
}

.server-modal-actions.single .btn {
  min-height: 50px;
}

.server-modal-actions .btn {
  min-width: 0;
  padding: 0 10px;
}

.server-tools-status {
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 12px 14px;
  border: 1px solid rgba(72, 199, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 16, 34, 0.55);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  white-space: pre-wrap;
}

.server-tools-status.working {
  color: var(--cyan);
  border-color: rgba(72, 199, 255, 0.45);
}

.server-tools-status.error {
  color: #ff8da0;
  border-color: rgba(255, 100, 130, 0.55);
}

#optionsPanel.collapsed {
  display: none;
}

[hidden] {
  display: none !important;
}

.debug-page {
  height: 100vh;
  padding: 14px;
  overflow: hidden;
}

.debug-panel {
  height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.debug-log {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  width: 100%;
  overflow: auto;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 18, 35, 0.7);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(154, 120, 255, 0.8), rgba(72, 199, 255, 0.55));
  border: 2px solid rgba(10, 18, 35, 0.95);
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .app-shell {
    min-width: 0;
  }

  .layout {
    grid-template-columns: var(--main-column);
  }

  .options-collapsed .layout {
    grid-template-columns: var(--main-column);
  }
}

.server-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.server-tool-card {
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 35, 0.58);
}

.server-tool-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
}

.server-tool-card .input,
.server-tool-card .select,
.server-tool-card .native-select-wrap {
  width: 100%;
}

.server-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.server-card-actions.single-action {
  grid-template-columns: 1fr;
}

.server-tool-card-wide {
  grid-column: 1 / -1;
}

.server-tool-card-status {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 11, 24, 0.36);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.server-tool-card-status.online {
  border-color: rgba(45, 211, 111, 0.45);
  color: var(--green);
}

.server-tool-card-status.warn {
  border-color: rgba(255, 201, 71, 0.45);
  color: var(--gold);
}

.server-tool-card-status.error {
  border-color: rgba(255, 92, 122, 0.5);
  color: var(--red);
}

.server-share-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(52, 211, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(18, 44, 77, 0.72), rgba(12, 20, 46, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.server-share-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.server-share-card strong {
  display: block;
  color: #f7fbff;
  font-size: 22px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
}

.server-share-address-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.server-share-address-row strong {
  flex: 0 1 auto;
}

.server-share-copy {
  flex: 0 0 auto;
  min-width: 82px;
}

.server-share-card strong.saved {
  color: var(--gold);
}

.server-share-card strong.online {
  color: var(--green);
}

.server-share-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.server-share-actions {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(110px, auto);
  gap: 8px;
}

.vps-advanced-settings {
  border: 1px solid rgba(120, 145, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 11, 24, 0.22);
}

.vps-advanced-settings summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  user-select: none;
}

.vps-advanced-settings .vps-tunnel-grid,
.vps-advanced-settings .vps-tunnel-actions,
.vps-advanced-settings small {
  margin: 0 12px 12px;
}

.vps-tunnel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

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

.server-rcon-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.server-rcon-actions .btn {
  min-width: 0;
  width: 100%;
}

.compact-check {
  min-height: auto;
}

.server-tool-card strong {
  color: #f5f8ff;
  font-size: 13px;
  font-weight: 900;
}

.server-tool-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Theme coverage for shared UI surfaces that previously used fixed navy colors. */



/* styles/theme_components.css */
.topbar,
.boot-card,
.app-tooltip,
.app-tooltip.below {
  background: var(--surface-top);
  border-color: var(--accent-border);
}

.top-server-status,
.top-server-menu,
.top-server-settings-menu,
.template-rail-panel,
.template-rail-head,
.template-mode-group,
.template-empty,
.option-card,
.workspace-tabs,
.game-mode-rail-list,
.diagnostic-card,
.youtube-playlist-row,
.command-preview-box,
.native-select-menu,
.search-select-menu,
.gift-select-menu,
.random-value-menu,
.server-tool-switch,
.server-tool-log,
.server-tool-card,
.server-tool-panel,
.server-install-tool,
.server-install-card,
.server-install-summary,
.server-install-compact,
.server-install-mode,
.mod-render-step,
.server-install-progress,
.modal-card,
.server-profile-row,
.live-settings-card,
.live-toggle-grid .check-row,
.live-event-picker,
.live-event-draft,
.live-game-action-fields,
.live-game-action-preview,
.live-game-action-extra-card,
.live-game-audio-storage,
.live-game-audio-empty,
.live-game-audio-asset,
.live-game-action-quick-add,
.live-game-quick-png,
.live-action-row,
.live-action-game-slot,
.live-action-audio-slot,
.live-action-options-slot,
.live-action-audio,
.random-selected-values,
.roulette-card,
.preset-render-tools,
.render-progress,
.thanks-template-settings,
.tts-settings,
.overlay-preview-card,
.png-picker-current,
.png-picker-preview,
.png-picker-empty,
.stats-grid > div,
.modal,
.dialog,
.server-tool-card {
  border-color: var(--accent-border);
  background: var(--surface-soft);
}

.game-mode-rail-list,
.template-rail-panel,
#optionsPanel.side-panel {
  background: linear-gradient(180deg, var(--bg2), var(--bg0));
  background-color: var(--bg0);
}

.template-rail-head,
.template-mode-group,
.template-empty,
#optionsPanel.side-panel > .section-title,
#optionsPanel.side-panel > .option-card {
  background: linear-gradient(180deg, var(--field0), var(--field1));
  background-color: var(--field1);
}

.panel,
.side-panel .panel,
.top-server-settings-panel,
.server-install-modal-card {
  border-color: var(--line);
  background: linear-gradient(180deg, var(--panel0), var(--panel1));
}

.modal-card.live-event-modal-card {
  width: min(1080px, calc(100vw - 36px));
}

#alertMediaModal .alert-media-modal-card {
  width: min(1088px, calc(100vw - 40px));
  max-width: 1088px;
  max-height: min(92vh, 920px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
}

#alertMediaModal .alert-media-toolbar {
  grid-template-columns: minmax(360px, 1fr) auto;
}

#alertMediaModal .alert-media-body {
  grid-template-columns: minmax(620px, 1fr) minmax(360px, 0.48fr);
  min-height: 520px;
  overflow: hidden;
}

#alertMediaModal .alert-media-list {
  max-height: none;
  min-height: 0;
}

#alertMediaModal .alert-media-item {
  grid-template-columns: 76px minmax(0, 1fr) 72px;
  min-height: 58px;
}

#alertMediaModal .alert-media-preview-card {
  min-height: 0;
}

#alertMediaModal .alert-media-preview {
  min-height: 0;
}

#alertMediaModal .alert-media-preview img,
#alertMediaModal .alert-media-preview video {
  max-height: none;
}

@media (max-width: 1040px) {
  #alertMediaModal .alert-media-modal-card {
    overflow: auto;
  }

  #alertMediaModal .alert-media-toolbar,
  #alertMediaModal .alert-media-body {
    grid-template-columns: 1fr;
  }

  #alertMediaModal .alert-media-body {
    min-height: 0;
  }

  #alertMediaModal .alert-media-list {
    max-height: min(44vh, 420px);
  }
}

.input,
.select,
textarea,
.search-select-button,
.native-select-button,
.native-select-filter,
.search-select-filter,
.random-value-filter,
.options-scale-range,
.server-tool-switch button,
.server-install-mode-button,
.game-mode-rail-button,
.template-row-main,
.template-mode-new,
.template-row-delete,
.gift-select-button,
.gift-select-filter,
.live-event-card,
.png-picker-layer,
.png-picker-item,
.random-value-button,
.random-value-filter,
.random-value-option,
.random-image-preview,
.workspace-tab,
.radio-pill,
.preset-card,
.scoreboard-row {
  border-color: var(--accent-border);
  background: var(--surface-field);
  color: var(--text);
}

.gift-row,
.gift-range-row,
.like-goal-row,
.coin-goal-row,
.gift-goal-row,
.follow-goal-row,
.donor-level-row,
.comment-row,
.custom-command-row,
.keyboard-action-row,
.mouse-action-row,
.random-list-row {
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.radio-pill.active,
.workspace-tab.active,
.server-tool-switch button.active,
.server-install-mode-button.active,
.top-server-option.active,
.native-select-option.active,
.search-select-option.active,
.game-mode-rail-button.active,
.template-row.active .template-row-main,
.template-row.remembered .template-row-main,
.live-event-card.active,
.png-picker-layer.active,
.png-picker-item.active {
  border-color: var(--accent-border-strong);
  background:
    radial-gradient(circle at 16% 0%, var(--accent-soft), transparent 48%),
    var(--surface-field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 18px var(--accent-glow);
}

.native-select-menu,
.search-select-menu,
.gift-select-menu,
.random-value-menu {
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  border-color: var(--accent-border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72), 0 0 0 1px var(--accent-soft);
}

.native-select-options,
.search-select-options,
.gift-select-options,
.random-value-options {
  border-radius: 6px;
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
}

.native-select-option,
.search-select-option,
.gift-select-option,
.random-value-option {
  background: linear-gradient(180deg, var(--field0), var(--field1));
  color: var(--text);
}

.native-select-option + .native-select-option,
.search-select-option + .search-select-option,
.gift-select-option + .gift-select-option,
.random-value-option + .random-value-option {
  margin-top: 4px;
}

.native-select-option:hover,
.native-select-option.selected,
.search-select-option:hover,
.search-select-option.selected,
.gift-select-option:hover,
.gift-select-option.selected,
.random-value-option:hover {
  background:
    radial-gradient(circle at 14% 0%, var(--accent-soft), transparent 55%),
    linear-gradient(180deg, var(--purple), var(--purple2));
  color: #fff;
}

.game-mode-rail::before {
  border-color: var(--accent-border-strong);
  background:
    radial-gradient(circle at 80% 50%, var(--accent-soft), transparent 42%),
    var(--surface-field);
  box-shadow: 0 0 22px var(--accent-glow), inset 1px 0 0 rgba(255, 255, 255, 0.08);
}

.game-mode-rail::after {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--blue-glow);
}

.template-rail::before {
  border-color: var(--accent-border-strong);
  background:
    radial-gradient(circle at 20% 50%, var(--accent-soft), transparent 42%),
    var(--surface-field);
  box-shadow: 0 0 22px var(--accent-glow), inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.template-rail::after {
  color: var(--purple);
  text-shadow: 0 0 10px var(--accent-glow);
}

body.game-mode-rail-peek .game-mode-rail-list,
.game-mode-rail:hover .game-mode-rail-list,
.game-mode-rail-list:hover,
.game-mode-rail:focus-within .game-mode-rail-list,
body.template-rail-peek .template-rail-panel,
.template-rail:hover .template-rail-panel,
.template-rail-panel:hover,
.template-rail:focus-within .template-rail-panel,
.game-mode-rail-button:hover,
.game-mode-rail-button:focus-visible,
.template-row-main:hover,
.template-row-main:focus-visible,
.template-mode-new:hover,
.template-mode-new:focus-visible,
.template-row-delete:hover,
.template-row-delete:focus-visible,
.live-event-card:hover,
.live-event-card:focus-visible,
.png-picker-item:hover,
.png-picker-item:focus-visible,
.png-picker-item.previewed {
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 18px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-mode-rail-list::after {
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-glow-b));
}

.template-rail-panel::after {
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-glow-b));
}

.live-game-action-quick-add,
.live-game-quick-png,
.live-action-game-slot,
.live-action-audio-slot,
.live-action-options-slot {
  border-color: var(--accent-border);
}

.live-action-trigger:hover,
.live-action-game-slot:hover .live-action-game-open,
.live-action-game-open:hover,
.live-action-audio-slot:hover {
  background: var(--surface-muted);
}

.gift-select-button::after,
.search-select-button::after,
.native-select-button::after {
  border-top-color: var(--muted);
}

.gift-select-option.gift-already-assigned {
  box-shadow: inset 0 0 0 1px var(--gold-glow);
  background:
    linear-gradient(180deg, var(--gold-glow), rgba(255, 172, 60, 0.04)),
    var(--surface-muted);
}

.gift-select-option.gift-already-assigned:hover,
.gift-select-option.gift-already-assigned.selected {
  background:
    linear-gradient(180deg, var(--gold-glow), rgba(255, 172, 60, 0.08)),
    linear-gradient(180deg, var(--purple), var(--purple2));
}

.live-event-card.already-used {
  border-color: rgba(255, 211, 92, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 92, 0.12), 0 0 14px rgba(255, 211, 92, 0.12);
}

.live-event-used-pill {
  border-color: rgba(255, 211, 92, 0.55);
  background: rgba(55, 39, 9, 0.9);
  color: #ffd96a;
}

.live-event-draft-warning {
  border-color: rgba(255, 211, 92, 0.38);
  background: rgba(55, 39, 9, 0.62);
  color: #ffd96a;
}

.png-picker-preview-image,
.png-picker-thumb {
  border-color: var(--accent-border);
  color: var(--muted);
}

.png-upload-slot:hover .random-image-preview,
.png-upload-slot:focus-visible .random-image-preview {
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 16px var(--accent-glow);
}

.png-upload-slot:focus-visible {
  outline-color: var(--cyan);
}

.random-image-preview.has-image {
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 14px var(--accent-glow);
}

.random-image-preview em {
  background: var(--surface-menu);
  color: var(--text);
}

.random-value-chip {
  border-color: var(--accent-border-strong);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: 0 0 12px var(--accent-glow);
}

.random-value-type,
.random-value-option strong,
.roulette-card strong {
  color: var(--cyan);
}

.random-value-remove {
  background: var(--red-glow);
  color: var(--text);
}

.server-install-progress-bar span {
  background: linear-gradient(90deg, var(--blue), var(--purple2), var(--green));
  box-shadow: 0 0 14px var(--accent-glow);
}

.server-install-progress.done {
  border-color: var(--green);
}

.server-install-progress.done .server-install-progress-bar span {
  background: linear-gradient(90deg, var(--green2), var(--green));
}

.server-install-progress.error {
  border-color: var(--red);
}

.server-install-progress.error .server-install-progress-bar span {
  background: linear-gradient(90deg, var(--red2), var(--red));
}

.table-head,
.option-card-title,
.section-title,
.thanks-template-head strong,
.live-settings-card-head strong,
.live-event-card strong,
.live-event-draft-head strong,
.live-game-quick-add-head strong,
.live-game-quick-png-copy strong,
.live-action-trigger-text strong,
.live-action-game-label strong,
.png-picker-preview-copy strong,
.png-picker-name,
.random-value-chip span,
.roulette-card span,
.server-tool-card strong {
  color: var(--text);
}

.brand-subtitle,
.status-pill,
.table > div,
.thanks-template-head span,
.live-event-card small,
.live-event-draft-head span,
.live-event-draft-fields label,
.live-game-action-fields label,
.live-game-quick-add-head span,
.live-game-quick-png-copy span,
.live-action-trigger-source,
.live-action-trigger-meta,
.live-action-game-label small,
.live-action-condition label,
.live-action-game label,
.live-action-count-box label,
.live-action-audio,
.gift-select-text .gift-native-name,
.gift-option-text .gift-native-name,
.gift-select-text > span,
.gift-option-text > span,
.png-picker-current,
.png-picker-preview-copy span,
.png-picker-empty,
.random-value-placeholder,
.random-value-empty,
.server-tool-card small {
  color: var(--muted);
}

.table-head,
.option-card-title,
.section-title,
.live-settings-card-head strong,
.server-tool-card strong {
  color: var(--cyan);
}

.live-event-card-icon,
.live-action-trigger-icon {
  color: var(--cyan);
}

.live-action-row[data-live-event="gift"] .live-action-trigger-icon,
.live-action-row[data-live-event="like"] .live-action-trigger-icon,
.live-action-row[data-live-event^="likes"] .live-action-trigger-icon,
.live-event-card[data-live-event-choice="gift"] .live-event-card-icon,
.live-event-card[data-live-event-choice="like"] .live-event-card-icon,
.live-event-card[data-live-event-choice^="likes"] .live-event-card-icon {
  color: var(--cyan);
}

.live-action-row[data-live-event="gift_range"] .live-action-trigger-icon,
.live-action-row[data-live-event="subscribe"] .live-action-trigger-icon,
.live-event-card[data-live-event-choice="gift_range"] .live-event-card-icon,
.live-event-card[data-live-event-choice="subscribe"] .live-event-card-icon {
  color: var(--gold);
}

.live-action-row[data-live-event="follow"] .live-action-trigger-icon,
.live-action-row[data-live-event="join"] .live-action-trigger-icon,
.live-action-row[data-live-event="share"] .live-action-trigger-icon,
.live-action-row[data-live-event="comment"] .live-action-trigger-icon,
.live-action-row[data-live-event="custom"] .live-action-trigger-icon,
.live-action-row[data-live-event^="minecraft_"] .live-action-trigger-icon,
.live-event-card[data-live-event-choice="follow"] .live-event-card-icon,
.live-event-card[data-live-event-choice="join"] .live-event-card-icon,
.live-event-card[data-live-event-choice="share"] .live-event-card-icon,
.live-event-card[data-live-event-choice="comment"] .live-event-card-icon,
.live-event-card[data-live-event-choice="custom"] .live-event-card-icon,
.live-event-card[data-live-event-choice^="minecraft_"] .live-event-card-icon {
  color: var(--purple);
}

.app-tooltip::before {
  background: var(--surface-menu);
  border-color: var(--accent-border-strong);
}

@media (max-width: 1100px) {
  .live-settings-layout,
  .live-toggle-grid,
  .thanks-template-settings {
    grid-template-columns: 1fr;
  }

  .server-tool-grid {
    grid-template-columns: 1fr;
  }

  .server-share-card,
  .server-share-actions,
  .vps-tunnel-grid,
  .vps-tunnel-actions {
    grid-template-columns: 1fr;
  }
}



