:root {
  --bg-base: #0a0d13;
  --bg-card: #121722;
  --bg-elevated: #192030;
  --bg-input: #0d111a;
  --border: #253047;
  --border-hover: #38496b;
  --text-main: #eef2f8;
  --text-muted: #93a1b8;
  --text-dim: #64748b;
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.16);
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.14);
  --indigo: #6366f1;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background: radial-gradient(circle at 15% 0%, #131c2e 0%, var(--bg-base) 55%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.app-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 16px 20px 44px;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(18, 23, 34, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--cyan);
  display: grid;
  place-items: center;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-elevated);
  color: var(--cyan);
  border: 1px solid var(--border);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  transition: all 0.18s ease;
}

.engine-pill:hover {
  border-color: var(--cyan);
}

.engine-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.engine-pill.live .dot {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.nav-tab {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.nav-tab:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.nav-tab.active {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0.05));
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.55);
}

.tab-panel {
  display: none;
}

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

/* Layouts */
.studio-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
  align-items: start;
}

.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.right-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 1024px) {
  .studio-grid,
  .two-col-layout,
  .admin-tables-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-header.compact {
  margin-bottom: 10px;
}

.card h2 {
  font-size: 16px;
  font-weight: 700;
}

.card h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Switch Pad */
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.switch-pad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .switch-pad {
    grid-template-columns: repeat(2, 1fr);
  }
}

.switch-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.14s ease;
}

.switch-btn:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.switch-btn.selected {
  border-color: var(--cyan);
  background: var(--cyan-glow);
}

.switch-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
}

.switch-name {
  display: block;
  font-size: 11.5px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Styles Selector */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 680px) {
  .styles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.style-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  text-align: left;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.style-card:hover {
  border-color: var(--border-hover);
}

.style-card.active {
  border-color: var(--cyan);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.16), rgba(99, 102, 241, 0.08));
}

.style-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.style-title {
  font-size: 12.5px;
  font-weight: 700;
}

.style-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cyan);
}

.style-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Forms */
.form-group {
  margin-bottom: 12px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.label-row label {
  margin-bottom: 0;
}

.muted {
  font-weight: 400;
  color: var(--text-dim);
}

.mono-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 9px 11px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--cyan);
}

.mono-textarea {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.filename-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.two-col {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 12px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
  cursor: pointer;
}

.toggles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 14px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
  margin-bottom: 0;
}

/* Buttons */
button,
.btn-accent,
.btn-secondary {
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-lg {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
}

.btn-primary-sm {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12.5px;
  cursor: pointer;
}

.btn-accent,
.btn-accent-sm {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.btn-accent-sm {
  padding: 7px 11px;
  font-size: 12px;
}

.btn-secondary,
.btn-secondary-sm {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.btn-secondary-sm {
  padding: 7px 11px;
  font-size: 12px;
}

.btn-danger-sm {
  background: var(--rose-bg);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost-sm {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11.5px;
  cursor: pointer;
}

.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.action-bar.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Badges */
.badges-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge.neutral {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge.green {
  background: var(--emerald-bg);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge.cyan {
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.badge.amber {
  background: var(--amber-bg);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge.rose {
  background: var(--rose-bg);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* Output Player */
.phrase-display {
  font-size: 17px;
  font-weight: 700;
  padding: 13px 15px;
  background: var(--bg-input);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  margin-bottom: 12px;
}

.player-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 12px;
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--cyan);
  color: #06121a;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.play-btn:disabled {
  background: var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
}

.waveform-wrap {
  flex: 1;
  min-width: 0;
}

#waveformCanvas {
  width: 100%;
  height: 48px;
  display: block;
}

.player-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.download-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
  margin-bottom: 10px;
}

.json-details summary {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.code-block {
  margin-top: 8px;
  background: #080b10;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a5f3fc;
  overflow-x: auto;
  max-height: 290px;
}

/* Cache List */
.pack-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cache-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
}

.cache-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
}

.cache-item-main {
  min-width: 0;
  flex: 1;
}

.cache-phrase {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
}

.cache-sub {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cache-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover {
  border-color: var(--cyan);
}

/* Voices List */
.voices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.voice-title {
  font-weight: 700;
  font-size: 14px;
}

.voice-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
  margin: 2px 0;
}

.voice-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.remote-voices-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* API Endpoints */
.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.endpoint-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.method.post {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.method.get {
  background: var(--emerald-bg);
  color: #34d399;
}

.ep-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Admin Panel */
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
}

.kpi-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
}

.kpi-sub {
  font-size: 11px;
  color: var(--cyan);
  margin-top: 2px;
}

.admin-tables-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.55fr;
  gap: 18px;
}

.table-scroll {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--bg-card);
}

.errors-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.error-item {
  background: var(--rose-bg);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12px;
}

.guide-steps {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #cbd5e1;
}

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

.toast {
  background: #172133;
  border: 1px solid var(--cyan);
  color: var(--text-main);
  padding: 11px 16px;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  max-width: 380px;
}

.toast.error {
  border-color: var(--rose);
}

/* Paste Toolbar & Clipboard Controls */
.paste-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.btn-paste-primary {
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-paste-primary:hover {
  background: rgba(34, 211, 238, 0.26);
  border-color: var(--cyan);
}

.btn-paste-exact {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-paste-exact:hover {
  background: rgba(16, 185, 129, 0.24);
}

.btn-paste-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  transition: all 0.15s ease;
}

.btn-paste-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-paste-clear {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
  margin-left: auto;
}

.btn-paste-clear:hover {
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.45);
}

.inline-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.muted-btn {
  color: var(--text-muted);
  border-color: var(--border);
}

.phrase-display-wrap {
  position: relative;
  margin-bottom: 12px;
}

.phrase-display-wrap .phrase-display {
  margin-bottom: 0;
  padding-right: 112px;
}

.copy-phrase-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: var(--bg-elevated);
}

