html, body {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 90, 203, 0.10), transparent 60%),
    radial-gradient(120% 80% at 0% 100%, rgba(58, 255, 213, 0.08), transparent 60%),
    var(--bg-deep);
  min-height: 100vh;
  overflow-y: auto;
}

body {
  position: relative;
}

#mod-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.mod-app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px 80px;
  position: relative;
}

.mod-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.mod-tier {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.mod-tier-primary {
  justify-content: space-between;
}

.mod-tier-secondary {
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.mod-conn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10,10,18,0.55);
}

.mod-conn .peers {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.mod-conn .peers b { color: var(--ink); font-weight: 700; }
.mod-conn .peers-label { color: var(--ink-faint); }

.tools-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10,10,18,0.5);
}

.tab-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0 16px;
  margin: 0 -32px 18px;
  padding-left: 32px;
  padding-right: 32px;
  background: linear-gradient(180deg, rgba(7,7,13,0.96), rgba(7,7,13,0.78));
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.mod-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.mod-brand .logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ff5acb 0%, #ffce4a 45%, #3affd5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 90, 203, 0.35));
}

.mod-brand .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.mod-top-meta {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.mod-top-meta .peers {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20,20,32,0.5);
}
.mod-top-meta .peers b { color: var(--ink); font-weight: 700; }