textarea.drag-over {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.78);
  backdrop-filter: blur(5px);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 18px 20px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.modal-card.modal-lg {
  max-width: 660px;
}

.modal-card.modal-xl {
  max-width: 880px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Editable Ready-Text Box & Intonation Chips */
.accent-ghost {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.45);
}

.editor-Subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.intonation-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.chip-insert-btn,
.web-tag-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip-insert-btn:hover,
.web-tag-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.lock-text-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}

.lock-text-toggle input {
  width: auto;
  accent-color: var(--amber);
}

/* Result Card Inline Text Editor & Re-Synthesis */
.result-editor-box {
  background: rgba(11, 16, 26, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.compact-row {
  margin-bottom: 6px;
}

.result-phrase-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  resize: vertical;
}

.result-phrase-textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.18);
}

.result-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-resynth {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #04131a;
  font-weight: 700;
  font-size: 12.5px;
  border: none;
  border-radius: 8px;
  padding: 7px 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-resynth:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: default;
}

.btn-resynth:not(:disabled):hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Internet Voice Search Button, Tags & Results */
.btn-web-search-sm {
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-web-search-sm:hover {
  background: rgba(34, 211, 238, 0.25);
  border-color: var(--cyan);
}

.web-search-panel {
  background: rgba(12, 18, 30, 0.65);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.compact-select {
  width: auto !important;
  min-width: 145px;
  flex-shrink: 0;
}

.quick-search-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.modal-web-results {
  overflow-y: auto;
  max-height: 54vh;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.web-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  padding: 6px 2px 2px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.voice-sample-quote {
  font-size: 11.5px;
  color: #94a3b8;
  font-style: italic;
  margin-top: 3px;
}

.btn-preview-audio.playing {
  border-color: var(--emerald);
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
}

/* ==================== MOBILE APP SHELL, PWA & FIELD TOOLS ==================== */
html, body {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior-y: none;
}

.app-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.install-app-chip {
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.install-app-chip:hover {
  background: rgba(16, 185, 129, 0.24);
}

.offline-banner {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Desktop Switcher Toolbar above Phone Frame */
.device-preview-bar {
  max-width: 960px;
  margin: 10px auto 8px;
  padding: 8px 14px;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.device-preview-left,
.device-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-pill-active {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan);
}

.phone-notch-bar {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* Dedicated "pack" tab handling in wide desktop mode */
body:not(.mobile-shell-preview)[data-active-tab="pack"] #studioGeneratorSection,
body:not(.mobile-shell-preview)[data-active-tab="pack"] #studioResultSection {
  display: none;
}
body:not(.mobile-shell-preview)[data-active-tab="pack"] .studio-grid {
  grid-template-columns: 1fr;
}
body:not(.mobile-shell-preview)[data-active-tab="pack"] .cache-list {
  max-height: 68vh;
}

/* Microphone Recorder & Instant Voice Clone Card */
.mic-recorder-card {
  border-color: rgba(244, 63, 94, 0.35);
  background: linear-gradient(180deg, rgba(25, 18, 32, 0.72) 0%, var(--bg-card) 100%);
}

.mic-script-box {
  background: rgba(9, 13, 22, 0.78);
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 10px;
}

.mic-script-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.42;
}

.mic-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.btn-mic-record {
  flex: 1;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.32);
  transition: all 0.16s ease;
}

.btn-mic-record.recording {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  animation: pulseRec 1.15s infinite;
}

@keyframes pulseRec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
}

.mic-meter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #080b12;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 10px;
}

#micLevelCanvas {
  flex: 1;
  height: 32px;
  width: 100%;
}

.mic-preview-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.full-audio {
  width: 100%;
  height: 38px;
}

.btn-mic-shortcut-sm {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.42);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-mic-shortcut-sm:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* Native Mobile Share & OTG Controls */
.mobile-export-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-share-mobile {
  width: 100%;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #04101d;
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-share-mobile:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: default;
}

.field-pack-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.btn-otg-action {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #03150e;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  flex: 1 1 210px;
}

.btn-share-zip {
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* QR Install Modal */
.qr-install-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(9, 13, 22, 0.8);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px;
}

.qr-svg-img {
  width: 144px;
  height: 144px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  flex-shrink: 0;
  background: #0b101a;
}

.qr-install-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
}

.qr-step-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.38);
  margin: 0 auto 10px;
}

/* ==================== DESKTOP PHONE SHELL SIMULATOR MODE ==================== */
@media (min-width: 841px) {
  body.mobile-shell-preview {
    background: radial-gradient(circle at 50% 10%, #162238 0%, #06090f 70%);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  body.mobile-shell-preview .phone-frame-outer {
    width: 446px;
    max-width: 96vw;
    flex: 1;
    max-height: calc(100vh - 68px);
    margin: 0 auto 10px;
    background: var(--bg-base);
    border: 7px solid #1e293b;
    border-radius: 40px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(34, 211, 238, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }

  body.mobile-shell-preview .phone-notch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 22px 6px;
    background: #090d16;
    font-size: 11.5px;
    font-weight: 700;
    color: #cbd5e1;
    flex-shrink: 0;
  }

  body.mobile-shell-preview .dynamic-island {
    width: 92px;
    height: 20px;
    background: #020408;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.mobile-shell-preview .app-shell {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px 18px;
    width: 100%;
    max-width: 100%;
  }

  body.mobile-shell-preview .desktop-only-tabs {
    display: none !important;
  }

  body.mobile-shell-preview .studio-grid,
  body.mobile-shell-preview .two-col-layout,
  body.mobile-shell-preview .admin-tables-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  body.mobile-shell-preview .two-col,
  body.mobile-shell-preview .three-col {
    grid-template-columns: 1fr !important;
    gap: 9px;
  }

  body.mobile-shell-preview .three-col.sliders-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
  }

  body.mobile-shell-preview .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  body.mobile-shell-preview .styles-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 7px;
  }

  body.mobile-shell-preview .switch-pad {
    display: grid;
    grid-template-columns: repeat(5, minmax(66px, 1fr));
    gap: 6px;
  }

  body.mobile-shell-preview .topbar {
    padding: 9px 11px;
    border-radius: 12px;
    margin-bottom: 10px;
  }

  body.mobile-shell-preview .brand-title {
    font-size: 14.5px;
  }

  body.mobile-shell-preview .brand-sub {
    font-size: 10.5px;
  }

  body.mobile-shell-preview .install-chip-lbl {
    display: none;
  }

  body.mobile-shell-preview[data-active-tab="studio"] #cacheCardSection {
    display: none;
  }

  body.mobile-shell-preview[data-active-tab="pack"] #studioGeneratorSection,
  body.mobile-shell-preview[data-active-tab="pack"] #studioResultSection {
    display: none;
  }

  body.mobile-shell-preview[data-active-tab="pack"] .cache-list {
    max-height: none;
  }

  body.mobile-shell-preview .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(11, 15, 25, 0.96);
    border-top: 1px solid var(--border);
    padding: 6px 6px 10px;
    flex-shrink: 0;
  }
}