.room-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.room-bar label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.room-bar input {
  background: rgba(10,10,18,0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  min-width: 220px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.room-bar input:focus { border-color: #3affd5; box-shadow: 0 0 0 3px rgba(58,255,213,0.15); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-bright);
  background: rgba(20,20,32,0.6);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { background: rgba(40,40,60,0.7); border-color: #3affd5; color: #3affd5; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, #3affd5, #5cf); color: #07070d; border-color: #3affd5; }
.btn.primary:hover { filter: brightness(1.1); color: #07070d; }
.btn.danger { color: #ff6b6b; border-color: rgba(255,107,107,0.3); }
.btn.danger:hover { background: rgba(255,107,107,0.1); border-color: #ff6b6b; }
.btn.icon { padding: 6px 8px; }
.btn.big { font-size: 14px; padding: 12px 20px; }

.tabs {
  display: inline-flex;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  padding: 4px;
  background: rgba(10,10,18,0.6);
  backdrop-filter: blur(8px);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover { color: var(--ink); transform: translateY(-1px); }
.tab-btn.active {
  background: linear-gradient(135deg, rgba(58,255,213,0.22), rgba(255,90,203,0.14));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(58,255,213,0.55), 0 0 24px rgba(58,255,213,0.1);
  text-shadow: 0 0 14px rgba(58,255,213,0.45);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 14px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-header .hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.row-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(22,22,40,0.7), rgba(14,14,26,0.85));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: border-color 0.2s, transform 0.2s;
  overflow: hidden;
}
.row-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, var(--accent-soft, transparent), transparent 60%);
  opacity: 0.6;
  z-index: 0;
}
.row-card > * { position: relative; z-index: 1; }
.row-card:hover { border-color: var(--line-bright); }

.row-counter {
  display: grid;
  grid-template-columns: 36px 60px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}
.row-counter:hover {
  transform: translateY(-1px);
  border-color: var(--accent, var(--line-bright));
  box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 1px var(--accent-soft, transparent);
}
.row-counter {
  border-left: 3px solid var(--accent, transparent);
}

.hotkey-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--accent, var(--line-bright));
  color: var(--accent, var(--ink));
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 2px 0 rgba(0,0,0,0.4), 0 0 8px var(--accent-soft, rgba(0,0,0,0));
  cursor: help;
}
.hotkey-badge.muted {
  color: var(--ink-faint);
  border-color: var(--line);
  box-shadow: none;
  background: rgba(0,0,0,0.25);
}

.row-counter .left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.row-counter .icon-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 26px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}
.row-counter .icon-input:focus { outline: none; border-color: var(--accent, #3affd5); }

.row-counter .color-input {
  width: 36px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.row-counter .middle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.row-counter .label-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.row-counter .preset-input {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-width: 110px;
  outline: none;
  cursor: pointer;
}
.row-counter .preset-input:focus { border-color: var(--accent, #3affd5); }
.row-counter .preset-input option { background: var(--bg-mid); color: var(--ink); }
.row-counter .label-input {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
}
.row-counter .label-input:focus { border-color: var(--accent, #3affd5); }

.row-counter .value-display {
  display: flex;
  align-items: center;
  gap: 14px;
}
.row-counter .value-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 36px;
  line-height: 1;
  min-width: 70px;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 12px var(--accent-soft, rgba(58,255,213,0.3));
}
.row-counter .vbtns {
  display: flex;
  gap: 6px;
}
.row-counter .vbtns button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-bright);
  background: rgba(0,0,0,0.4);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.row-counter .vbtns button:hover { background: var(--accent, #3affd5); color: #07070d; border-color: var(--accent); }

.row-counter .right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.url-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.url-input {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  width: 260px;
  outline: none;
}

.row-challenge {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
}

.row-challenge .head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.row-challenge select,
.row-challenge input[type="text"],
.row-challenge input[type="number"],
.row-challenge textarea {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.row-challenge select:focus,
.row-challenge input:focus,
.row-challenge textarea:focus {
  border-color: var(--accent, #3affd5);
}
.row-challenge.is-locked input:disabled,
.row-challenge.is-locked select:disabled,
.row-challenge.is-locked textarea:disabled,
.row-challenge.is-locked button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.row-challenge .title-input {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  width: 100%;
  letter-spacing: -0.01em;
}
.row-challenge .desc-input {
  width: 100%;
  resize: vertical;
  min-height: 56px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-dim);
}
.row-challenge .type-select {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.row-challenge .left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 60px;
}

.row-challenge .move-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.row-challenge .move-btns button {
  padding: 2px 8px;
  font-size: 12px;
  min-width: 30px;
}
.row-challenge .move-btns button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.row-challenge .type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--accent, #3affd5);
  color: var(--accent, #3affd5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.row-challenge .body-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.row-challenge .type-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
}
.row-challenge .type-fields label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.row-challenge .type-fields input[type="number"] { width: 90px; }
.row-challenge .type-fields input[type="text"] { width: 110px; }
.row-challenge .progress-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  margin-left: 4px;
}

.row-challenge .right-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.row-social {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  border-left: 3px solid var(--accent, transparent);
}

.row-social .social-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 88px;
}

.row-social .social-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--accent, #3affd5);
  color: var(--accent, #3affd5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.row-social .social-type-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}
.row-social .social-type-icon-svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.row-social .social-type-select,
.row-social .social-title-input,
.row-social .social-subtitle-input,
.row-social .social-url-edit {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.row-social .social-type-select:focus,
.row-social .social-title-input:focus,
.row-social .social-subtitle-input:focus,
.row-social .social-url-edit:focus {
  border-color: var(--accent, #3affd5);
}
.row-social.is-locked input:disabled,
.row-social.is-locked select:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.row-social .social-type-select {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: 100%;
}
.row-social .move-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.row-social .move-btns button {
  padding: 2px 8px;
  font-size: 12px;
  min-width: 30px;
}
.row-social .move-btns button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.row-social .social-url-edit {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.row-social .social-body-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.row-social .social-right-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.row-playing {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  border-left: 3px solid var(--accent, #3affd5);
  overflow: visible;
}

.row-playing .playing-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 96px;
}

.row-playing .playing-preview {
  width: 92px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: rgba(0,0,0,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.5);
}

.row-playing .playing-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-playing .playing-preview-empty {
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.05) 0 6px,
      rgba(255,255,255,0.02) 6px 12px
    );
  opacity: 0.35;
}

.row-playing .playing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--accent, #3affd5);
  color: var(--accent, #3affd5);
  background: rgba(0,0,0,0.4);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.row-playing .playing-body-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.row-playing .playing-title-input,
.row-playing .playing-subtitle-input,
.row-playing .playing-poster-input {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.row-playing .playing-title-input:focus,
.row-playing .playing-subtitle-input:focus,
.row-playing .playing-poster-input:focus {
  border-color: var(--accent, #3affd5);
}

.row-playing .playing-poster-input {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.row-playing .playing-suggestion-status {
  min-height: 18px;
  color: var(--accent, #3affd5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.row-playing .playing-suggestion-status[hidden] {
  display: none;
}

.row-playing .playing-body-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
}

.row-playing .playing-preset-control {
  position: relative;
  min-width: 0;
  z-index: 35;
}

.row-playing .playing-preset-control::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
  display: block;
}

.row-playing .playing-presets-toggle {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  white-space: nowrap;
}

.row-playing .playing-presets-toggle.active {
  color: #071324;
  border-color: var(--accent, #3affd5);
  background: linear-gradient(135deg, var(--accent, #3affd5), #b9cfff);
  box-shadow: 0 0 18px var(--accent-soft, rgba(58,255,213,0.3));
}

.row-playing .playing-preset-hovercard {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: min(330px, calc(100vw - 36px));
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(58,255,213,0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(13, 26, 44, 0.98), rgba(12, 17, 32, 0.98)),
    rgba(0,0,0,0.88);
  box-shadow: 0 18px 36px rgba(0,0,0,0.42), 0 0 24px rgba(58,255,213,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.row-playing .playing-preset-control:hover .playing-preset-hovercard,
.row-playing .playing-preset-control:focus-within .playing-preset-hovercard {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.row-playing .playing-preset-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(58,255,213,0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(58,255,213,0.06), rgba(143,77,255,0.06)),
    rgba(0,0,0,0.28);
}

.row-playing .playing-preset-panel[hidden] {
  display: none;
}

.row-playing .playing-preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.row-playing .playing-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.row-playing .playing-preset-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 6px;
  align-items: stretch;
}

.row-playing .playing-preset-load {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.32);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.row-playing .playing-preset-quick {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(185, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(0,0,0,0.24);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.row-playing .playing-preset-quick:not(:disabled):hover,
.row-playing .playing-preset-quick:not(:disabled):focus {
  border-color: var(--accent, #3affd5);
  background: rgba(58,255,213,0.08);
}

.row-playing .playing-preset-quick:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.row-playing .playing-preset-load:not(:disabled):hover,
.row-playing .playing-preset-load:not(:disabled):focus {
  border-color: var(--accent, #3affd5);
}

.row-playing .playing-preset-load:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

.row-playing .playing-preset-index {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--accent, #3affd5);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.row-playing .playing-preset-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-playing .playing-preset-title,
.row-playing .playing-preset-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row-playing .playing-preset-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
}

.row-playing .playing-preset-meta {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row-playing .playing-accent-row {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.row-playing .playing-accent-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.row-playing .playing-accent-input {
  width: 54px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  padding: 2px;
  cursor: pointer;
}

.row-playing .playing-accent-mode-select {
  min-width: 148px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  outline: none;
}

.row-playing .playing-accent-mode-select:focus,
.row-playing .playing-accent-input:focus {
  border-color: var(--accent, #3affd5);
}

.row-playing .playing-display-row {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.row-playing .playing-display-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.row-playing .playing-display-select,
.row-playing .playing-interval-input {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  outline: none;
}

.row-playing .playing-display-select {
  min-width: 108px;
  text-transform: uppercase;
}

.row-playing .playing-display-select:focus,
.row-playing .playing-interval-input:focus {
  border-color: var(--accent, #3affd5);
}

.row-playing .playing-interval-label.is-disabled {
  opacity: 0.55;
}

.row-playing .playing-interval-input {
  width: 88px;
  text-align: center;
}

.row-playing .playing-interval-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.row-playing .playing-right-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.row-challenge label.active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: all 0.15s;
}
.row-challenge label.active-toggle.active {
  background: var(--accent, #3affd5);
  color: #07070d;
  border-color: var(--accent);
}
.row-challenge label.active-toggle input { accent-color: var(--accent, #3affd5); }

/* ============ Toggle switch (new — replaces checkbox active toggle) ============ */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}
.toggle-switch input { display: none; }
.toggle-switch .switch-track {
  position: relative;
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--line-bright);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.toggle-switch .switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-faint);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  transition: transform 0.25s cubic-bezier(0.2, 1.2, 0.5, 1), background 0.25s ease;
}
.toggle-switch.is-on {
  color: var(--accent, #3affd5);
}
.toggle-switch.is-on .switch-track {
  background: var(--accent, #3affd5);
  border-color: var(--accent, #3affd5);
  box-shadow: 0 0 18px var(--accent-soft, rgba(58,255,213,0.4));
}
.toggle-switch.is-on .switch-thumb {
  transform: translateX(22px);
  background: #07070d;
}
.toggle-switch:hover .switch-track { border-color: var(--accent, var(--line-bright)); }

/* ============ Display-mode-bar transition picker ============ */
.dm-transition {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dm-transition label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dm-style-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: 3px;
  background: rgba(0,0,0,0.35);
}
.dm-style-btn {
  border: 0;
  background: rgba(0,0,0,0.4);
  border: 1px solid transparent;
  color: var(--ink-dim);
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.16s ease;
}
.dm-style-btn:hover {
  color: var(--ink);
}
.dm-style-btn.active {
  color: #fff;
  border-color: rgba(58,255,213,0.45);
  background: linear-gradient(135deg, rgba(58,255,213,0.22), rgba(255,90,203,0.12));
  box-shadow: inset 0 0 0 1px rgba(58,255,213,0.25);
}

.dm-transition select {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  outline: none;
  cursor: pointer;
  text-transform: uppercase;
}
.dm-transition select:focus { border-color: #3affd5; }
.dm-transition select option { background: var(--bg-mid); color: var(--ink); }

/* ============ Hype panel glow ============ */
.mod-app {
  transition: box-shadow 0.5s ease, filter 0.5s ease;
  border-radius: 24px;
}
body.hype-on .mod-app {
  box-shadow:
    0 0 0 1px rgba(58, 255, 213, 0.35),
    0 0 80px rgba(255, 90, 203, 0.18) inset,
    0 0 60px rgba(58, 255, 213, 0.18);
}
body.hype-max .mod-app {
  box-shadow:
    0 0 0 1px rgba(255, 90, 203, 0.55),
    0 0 100px rgba(255, 90, 203, 0.32) inset,
    0 0 100px rgba(58, 255, 213, 0.35);
}
body.hype-max .mod-brand .logo {
  animation: hype-brand-wobble 0.8s ease-in-out infinite;
}
@keyframes hype-brand-wobble {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-1px) rotate(-0.5deg); }
  75% { transform: translateY(1px) rotate(0.5deg); }
}

.row-counter.is-active,
.row-challenge.is-active {
  border-color: var(--accent, #3affd5);
  box-shadow: 0 0 0 1px var(--accent, #3affd5), 0 0 24px var(--accent-soft, rgba(58,255,213,0.18));
}

.add-row {
  display: flex;
  justify-content: center;
  padding: 18px;
  border: 1px dashed var(--line-bright);
  border-radius: 14px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  width: 100%;
  text-transform: uppercase;
}
.add-row:hover { color: #3affd5; border-color: #3affd5; background: rgba(58,255,213,0.04); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(20,20,32,0.95);
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
  z-index: 999;
  backdrop-filter: blur(10px);
}
.toast.success { border-color: #3affd5; color: #3affd5; }
.toast.error { border-color: #ff6b6b; color: #ff6b6b; }

.preview-shelf {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(7,7,13,0), rgba(7,7,13,0.95) 30%);
  padding: 18px 0 0;
  margin-top: 28px;
  display: none;
}

.preview-shelf.show { display: block; }
.preview-shelf .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}
.preview-shelf .preview-mount {
  display: flex;
  justify-content: center;
  min-height: 240px;
}

.conflict-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.conflict-modal .modal-card {
  background: var(--bg-mid);
  border: 1px solid #ff5acb;
  border-radius: 16px;
  padding: 28px;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 0 60px rgba(255, 90, 203, 0.3);
}
.conflict-modal h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  margin: 0 0 12px;
  color: #ff5acb;
}
.conflict-modal p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.conflict-modal .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.invisible-input { display: none; }

/* ============ Audio control ============ */
.audio-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10,10,18,0.5);
}
.audio-control .btn.icon {
  font-size: 16px;
  width: 30px;
  height: 26px;
  padding: 0;
  line-height: 1;
}
.audio-control .btn.icon.muted { opacity: 0.7; }
#audio-volume {
  width: 80px;
  accent-color: #3affd5;
  cursor: pointer;
}
#audio-volume:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ Profile control ============ */
.profile-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10,10,18,0.5);
}
.profile-control select {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 6px;
  outline: none;
  cursor: pointer;
  min-width: 130px;
}
.profile-control select option { background: var(--bg-mid); color: var(--ink); }
.profile-control .btn.icon {
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
}

/* ============ Display mode toggle ============ */
.display-mode-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10,10,18,0.5);
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
}

.global-display-bar {
  border-color: rgba(58, 255, 213, 0.18);
  background:
    linear-gradient(135deg, rgba(58,255,213,0.06), rgba(255,90,203,0.04)),
    rgba(10,10,18,0.55);
}

.tab-display-bar {
  margin-top: -4px;
  border-color: rgba(58, 255, 213, 0.16);
  background:
    linear-gradient(135deg, rgba(58,255,213,0.05), rgba(143,77,255,0.05)),
    rgba(10,10,18,0.52);
}

.dm-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
  font-style: normal;
}
.display-mode-bar .dm-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.dm-toggle {
  display: inline-flex;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: 3px;
  background: rgba(0,0,0,0.3);
}
.dm-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.18s ease;
}
.dm-btn:hover { color: var(--ink); }
.dm-btn.active {
  background: linear-gradient(135deg, rgba(58,255,213,0.22), rgba(255,90,203,0.12));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(58,255,213,0.45);
}
.dm-cycle {
  display: inline-flex;
  align-items: center;
}
.dm-cycle.is-disabled,
.dm-transition.is-disabled {
  opacity: 0.62;
}
.dm-cycle label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dm-cycle input {
  width: 60px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  outline: none;
}
.dm-cycle input:focus { border-color: #3affd5; }

/* ============ Help modal ============ */
.help-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}
.help-card {
  background: linear-gradient(180deg, rgba(22,22,40,0.95), rgba(14,14,26,0.95));
  border: 1px solid var(--line-bright);
  border-radius: 18px;
  padding: 26px 32px;
  max-width: 540px;
  width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(58,255,213,0.18);
}
.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.help-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #3affd5, #ffce4a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.help-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.3);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.help-close:hover { background: rgba(255,107,107,0.15); border-color: #ff6b6b; color: #ff6b6b; }
.help-grid {
  display: grid;
  gap: 10px;
}
.help-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.help-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
}
.help-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-bright);
  background: rgba(0,0,0,0.5);
  font-size: 12px;
  font-weight: 700;
  color: #3affd5;
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.help-plus {
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 11px;
  margin: 0 2px;
}
.help-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-dim);
}
.help-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
  text-align: center;
}
.help-hint kbd {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.4);
  color: var(--ink);
  font-size: 10px;
  margin: 0 2px;
}

/* ============ Mobile drawer toggle (hidden on desktop) ============ */
.mod-drawer-toggle { display: none; }

/* ============ Tablet & narrow desktop softening ============ */
@media (max-width: 900px) {
  .mod-app { padding: 20px 16px 80px; }
  .tab-bar-wrap { margin: 0 -16px 18px; padding-left: 16px; padding-right: 16px; }
  .mod-tier { gap: 10px; }
  .room-bar { flex: 1 1 240px; }
  .room-bar input { min-width: 0; flex: 1 1 160px; }
  .url-input { width: 100%; min-width: 0; flex: 1 1 0; }
  .row-counter .right { align-items: stretch; }
  .row-counter .url-input-row { width: 100%; }
  .btn.icon { padding: 10px 12px; min-width: 44px; min-height: 44px; font-size: 16px; }
  .audio-control .btn.icon,
  .profile-control .btn.icon { min-width: 36px; min-height: 36px; padding: 6px 8px; }
  .help-close { width: 40px; height: 40px; }
}

/* ============ Phone pass: drawer, stacked rows, big tap targets ============ */
@media (max-width: 640px) {
  .mod-app { padding: 14px 12px 80px; }

  /* Top tier: hamburger + brand + status */
  .mod-tier-primary {
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
  }
  .mod-drawer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    flex-shrink: 0;
  }
  .mod-brand { flex: 1 1 auto; min-width: 0; gap: 6px; flex-direction: column; align-items: flex-start; }
  .mod-brand .logo { font-size: 20px; line-height: 1; }
  .mod-brand .tag { font-size: 9px; letter-spacing: 0.22em; }
  .mod-conn { flex-shrink: 0; padding: 4px 10px; gap: 6px; margin-left: auto; }
  .mod-conn .peers-label { display: none; }

  /* Drawer: hidden by default, revealed when data-open=true */
  .mod-tier-secondary {
    flex-direction: column;
    align-items: stretch;
    border-top: 0;
    padding-top: 0;
    gap: 10px;
  }
  .mod-tier-secondary[data-open="false"] { display: none; }
  .mod-tier-secondary[data-open="true"] {
    display: flex;
    padding: 14px;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(10,10,18,0.55);
  }
  .mod-tier-secondary .room-bar,
  .mod-tier-secondary .audio-control,
  .mod-tier-secondary .profile-control,
  .mod-tier-secondary .tools-control {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .mod-tier-secondary .room-bar input { width: 100%; flex: 1 1 100%; }
  .profile-control select { min-width: 0; flex: 1 1 auto; }

  /* Tabs */
  .tab-bar-wrap { margin: 0 -12px 14px; padding: 12px; }
  .tabs { width: 100%; justify-content: flex-start; }
  .tab-btn { padding: 12px 16px; font-size: 12px; letter-spacing: 0.14em; }

  /* Display mode bar: horizontal scroll instead of wrap */
  .display-mode-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 12px;
    gap: 10px;
    scrollbar-width: thin;
  }
  .display-mode-bar > * { flex-shrink: 0; }
  .dm-hint { display: none; }
  .dm-style-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 196px;
  }
  .dm-style-btn {
    text-align: center;
    min-width: 86px;
    padding: 7px 10px;
  }

  /* Section headers */
  .section-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-header h2 { font-size: 22px; }

  /* Row card: tighter padding */
  .row-card { padding: 14px; margin-bottom: 12px; border-radius: 14px; }

  /* Counter row: stack the four columns vertically */
  .row-counter {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .row-counter > .hotkey-badge { display: none; }
  .row-counter > .left {
    flex-direction: row;
    align-items: center;
    align-self: start;
    gap: 10px;
  }
  .row-counter .icon-input { width: 56px; height: 56px; font-size: 28px; }
  .row-counter .color-input { width: 44px; height: 32px; }
  .row-counter .middle { width: 100%; gap: 10px; }
  .row-counter .value-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "value value value"
      "dec   reset  inc"
      "set   set    set";
    gap: 10px;
    align-items: center;
  }
  .row-counter .value-display .value-num { grid-area: value; font-size: 56px; min-width: 0; }
  .row-counter .value-display [data-action="dec"] { grid-area: dec; }
  .row-counter .value-display [data-action="reset"] { grid-area: reset; }
  .row-counter .value-display [data-action="inc"] { grid-area: inc; }
  .row-counter .value-display [data-field="value"] { grid-area: set; width: 100% !important; }
  .row-counter .value-display [data-action="dec"],
  .row-counter .value-display [data-action="inc"],
  .row-counter .value-display [data-action="reset"] {
    width: 100%;
    min-height: 56px;
    font-size: 22px;
    padding: 0;
  }
  .row-counter .right { width: 100%; align-items: stretch; }
  .row-counter .url-input-row { width: 100%; }
  .row-counter .url-input { width: 100%; flex: 1 1 0; min-width: 0; font-size: 11px; }
  .row-counter .right > [data-action="delete"] { align-self: flex-end; }

  /* Challenge row: stack columns vertically */
  .row-challenge {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .row-challenge .left-col {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
    gap: 10px;
  }
  .row-challenge .move-btns {
    flex-direction: row;
    margin-top: 0;
    gap: 8px;
  }
  .row-challenge .move-btns button { min-width: 44px; min-height: 44px; font-size: 18px; }
  .row-challenge .type-select { flex: 1 1 120px; min-width: 0; }
  .row-challenge .body-col { width: 100%; }
  .row-challenge .title-input { font-size: 18px; }
  .row-challenge .type-fields { padding: 10px; gap: 12px; }
  .row-challenge .type-fields label { flex-wrap: wrap; }
  .row-challenge .type-fields input[type="number"],
  .row-challenge .type-fields input[type="text"] { width: 100%; flex: 1 1 100px; }
  .row-challenge .type-fields .btn.icon { min-width: 44px; min-height: 44px; }
  .row-challenge .right-col {
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .row-social {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .row-social .social-left {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    min-width: 0;
  }
  .row-social .social-type-select { flex: 1 1 130px; min-width: 0; }
  .row-social .move-btns {
    flex-direction: row;
    margin-top: 0;
    gap: 8px;
  }
  .row-social .move-btns button { min-width: 44px; min-height: 44px; font-size: 18px; }
  .row-social .social-body-col { width: 100%; }
  .row-social .social-right-col {
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .row-playing {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .row-playing .playing-left {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
  }
  .row-playing .playing-preview {
    width: 112px;
    height: 66px;
  }
  .row-playing .playing-body-top {
    grid-template-columns: 1fr;
  }
  .row-playing .playing-accent-row {
    grid-template-columns: 1fr;
  }
  .row-playing .playing-display-row {
    grid-template-columns: 1fr;
  }
  .row-playing .playing-right-col {
    flex-direction: row;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  /* Toggle switch: bigger touch target */
  .toggle-switch .switch-track { width: 56px; height: 30px; }
  .toggle-switch .switch-thumb { width: 24px; height: 24px; }
  .toggle-switch.is-on .switch-thumb { transform: translateX(26px); }

  /* Toasts: full-width bottom */
  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
    padding: 14px 16px;
  }

  /* Modals: full-width gutter */
  .conflict-modal .modal-card { max-width: calc(100vw - 24px); margin-inline: 12px; padding: 20px; }
  .help-card { padding: 18px; }
  .help-row { grid-template-columns: 1fr; gap: 4px; padding: 6px 0; }
  .help-row .help-label { font-size: 12px; }

  /* Preview shelf: smaller min-height so it doesn't dominate */
  .preview-shelf .preview-mount { min-height: 160px; }

  /* Add-row button */
  .add-row { padding: 14px; font-size: 12px; }
}

@media (max-width: 430px) {
  .mod-brand .tag { display: none; }
  .mod-brand .logo { font-size: 18px; }
  .mod-conn { padding: 4px 8px; }
  .mod-conn .peers { font-size: 10px; letter-spacing: 0.14em; }
  .tabs { padding: 3px; }
  .tab-btn {
    padding: 10px 12px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }
  .dm-style-toggle {
    min-width: 170px;
    gap: 4px;
  }
  .dm-style-btn {
    font-size: 10px;
    min-width: 76px;
    padding: 7px 8px;
  }
}

/* ===== 2026 Atmosphere Refresh ===== */
html, body {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(125, 132, 255, 0.2), rgba(125, 132, 255, 0) 55%),
    radial-gradient(120% 100% at 0% 100%, rgba(86, 245, 216, 0.12), rgba(86, 245, 216, 0) 60%),
    linear-gradient(180deg, #070d18 0%, #0b1324 45%, #0d172a 100%);
}

#mod-bg {
  opacity: 0.3;
  filter: saturate(0.8) contrast(1.06);
}

.mod-app {
  max-width: 1200px;
  padding: 24px 28px 72px;
}

.mod-top {
  margin-bottom: 14px;
  padding: 14px 16px 16px;
  border-radius: 22px;
  border: 1px solid rgba(214, 228, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(30, 42, 70, 0.58), rgba(16, 24, 44, 0.7)),
    linear-gradient(120deg, rgba(115, 131, 255, 0.15), rgba(96, 223, 246, 0.1) 48%, rgba(230, 193, 255, 0.08));
  box-shadow:
    0 18px 54px rgba(4, 10, 24, 0.5),
    inset 0 1px 0 rgba(248, 251, 255, 0.16);
}

.mod-tier-secondary {
  border-top: 1px dashed rgba(183, 204, 255, 0.22);
}

.mod-brand .logo {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  text-decoration: none;
  background: linear-gradient(120deg, #77f7d5 0%, #8ec7ff 45%, #bda7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(125, 151, 255, 0.26));
}

.mod-brand .tag {
  color: #90a0c0;
  letter-spacing: 0.22em;
}

.mod-conn {
  border-color: rgba(203, 221, 255, 0.24);
  background: rgba(22, 34, 58, 0.58);
  box-shadow: inset 0 1px 0 rgba(242, 247, 255, 0.12);
}

.tab-bar-wrap {
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(7, 13, 24, 0.84), rgba(7, 13, 24, 0.5));
  border-bottom: 1px solid rgba(188, 210, 255, 0.22);
}

.tabs {
  border-radius: 14px;
  border-color: rgba(194, 215, 255, 0.3);
  background: rgba(16, 28, 50, 0.6);
  box-shadow: inset 0 1px 0 rgba(238, 244, 255, 0.08);
}

.tab-btn {
  letter-spacing: 0.18em;
  color: #9fb0d4;
}

.tab-btn.active {
  background:
    linear-gradient(125deg, rgba(120, 139, 255, 0.26), rgba(87, 222, 255, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  color: #f4f8ff;
  text-shadow: none;
  box-shadow:
    inset 0 0 0 1px rgba(194, 214, 255, 0.48),
    0 8px 20px rgba(18, 37, 70, 0.38);
}

.display-mode-bar {
  border-radius: 16px;
  border-color: rgba(192, 214, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(112, 133, 255, 0.12), rgba(91, 228, 251, 0.08)),
    rgba(12, 21, 40, 0.66);
}

.dm-btn,
.dm-style-btn {
  border-radius: 10px;
}

.dm-style-btn.active,
.dm-btn.active {
  border-color: rgba(173, 204, 255, 0.62);
  background: rgba(91, 201, 255, 0.16);
  color: #f4f8ff;
  box-shadow: inset 0 1px 0 rgba(244, 249, 255, 0.18);
}

.btn {
  border-radius: 12px;
  border-color: rgba(190, 213, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    rgba(22, 34, 58, 0.56);
  box-shadow: inset 0 1px 0 rgba(247, 251, 255, 0.14), 0 8px 18px rgba(10, 18, 34, 0.32);
}

.btn:hover {
  border-color: rgba(200, 223, 255, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0)),
    rgba(35, 50, 79, 0.72);
  color: #f7fbff;
}

.btn.primary {
  color: #071324;
  border-color: rgba(134, 219, 255, 0.72);
  background: linear-gradient(120deg, #88dcff 0%, #8bffa6 100%);
  box-shadow: 0 10px 24px rgba(108, 211, 255, 0.28);
}

.btn.primary:hover {
  color: #071324;
  filter: brightness(1.05) saturate(1.08);
}

.room-bar input,
.profile-control select,
.add-row,
.label-input,
.type-select,
.title-input,
.desc-input,
.url-input,
.social-title-input,
.social-subtitle-input,
.social-url-input,
.playing-title-input,
.playing-subtitle-input,
.playing-poster-input {
  border-radius: 12px;
  border-color: rgba(185, 207, 255, 0.28);
  background: rgba(9, 17, 34, 0.66);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.08);
}

.row-card {
  border-radius: 20px;
  border-color: rgba(183, 208, 255, 0.2);
  background:
    linear-gradient(170deg, rgba(126, 143, 255, 0.11), rgba(126, 143, 255, 0) 40%),
    linear-gradient(180deg, rgba(18, 29, 51, 0.72), rgba(12, 21, 38, 0.82));
  box-shadow:
    0 14px 36px rgba(5, 10, 24, 0.42),
    inset 0 1px 0 rgba(250, 253, 255, 0.08);
}

.row-card::before {
  opacity: 0.35;
}

.section-header h2 {
  font-family: var(--font-challenge-title);
  font-weight: 700;
  letter-spacing: 0;
}

.section-header .hint {
  color: #90a2c4;
}

.add-row {
  border-radius: 14px;
  border-color: rgba(182, 205, 255, 0.24);
  background: rgba(10, 19, 38, 0.42);
}

@media (max-width: 860px) {
  .mod-top {
    border-radius: 16px;
    padding: 12px;
  }
  .mod-app {
    padding: 16px 12px 62px;
  }
}

#challenges-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

#challenges-list > .row-challenge {
  margin-bottom: 0;
  height: auto;
}

#challenges-list > .empty-state {
  grid-column: 1 / -1;
}

/* ===== Left hub + live preview rail ===== */
.mod-app {
  width: min(1760px, calc(100vw - 32px));
  max-width: none;
  margin: 0 16px 0 24px;
}

.mod-workspace {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(320px, 35fr);
  gap: 20px;
  align-items: start;
}

.mod-control-column {
  min-width: 0;
}

.mod-control-column .tab-bar-wrap {
  margin: 0 0 18px;
  padding: 12px;
  justify-content: flex-start;
  border: 1px solid rgba(188, 210, 255, 0.2);
  border-radius: 18px;
}

.mod-control-column .tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.mod-control-column .tab-btn {
  min-width: 0;
  padding: 11px 12px;
  white-space: normal;
  line-height: 1.12;
}

.mod-control-column .display-mode-bar {
  align-items: flex-start;
  gap: 12px 16px;
}

.mod-control-column .display-mode-bar .dm-label {
  flex: 0 0 100%;
}

.mod-control-column .dm-transition {
  align-items: flex-start;
  flex-wrap: wrap;
}

.mod-control-column .dm-hint {
  flex: 1 1 100%;
  margin-left: 0;
  text-align: center;
}

.mod-preview-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(188, 210, 255, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(126, 143, 255, 0.12), rgba(126, 143, 255, 0) 44%),
    linear-gradient(180deg, rgba(16, 26, 48, 0.76), rgba(8, 15, 30, 0.9));
  box-shadow:
    0 18px 48px rgba(4, 9, 22, 0.44),
    inset 0 1px 0 rgba(248, 252, 255, 0.1);
}

.preview-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.preview-kicker,
.preview-status,
.preview-card-label,
.preview-empty {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.preview-kicker {
  color: #84f7df;
  font-size: 10px;
  letter-spacing: 0.28em;
}

.preview-panel-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.preview-status {
  margin-bottom: 14px;
  color: #8fa0c2;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.preview-list {
  display: grid;
  gap: 14px;
}

.preview-card {
  border: 1px solid rgba(185, 207, 255, 0.22);
  border-radius: 16px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0)),
    rgba(6, 12, 24, 0.72);
  box-shadow: inset 0 1px 0 rgba(245, 250, 255, 0.08);
}

.preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.preview-card-label {
  color: #e9f4ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.preview-card-link {
  color: #84f7df;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.preview-card-link:hover {
  color: #fff;
}

.preview-frame-shell {
  --preview-scale: 0.3;
  width: 100%;
  height: 216px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(164, 192, 255, 0.2);
  background: rgba(1, 4, 12, 0.74);
}

.preview-card[data-preview-kind="playing"] .preview-frame-shell,
.preview-card[data-preview-kind="socials"] .preview-frame-shell {
  height: 150px;
}

.preview-card[data-preview-kind="counters"] .preview-frame-shell {
  height: 210px;
}

.preview-frame {
  width: 1280px;
  height: 720px;
  border: 0;
  transform: scale(var(--preview-scale));
  transform-origin: 0 0;
  pointer-events: none;
  background: transparent;
}

.preview-empty {
  display: none;
  padding: 28px 16px;
  border: 1px dashed rgba(185, 207, 255, 0.24);
  border-radius: 16px;
  color: #7485a7;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-align: center;
}

.preview-empty.show {
  display: block;
}

.preview-list.overlay-root.mod-preview-overlay {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(164, 192, 255, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(110% 90% at 50% 0%, rgba(86, 245, 216, 0.08), rgba(86, 245, 216, 0) 58%),
    rgba(1, 4, 12, 0.74);
}

.preview-widget {
  --preview-scale: 0.525;
  --widget-w: 320px;
  --widget-h: 320px;
  --preview-w: calc(var(--widget-w) * var(--preview-scale));
  --preview-h: calc(var(--widget-h) * var(--preview-scale));
  flex: 0 0 auto;
  width: min(100%, var(--preview-w));
}

.preview-counter {
  --widget-w: 320px;
  --widget-h: 320px;
}

.preview-challenge {
  --widget-w: 680px;
  --widget-h: 220px;
}

.preview-social {
  --widget-w: 460px;
  --widget-h: 122px;
}

.preview-playing {
  --widget-w: 340px;
  --widget-h: 118px;
}

.preview-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.preview-widget-label {
  min-width: 0;
  color: #e9f4ff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.preview-widget-link {
  flex: 0 0 auto;
  color: #84f7df;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.preview-widget-link:hover {
  color: #fff;
}

.preview-widget-frame {
  width: var(--preview-w);
  max-width: 100%;
  height: var(--preview-h);
  overflow: visible;
}

.preview-widget-inner {
  width: var(--widget-w);
  height: var(--widget-h);
  transform: scale(var(--preview-scale));
  transform-origin: top left;
  pointer-events: none;
}

.preview-widget-inner.challenge-card-host {
  width: var(--widget-w);
  --challenge-height: var(--widget-h);
}

.preview-widget-inner.social-card-host {
  width: var(--widget-w);
  --social-height: var(--widget-h);
  max-width: none;
}

.preview-widget-inner.playing-card-host {
  width: var(--widget-w);
  --playing-height: var(--widget-h);
  max-width: none;
}

@media (max-width: 1180px) {
  .mod-app {
    width: auto;
    margin: 0 auto;
  }

  .mod-workspace {
    grid-template-columns: 1fr;
  }

  .mod-preview-panel {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .mod-control-column .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mod-control-column .display-mode-bar > .dm-cycle,
  .mod-control-column .display-mode-bar > .dm-transition {
    flex: 1 1 100%;
  }

  .mod-control-column .dm-transition {
    display: grid;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
    width: 100%;
  }

  .mod-control-column .dm-style-toggle {
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .mod-app {
    margin: 0;
    width: auto;
  }

  .mod-control-column .tab-bar-wrap {
    padding: 10px;
    border-radius: 14px;
  }

  .preview-frame-shell {
    --preview-scale: 0.24;
    height: 173px;
  }

  .preview-list.overlay-root.mod-preview-overlay {
    padding: 16px;
  }

  .preview-widget {
    --preview-scale: 0.5;
  }
}

@media (max-width: 520px) {
  .mod-control-column .tabs {
    grid-template-columns: 1fr;
  }

  .mod-control-column .dm-transition {
    grid-template-columns: 1fr;
  }
}

/* ===== Obsidian moderator theme ===== */
html,
body {
  --bg-deep: #030305;
  --bg-mid: #0a090d;
  --bg-soft: #151018;
  --ink: #f3eff8;
  --ink-dim: #b8afc2;
  --ink-faint: #766e82;
  --line: rgba(152, 188, 255, 0.14);
  --line-bright: rgba(171, 207, 255, 0.32);
  --accent: #d7a94a;
  --accent-soft: rgba(215, 169, 74, 0.18);
  --accent-glow: rgba(215, 169, 74, 0.42);
  background:
    radial-gradient(100% 78% at 92% -14%, rgba(69, 112, 202, 0.16), transparent 58%),
    radial-gradient(96% 70% at 88% -12%, rgba(110, 34, 78, 0.18), transparent 58%),
    radial-gradient(82% 76% at -10% 96%, rgba(23, 108, 122, 0.11), transparent 62%),
    radial-gradient(70% 50% at 50% 118%, rgba(215, 169, 74, 0.07), transparent 66%),
    linear-gradient(180deg, #030305 0%, #060509 44%, #09070f 100%);
}

#mod-bg {
  opacity: 0.18;
  filter: saturate(0.58) contrast(1.14) brightness(0.56);
  mix-blend-mode: screen;
}

.mod-top,
.mod-preview-panel {
  border-color: rgba(158, 194, 255, 0.18);
  background:
    linear-gradient(125deg, rgba(71, 119, 220, 0.08), rgba(71, 119, 220, 0) 44%),
    linear-gradient(155deg, rgba(116, 39, 78, 0.10), rgba(116, 39, 78, 0) 42%),
    linear-gradient(180deg, rgba(18, 15, 23, 0.86), rgba(8, 7, 12, 0.94));
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.58),
    0 0 26px rgba(83, 141, 255, 0.08),
    inset 0 1px 0 rgba(210, 230, 255, 0.08);
}

.tab-bar-wrap,
.mod-control-column .tab-bar-wrap {
  border-color: rgba(152, 188, 255, 0.15);
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.94), rgba(5, 5, 8, 0.7));
  box-shadow: 0 0 20px rgba(83, 141, 255, 0.055);
}

.tabs,
.display-mode-bar {
  border-color: rgba(152, 188, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(78, 132, 235, 0.09), rgba(127, 63, 131, 0.045)),
    linear-gradient(180deg, rgba(215, 169, 74, 0.035), rgba(215, 169, 74, 0)),
    rgba(10, 9, 14, 0.72);
  box-shadow:
    0 0 18px rgba(83, 141, 255, 0.065),
    inset 0 1px 0 rgba(210, 230, 255, 0.07);
}

.tab-btn {
  color: #aaa0b6;
}

.tab-btn:hover {
  color: #f3eff8;
}

.tab-btn.active,
.dm-style-btn.active,
.dm-btn.active {
  border-color: rgba(143, 190, 255, 0.46);
  background:
    linear-gradient(135deg, rgba(72, 132, 248, 0.18), rgba(215, 169, 74, 0.10)),
    rgba(18, 14, 20, 0.88);
  color: #eef6ff;
  box-shadow:
    inset 0 0 0 1px rgba(196, 222, 255, 0.17),
    0 0 18px rgba(83, 141, 255, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.34);
}

.mod-brand .logo {
  background: linear-gradient(120deg, #ffd36b 0%, #c978a6 46%, #f5eee5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(215, 169, 74, 0.22));
}

.mod-brand .tag,
.section-header .hint,
.preview-status {
  color: #91889d;
}

.preview-kicker {
  color: #8fbfff;
}

.btn,
.room-bar input,
.profile-control select,
.add-row,
.label-input,
.type-select,
.title-input,
.desc-input,
.url-input,
.social-title-input,
.social-subtitle-input,
.social-url-input,
.playing-title-input,
.playing-subtitle-input,
.playing-poster-input {
  border-color: rgba(235, 218, 255, 0.17);
  background:
    linear-gradient(180deg, rgba(255, 245, 224, 0.045), rgba(255, 245, 224, 0)),
    rgba(8, 7, 12, 0.68);
  box-shadow:
    0 0 12px rgba(83, 141, 255, 0.035),
    inset 0 1px 0 rgba(210, 230, 255, 0.05);
}

.btn:hover,
.add-row:hover {
  border-color: rgba(143, 190, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(83, 141, 255, 0.10), rgba(83, 141, 255, 0.02)),
    rgba(16, 13, 19, 0.82);
  color: #cfe4ff;
}

.btn.primary {
  color: #09070d;
  border-color: rgba(255, 211, 107, 0.72);
  background: linear-gradient(120deg, #ffd36b 0%, #d7a94a 100%);
  box-shadow: 0 10px 24px rgba(215, 169, 74, 0.22);
}

.btn.primary:hover {
  color: #09070d;
}

.row-card {
  border-color: rgba(152, 188, 255, 0.14);
  background:
    linear-gradient(128deg, rgba(70, 118, 216, 0.07), rgba(70, 118, 216, 0) 46%),
    linear-gradient(170deg, rgba(120, 49, 96, 0.08), rgba(120, 49, 96, 0) 42%),
    linear-gradient(180deg, rgba(17, 14, 22, 0.84), rgba(9, 8, 13, 0.92));
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.48),
    0 0 18px rgba(83, 141, 255, 0.045),
    inset 0 1px 0 rgba(210, 230, 255, 0.05);
}

.row-card:hover {
  border-color: rgba(143, 190, 255, 0.30);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(83, 141, 255, 0.08),
    inset 0 1px 0 rgba(210, 230, 255, 0.06);
}

.preview-card,
.preview-list.overlay-root.mod-preview-overlay {
  border-color: rgba(152, 188, 255, 0.15);
  background:
    linear-gradient(145deg, rgba(70, 118, 216, 0.055), rgba(70, 118, 216, 0) 48%),
    linear-gradient(180deg, rgba(255, 245, 224, 0.04), rgba(255, 245, 224, 0)),
    rgba(4, 4, 7, 0.78);
  box-shadow:
    0 0 18px rgba(83, 141, 255, 0.05),
    inset 0 1px 0 rgba(210, 230, 255, 0.05);
}