/* ==================== NATIVE MOBILE VIEWPORT (<= 840px OR STANDALONE PWA) ==================== */
@media (max-width: 840px), (display-mode: standalone) {
  .device-preview-bar,
  .phone-notch-bar,
  .desktop-only-tabs {
    display: none !important;
  }

  .phone-frame-outer {
    width: 100%;
    min-height: 100dvh;
  }

  .app-shell {
    padding: max(10px, env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));
    max-width: 100%;
  }

  .topbar {
    padding: 10px 12px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .install-chip-lbl {
    display: none;
  }

  /* Prevent iOS Safari zoom on input focus */
  input, textarea, select {
    font-size: 16px !important;
  }

  .studio-grid,
  .two-col-layout,
  .admin-tables-grid,
  .two-col {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .three-col {
    grid-template-columns: 1fr !important;
  }

  .three-col.sliders-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
  }

  .styles-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .switch-pad {
    display: grid;
    grid-template-columns: repeat(5, minmax(64px, 1fr));
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  body[data-active-tab="studio"] #cacheCardSection {
    display: none;
  }

  body[data-active-tab="pack"] #studioGeneratorSection,
  body[data-active-tab="pack"] #studioResultSection {
    display: none;
  }

  body[data-active-tab="pack"] .cache-list {
    max-height: none;
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }

  /* Native Bottom-Sheet Modals on Smartphones */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .bottom-sheet-card {
    border-radius: 20px 20px 0 0;
    max-width: 100% !important;
    max-height: 90dvh;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    border-bottom: none;
  }

  .qr-install-box {
    flex-direction: column;
    text-align: left;
  }
}

/* Shared Bottom Navigation Item Styling */
.bottom-nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 2px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bottom-nav-item.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.bnav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.bnav-icon {
  font-size: 18px;
  line-height: 1.1;
}

.bnav-label {
  font-size: 10.5px;
  font-weight: 700;
}

.bnav-badge {
  position: absolute;
  top: -4px;
  right: -12px;
  background: var(--emerald);
  color: #03150e;
  font-size: 9.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 0 5px;
  min-width: 16px;
  text-align: center;
}

/* ==================== STRICT AUTH GATE & MULTI-METHOD LOGIN ==================== */
.toast-container {
  z-index: 9999 !important;
}

body.auth-locked .app-shell,
body.auth-locked .mobile-bottom-nav,
body:not(.auth-locked)[data-site-view="landing"] .app-shell,
body:not(.auth-locked)[data-site-view="landing"] .mobile-bottom-nav {
  display: none !important;
}

body:not(.auth-locked)[data-site-view="studio"] #siteLandingPage {
  display: none !important;
}

body:not(.auth-locked) #authGateOverlay,
#authGateOverlay.hidden {
  display: none !important;
}

body.auth-locked .authed-only-btn {
  display: none !important;
}

body:not(.auth-locked) .guest-only-btn {
  display: none !important;
}

.auth-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 36px;
  overflow-y: auto;
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(12px);
}

.auth-gate-card {
  width: 100%;
  max-width: 440px;
  margin: auto 0;
  background: rgba(15, 22, 36, 0.94);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.auth-brand-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-logo-ring {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.45), rgba(16, 185, 129, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-logo-ring img {
  border-radius: 12px;
  display: block;
}

.auth-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.auth-hero-text h1 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #f8fafc;
}

.auth-hero-text p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.38;
  color: var(--text-muted);
}

.badge.cyan {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: rgba(9, 13, 22, 0.85);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-bottom: 13px;
}

.auth-mode-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-mode-tab.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(16, 185, 129, 0.2));
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4);
}

.auth-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.auth-pane.active {
  display: flex;
}

.auth-error-banner {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fecdd3;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  margin-bottom: 10px;
  line-height: 1.38;
}

.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field-wrap input {
  width: 100%;
  padding-right: 40px;
}

.pw-eye-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 6px;
}

.pw-eye-btn:hover {
  color: #f8fafc;
}

.pw-strength-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  margin-top: 6px;
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 4px;
}

.auth-switch-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.otp-sandbox-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(16, 185, 129, 0.45);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12px;
  color: #d1fae5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.otp-boxes-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin: 4px 0 6px;
}

.otp-digit-input {
  width: 100%;
  height: 46px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  border-radius: 10px;
  background: rgba(9, 13, 22, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #f8fafc;
  padding: 0 !important;
}

.otp-digit-input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0 11px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  padding: 10px 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.oauth-btn:active {
  transform: scale(0.97);
}

.oauth-telegram {
  background: rgba(42, 171, 238, 0.16);
  border-color: rgba(42, 171, 238, 0.45);
  color: #7dd3fc;
}
.oauth-telegram:hover {
  background: rgba(42, 171, 238, 0.26);
}

.oauth-google {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f8fafc;
}
.oauth-google:hover {
  background: rgba(255, 255, 255, 0.13);
}

.oauth-github {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}
.oauth-github:hover {
  background: rgba(51, 65, 85, 0.92);
}

.auth-footer-note {
  margin-top: 13px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.38;
}

/* Header User Account Pill & Profile Modal */
.user-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 211, 238, 0.11);
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.user-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #041318;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-callsign-txt {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oauth-modal-badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.profile-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #031318;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-section-box {
  background: rgba(9, 13, 22, 0.65);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
}

.linked-providers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.sessions-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 130px;
  overflow-y: auto;
}

.session-mini-item {
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  padding: 6px 9px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.oauth-settings-details {
  background: rgba(9, 13, 22, 0.55);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
}

.oauth-settings-details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: #e2e8f0;
}

/* ==================== STRICT OWNER-ONLY ADMIN PANEL VISIBILITY ==================== */
body:not(.is-owner-admin) .owner-only {
  display: none !important;
}

body.is-owner-admin .non-owner-only {
  display: none !important;
}

/* ==================== PRO SUBSCRIPTION & UNIVERSAL CHECKOUT UI ==================== */
.pro-top-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.52);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(168, 85, 247, 0.22));
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.pro-top-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
}

.pro-top-chip.active-pro {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(245, 158, 11, 0.22));
  border-color: rgba(16, 185, 129, 0.58);
  color: #ecfdf5;
}

.badge.pro-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(236, 72, 153, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.56);
  color: #fde68a;
  font-weight: 800;
}

.pro-crown-orb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(168, 85, 247, 0.28));
  border: 1px solid rgba(245, 158, 11, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
}

.pro-reason-banner {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.48);
  color: #fef3c7;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 11px;
}

.pro-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

@media (max-width: 680px) {
  .pro-plans-grid {
    grid-template-columns: 1fr;
  }
}

.pro-plan-card {
  position: relative;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pro-plan-card:hover {
  border-color: rgba(245, 158, 11, 0.48);
}

.pro-plan-card.selected {
  border-color: #f59e0b;
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.16), rgba(34, 211, 238, 0.08));
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.42);
}

.pro-plan-price {
  font-size: 21px;
  font-weight: 900;
  color: #f8fafc;
}

.pro-plan-perks {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.pay-methods-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pay-method-btn {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pay-method-btn.active {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.15);
  color: #ecfeff;
}

.btn-pro-cta {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  color: #0b101a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #22d3ee);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.26);
}

.active-order-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.88);
}

.promo-redeem-box {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

body:not(.is-owner-admin) .mobile-bottom-nav {
  grid-template-columns: repeat(3, 1fr) !important;
}

body.is-owner-admin .mobile-bottom-nav {
  grid-template-columns: repeat(4, 1fr) !important;
}

body.is-owner-admin .user-account-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.18));
  border-color: rgba(245, 158, 11, 0.52);
}

.owner-security-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 13px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-subtabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 13px;
  scrollbar-width: none;
}

.admin-subtabs::-webkit-scrollbar {
  display: none;
}

.admin-subtab-btn {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-subtab-btn:hover {
  color: #f8fafc;
  border-color: rgba(245, 158, 11, 0.4);
}

.admin-subtab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(34, 211, 238, 0.16));
  border-color: rgba(245, 158, 11, 0.58);
  color: #fef3c7;
}

.admin-subpanel.hidden {
  display: none !important;
}

/* ==================== v12: FULL TRANSMITTER COMMAND CATALOG & CUSTOM AI STYLE GENERATOR ==================== */
.cmd-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cmd-catalog-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.btn-cmd-multiselect {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.36);
  background: rgba(34, 211, 238, 0.09);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-cmd-multiselect:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.65);
}

.btn-cmd-multiselect.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(34, 211, 238, 0.24));
  border-color: #10b981;
  color: #ecfdf5;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.22);
}

.cmd-category-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cmd-category-bar::-webkit-scrollbar {
  display: none;
}

.cmd-cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cmd-cat-chip:hover {
  color: #f8fafc;
  border-color: rgba(34, 211, 238, 0.42);
}

.cmd-cat-chip.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(99, 102, 241, 0.2));
  border-color: rgba(34, 211, 238, 0.72);
  color: #ecfeff;
}

.cmd-cat-count {
  font-size: 10px;
  opacity: 0.78;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
}

.cmd-search-row {
  position: relative;
  margin-bottom: 8px;
}

.cmd-search-row input {
  width: 100%;
  padding: 8px 32px 8px 11px;
  font-size: 12.5px;
  border-radius: 10px;
  background: rgba(9, 13, 22, 0.75);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.cmd-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
}

.switch-pad.catalog-pad {
  max-height: 245px;
  overflow-y: auto;
  padding-right: 3px;
  margin-bottom: 12px;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 7px;
}

.switch-btn {
  position: relative;
  text-align: left;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 9px;
  min-height: 54px;
}

.switch-btn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 5px;
}

.switch-hint-pill {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.13);
  color: #94a3b8;
  flex-shrink: 0;
}

.switch-check-box {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  color: transparent;
  background: rgba(9, 13, 22, 0.7);
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.switch-btn.checked-multi {
  border-color: #10b981 !important;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.2), rgba(34, 211, 238, 0.1)) !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.32);
}

.switch-btn.checked-multi .switch-check-box {
  background: #10b981;
  border-color: #10b981;
  color: #052e16;
}

.cmd-multiselect-toolbar {
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(34, 211, 238, 0.09));
  border: 1px solid rgba(16, 185, 129, 0.38);
  margin-bottom: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmd-multiselect-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.cmd-selected-pill {
  font-size: 12px;
  font-weight: 800;
  color: #6ee7b7;
}

.cmd-quick-select-btns {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-ghost-xs {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  cursor: pointer;
}

.btn-ghost-xs:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: #67e8f9;
}

.btn-batch-selected-cta {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #04131a;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn-batch-selected-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Custom Style Generator Button, Cards & Modal */
.btn-style-gen-sm {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.55);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(34, 211, 238, 0.16));
  color: #f3e8ff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-style-gen-sm:hover {
  border-color: #c084fc;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
}

.style-card {
  position: relative;
}

.style-card.custom-style-card {
  border-color: rgba(168, 85, 247, 0.35);
}

.style-card.custom-style-card.active {
  border-color: #c084fc;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.22), rgba(34, 211, 238, 0.12));
}

.style-card.add-style-card {
  border: 1px dashed rgba(168, 85, 247, 0.52);
  background: rgba(168, 85, 247, 0.07);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 76px;
}

.style-card.add-style-card:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #c084fc;
}

.style-delete-mini {
  border: none;
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
}

.style-delete-mini:hover {
  background: rgba(244, 63, 94, 0.38);
  color: #fff;
}

.style-gen-orb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(34, 211, 238, 0.25));
  border: 1px solid rgba(192, 132, 252, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.style-inspiration-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.style-idea-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(15, 23, 42, 0.78);
  color: #e9d5ff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.style-idea-chip:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: #c084fc;
}

.gen-style-result-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 13px;
  background: rgba(9, 13, 22, 0.82);
  border: 1px solid rgba(168, 85, 247, 0.42);
}

.gen-style-samples-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gen-style-sample-item {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.gen-style-sample-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 3px;
}

/* ==================== v14: FULL OFFICIAL PRODUCT WEBSITE & SAAS LANDING ==================== */
html {
  scroll-behavior: smooth;
}

.site-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 22px;
}

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 950;
  background: rgba(9, 13, 22, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(37, 48, 71, 0.85);
}

.site-navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.16s ease;
}

.site-nav-links a:hover {
  color: var(--cyan);
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-home-tab {
  border-color: rgba(34, 211, 238, 0.35);
  color: #a5f3fc;
}

/* Hero */
.site-hero {
  padding: 62px 0 54px;
  background:
    radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.14), transparent 42%),
    radial-gradient(circle at 86% 24%, rgba(99, 102, 241, 0.14), transparent 44%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 36px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: #a5f3fc;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.hero-title {
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.text-gradient {
  background: linear-gradient(135deg, #22d3ee 0%, #34d399 55%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 26px;
  max-width: 630px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-main-btn {
  padding: 13px 24px !important;
  font-size: 15px !important;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.24);
}

.hero-sec-btn {
  padding: 11px 16px !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.hero-radios-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.radio-chip {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(18, 23, 34, 0.9);
  border: 1px solid var(--border);
  color: #cbd5e1;
}

/* Interactive HUD Card */
.hero-hud-card {
  background: linear-gradient(165deg, rgba(18, 25, 40, 0.96), rgba(11, 16, 27, 0.98));
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.hud-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.hud-dots {
  display: flex;
  gap: 6px;
}

.hud-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
}

.hud-dots span:nth-child(1) { background: #f43f5e; }
.hud-dots span:nth-child(2) { background: #f59e0b; }
.hud-dots span:nth-child(3) { background: #10b981; }

.hud-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.hud-cmd-pills,
.hud-style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hud-pill,
.hud-style-btn {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(13, 18, 29, 0.9);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hud-pill:hover,
.hud-style-btn:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
}

.hud-pill.active {
  background: rgba(34, 211, 238, 0.18);
  border-color: var(--cyan);
  color: #ecfeff;
}

.hud-style-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(34, 211, 238, 0.2));
  border-color: #c084fc;
  color: #faf5ff;
}

.hud-phrase-screen {
  margin-top: 14px;
  padding: 15px;
  border-radius: 13px;
  background: #080c14;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.hud-phrase-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.hud-phrase-quote {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #f8fafc;
  min-height: 44px;
}

.hud-bars-visual {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
  margin-top: 12px;
}

.hud-bars-visual span {
  flex: 1;
  border-radius: 3px;
  background: linear-gradient(180deg, #22d3ee, #10b981);
  opacity: 0.72;
  height: 40%;
}

.hud-bars-visual span:nth-child(3n) { height: 92%; }
.hud-bars-visual span:nth-child(4n+1) { height: 68%; }
.hud-bars-visual span:nth-child(5n+2) { height: 28%; }

.hud-card-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Metrics Bar */
.site-metrics-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 32, 0.78);
  padding: 24px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-item {
  text-align: center;
  padding: 6px 10px;
}

.metric-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 4px;
}

.metric-lbl {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Content Sections */
.site-section {
  padding: 68px 0;
}

.alt-bg-section {
  background: rgba(14, 19, 30, 0.65);
  border-top: 1px solid rgba(37, 48, 71, 0.55);
  border-bottom: 1px solid rgba(37, 48, 71, 0.55);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(23px, 2.8vw, 33px);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-head p {
  font-size: 15px;
  color: var(--text-muted);
}

.features-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.feature-bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
}

.f-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  margin-bottom: 14px;
}

.feature-bento-card h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.feature-bento-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Commands Groups Showcase */
.cmd-groups-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cmd-group-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px;
}

.cmd-group-box h4 {
  font-size: 15px;
  margin-bottom: 8px;
  color: #f1f5f9;
}

.cmd-group-box p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.cmd-group-box code {
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

/* 4-Step Guide */
.steps-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  position: relative;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: rgba(34, 211, 238, 0.45);
  margin-bottom: 10px;
}

.step-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Landing Pricing */
.site-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

.site-price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.site-price-card.featured-price-card {
  border-color: #f59e0b;
  background: linear-gradient(170deg, rgba(245, 158, 11, 0.1), rgba(18, 23, 34, 0.98));
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.14);
}

.sp-popular-ribbon {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: #1c1917;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sp-tier {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.sp-amount {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 8px;
}

.sp-amount span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.sp-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sp-list {
  list-style: none;
  margin-bottom: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #e2e8f0;
}

.sp-btn {
  width: 100%;
  justify-content: center;
}

/* FAQ */
.faq-container {
  max-width: 860px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 18px;
}

.faq-item summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #f1f5f9;
}

.faq-item p {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Global Website Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #070a10;
  padding: 44px 0 28px;
  margin-top: 28px;
}

body.mobile-shell-preview .site-footer,
body.mobile-shell-preview #siteLandingPage {
  display: none !important;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr 1fr;
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(37, 48, 71, 0.6);
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-spec-pill {
  display: inline-block;
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.footer-col h4 {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #f8fafc;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--cyan);
}

.site-footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

@media (max-width: 1060px) {
  .hero-grid,
  .site-pricing-grid,
  .steps-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .features-bento-grid,
  .cmd-groups-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
  .site-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-nav-links {
    display: none;
  }
  .metrics-grid,
  .features-bento-grid,
  .cmd-groups-showcase,
  .steps-grid-4,
  .site-pricing-grid,
  .site-footer-grid {
    grid-template-columns: 1fr;
  }
  .site-hero {
    padding: 34px 0 36px;
  }
  .site-footer {
    padding-bottom: 84px;
  }
}

/* ==================== LEGAL DOCUMENTS MODAL, PUBLIC OFFER & CONSENT UI (v16) ==================== */

.legal-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(18, 25, 40, 0.72);
  border: 1px solid var(--border);
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.legal-consent-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--cyan);
  flex-shrink: 0;
}

.pro-legal-hint {
  margin-top: 8px;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.footer-legal-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.16s ease;
}

.footer-legal-link:hover {
  color: var(--cyan);
}

.footer-bottom-legal {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-legal-inline {
  background: none;
  border: none;
  padding: 0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal-inline:hover {
  color: var(--cyan);
}

.legal-modal-card {
  max-width: 860px !important;
  width: min(95vw, 860px) !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  z-index: 9500;
}

#legalDocsModal {
  z-index: 9500;
}

.legal-doc-orb {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(34, 211, 238, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.32);
}

.legal-tabs-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
  padding: 4px;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.legal-tab-btn {
  flex: 1 1 190px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.legal-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.legal-tab-btn.active {
  color: #0b101b;
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.25);
}

.legal-doc-scroll {
  overflow-y: auto;
  flex: 1 1 auto;
  max-height: 58vh;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(11, 15, 24, 0.92);
  border: 1px solid var(--border);
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.62;
}

.legal-doc-pane {
  display: none;
}

.legal-doc-pane.active {
  display: block;
}

.legal-doc-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  margin-bottom: 8px;
}

.legal-doc-pane h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 10px;
  line-height: 1.35;
}

.legal-doc-pane h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 16px 0 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

.legal-doc-pane p {
  margin: 0 0 8px;
}

.legal-lead {
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.45);
  border-left: 3px solid var(--cyan);
  color: #e2e8f0;
  margin-bottom: 12px !important;
}

.legal-doc-pane ul {
  margin: 4px 0 10px;
  padding-left: 20px;
}

.legal-doc-pane li {
  margin-bottom: 5px;
}

.legal-tariffs-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
}

.legal-tariff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 9px;
  background: rgba(24, 33, 52, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.legal-requisites-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(20, 28, 44, 0.78);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legal-custom-addendum {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
  color: #e2e8f0;
}

.legal-mail-link {
  color: var(--cyan);
  text-decoration: underline;
}

.legal-modal-footer {
  justify-content: space-between !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #legalDocsModal,
  #legalDocsModal * {
    visibility: visible !important;
  }
  #legalDocsModal {
    position: static !important;
    background: #fff !important;
    padding: 0 !important;
  }
  .legal-modal-card {
    max-width: 100% !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }
  .legal-doc-scroll {
    max-height: none !important;
    overflow: visible !important;
    background: #fff !important;
    color: #111 !important;
    border: none !important;
  }
  .legal-doc-pane h4,
  .legal-doc-pane h5,
  .legal-lead,
  .legal-requisites-box {
    color: #000 !important;
    background: #f8fafc !important;
  }
  .legal-tabs-row,
  .legal-modal-footer,
  #closeLegalModalBtn {
    display: none !important;
  }
}

/* ==================== NATIVE ANDROID & iOS MOBILE SHELL + SHOWCASE (v20) ==================== */

.native-only-btn {
  display: none;
}

body.is-native-app .native-only-btn {
  display: inline-flex;
}

body.is-native-app .site-navbar,
body.is-native-app .site-landing,
body.is-native-app .site-footer,
body.is-native-app .web-only-close-auth,
body.is-native-app #backToLandingTopBtn {
  display: none !important;
}

body.is-native-app .topbar {
  padding-top: max(10px, env(safe-area-inset-top));
}

body.is-native-app .mobile-bottom-nav {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

body.is-native-app .auth-gate-screen {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.mobile-apps-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.mobile-apps-showcase-grid.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.mobile-app-dl-card {
  padding: 26px 24px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(18, 25, 40, 0.94), rgba(11, 16, 27, 0.97));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.windows-dl-card {
  border-color: rgba(59, 130, 246, 0.42);
}

.android-dl-card {
  border-color: rgba(16, 185, 129, 0.36);
}

.ios-dl-card {
  border-color: rgba(34, 211, 238, 0.36);
}

.mad-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mad-header h3 {
  margin: 6px 0 0;
  font-size: 1.18rem;
  color: #f8fafc;
}

.mad-os-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  flex-shrink: 0;
}

.windows-orb {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.android-orb {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.ios-orb {
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

@media (max-width: 1080px) {
  .mobile-apps-showcase-grid.three-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .mobile-apps-showcase-grid,
  .mobile-apps-showcase-grid.three-cols {
    grid-template-columns: 1fr;
  }
}







