/* ----------------------------------------------------
   GLOBAL CONFIGURATION AND VARIABLES
   ---------------------------------------------------- */
:root {
  /* Premium color palette - Cyberpunk / dark style */
  --bg-primary: #070913;
  --bg-card: rgba(16, 20, 38, 0.65);
  --bg-card-hover: rgba(22, 28, 54, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.15);
  
  --primary: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #10b981; /* Emerald / Success */
  --secondary-glow: rgba(16, 185, 129, 0.3);
  --accent: #f43f5e; /* Coral / Alert */
  --accent-glow: rgba(244, 63, 94, 0.3);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ----------------------------------------------------
   AMBIENT BACKGROUND LIGHTS (GLOWS)
   ---------------------------------------------------- */
.bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.45;
}

.bg-glow-1 {
  background: radial-gradient(circle, var(--primary) 0%, rgba(99, 102, 241, 0) 70%);
  top: -150px;
  left: -150px;
}

.bg-glow-2 {
  background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
  bottom: -150px;
  right: -150px;
}

/* ----------------------------------------------------
   CONTAINER AND STRUCTURE LAYOUT
   ---------------------------------------------------- */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1rem;
  min-height: 100vh;
}

.production-mode-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(90deg, #1e3a5f, #312e81);
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.35;
  text-align: center;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.has-production-banner .production-mode-banner {
  display: flex;
}

body.has-production-banner .app-container {
  padding-top: 3.15rem;
}

body.has-production-banner .app-sidebar {
  top: 3.35rem;
  max-height: calc(100vh - 3.75rem);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: calc(100vh - 3rem);
  padding: 1rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-group--primary {
  gap: 0.45rem;
}

.sidebar-group--tools {
  padding-top: 0.15rem;
}

.sidebar-group--service {
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-group-label {
  margin: 0 0 0.15rem;
  padding: 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-spacer {
  flex: 1 1 auto;
  min-height: 0.75rem;
}

.sidebar-btn--muted {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.92;
}

.sidebar-btn--muted:hover {
  opacity: 1;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.app-hero {
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.55) 0%, rgba(15, 23, 42, 0.75) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.header-subtitle {
  color: var(--text-muted);
  max-width: none;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  margin: 0;
}

.header-subtitle strong {
  color: #c7d2fe;
  font-weight: 600;
}

.sidebar-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.sidebar-brand .logo-img {
  width: 44px;
  height: 44px;
}

.sidebar-brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.sidebar-btn,
.sidebar-tab-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  min-height: 42px;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.sidebar-btn:hover,
.sidebar-tab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-btn-icon {
  flex-shrink: 0;
  width: 1.1rem;
  text-align: center;
  line-height: 1.35;
}

.sidebar-btn-label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.sidebar-btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5053eb 100%);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
}

.sidebar-btn--primary:hover {
  background: linear-gradient(135deg, #5053eb 0%, #6366f1 100%);
}

.sidebar-btn--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
}

.sidebar-btn--warn:hover {
  background: rgba(251, 191, 36, 0.16);
}

/* Header (legacy) */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.app-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.header-action-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 1100px;
  margin-top: 0.65rem;
  padding: 0.4rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.header-chip-group {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-chip-group::-webkit-scrollbar {
  display: none;
}

.header-chip-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  margin: 0 0.15rem;
}

.header-chip-trailing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.header-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.85rem;
  font-family: var(--font-family);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.header-chip:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.header-chip-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.header-chip--primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5053eb 100%);
  border-color: rgba(99, 102, 241, 0.5);
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
  padding: 0 1rem;
}

.header-chip--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5053eb 0%, #6366f1 100%);
  border-color: rgba(99, 102, 241, 0.7);
  transform: translateY(-1px);
}

.header-chip--warn {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
}

.header-chip--warn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
}

.header-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .header-action-bar {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
  }

  .header-chip-group {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    padding: 0.15rem 0.1rem 0;
  }

  .header-chip--primary,
  .header-chip-trailing {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 140px;
  }

  .header-chip-trailing {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .header-chip-label {
    font-size: 0.72rem;
  }

  .header-chip {
    height: 34px;
    padding: 0 0.65rem;
  }
}

/* Tab navigation */
.tab-navigation {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  gap: 0.4rem;
  margin-top: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.sidebar-tab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #5053eb 100%);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.5rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
  color: var(--text-main);
  background: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ----------------------------------------------------
   COMPONENT DESIGN: CARDS
   ---------------------------------------------------- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35), 0 0 30px var(--border-glow);
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.2px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  line-height: 1.45;
}

/* Grids */
.grid-2col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.grid-2col-73 {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .grid-2col, .grid-2col-73 {
    grid-template-columns: 1fr;
  }
}

.flex-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ----------------------------------------------------
   FORMS AND INPUTS
   ---------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.form-input {
  flex-grow: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.form-select {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-select:focus {
  border-color: var(--primary);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-tiny {
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
  background: #5053eb;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  font-size: 1.1rem;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-muted);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.75rem 1.5rem;
}

.btn-danger:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-tiny {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.2);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-tiny:hover {
  background: rgba(244, 63, 94, 0.3);
}

.btn-block {
  width: 100%;
  display: block;
}

.flex-row-align {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

/* ----------------------------------------------------
   CONFIGURATION CONTROLS AND TOGGLES
   ---------------------------------------------------- */
.options-group {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.options-group h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.toggle-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.option-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 70%;
}

.option-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Slider Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.08);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
  border-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #ffffff;
}

/* Radio Toggles */
.radio-toggle {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.radio-label {
  cursor: pointer;
  position: relative;
}

.radio-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-label span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.radio-label input:checked + span {
  background: rgba(255,255,255,0.07);
  color: var(--text-main);
}

/* ----------------------------------------------------
   IDENTICON CONTAINERS AND PREVIEWS
   ---------------------------------------------------- */
.identicon-large-container {
  width: 250px;
  height: 250px;
  margin: 1.5rem 0;
  position: relative;
}

.identicon-medium-container {
  width: 160px;
  height: 160px;
  margin: 1.5rem auto;
  position: relative;
}

.identicon-large-container svg,
.identicon-medium-container svg {
  display: block;
  width: 100%;
  height: 100%;
}

.technical-details {
  width: 100%;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.technical-details h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.hash-display {
  display: flex;
  background: rgba(6, 9, 22, 0.8);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hash-label {
  font-weight: 700;
  color: var(--primary);
}

.hash-display code {
  font-family: var(--font-mono);
  word-break: break-all;
  color: #fff;
}

.tech-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ----------------------------------------------------
   COMPARATOR TAB
   ---------------------------------------------------- */
.comparator-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.comparator-workspace {
  padding: 1.35rem 1.5rem 1.5rem;
}

.comparator-header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.comparator-header .card-title {
  margin-bottom: 0.35rem;
}

.comparator-lead {
  margin: 0;
  max-width: 42rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.comparison-grid--primary {
  margin-bottom: 1.25rem;
}

.comparison-grid--primary .compare-preview.identicon-medium-container {
  max-width: min(100%, 280px);
}

.comparator-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.comparator-options-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.comparator-example-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.45rem 1.1rem;
  flex: 1 1 16rem;
}

.comparator-example-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.comparator-example-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.comparator-control {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 7.5rem;
}

.comparator-control label,
.comparator-field label,
.comparator-console-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.comparator-select {
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.comparator-select--compact {
  max-width: 11rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
}


.btn-demo {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-demo--danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.45);
  color: #f43f5e;
}

.btn-demo--danger:hover {
  background: rgba(244, 63, 94, 0.22);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
}

.btn-demo--ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}

.btn-demo--ok:hover {
  background: rgba(16, 185, 129, 0.22);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.comparator-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.85rem;
  margin-bottom: 0;
}

.comparator-legend {
  margin: 0;
  flex: 0 1 auto;
  justify-content: flex-start;
  max-width: none;
  gap: 0.75rem;
}

.compare-verdict {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 0;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.55);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.compare-verdict--neutral {
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
}

.compare-verdict--match {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.12);
}

.compare-verdict--mismatch {
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.08);
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.15);
  animation: pulse-red-glow 1.5s infinite ease-in-out;
}

.comparison-badge {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.comparison-badge--neutral {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 2px solid rgba(99, 102, 241, 0.35);
}

.comparison-badge--match {
  background: rgba(16, 185, 129, 0.15);
  color: var(--secondary);
  border: 2px solid var(--secondary);
  box-shadow: 0 0 15px var(--secondary-glow);
}

.comparison-badge--mismatch {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.compare-verdict-text {
  min-width: 0;
  flex: 1;
}

.comparison-msg {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  font-weight: 600;
}

.comparison-msg--neutral { color: #cbd5e1; }
.comparison-msg--match { color: #6ee7b7; }
.comparison-msg--mismatch { color: #fda4af; }

.comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.85rem 1rem;
}

.compare-slot {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.42);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.compare-slot-a {
  border-top: 3px solid rgba(56, 189, 248, 0.55);
}

.compare-slot-b {
  border-top: 3px solid rgba(245, 158, 11, 0.55);
}

.comparison-grid.match-detected .compare-slot-a,
.comparison-grid.match-detected .compare-slot-b {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

.comparison-grid.mismatch-detected .compare-slot-b {
  border-color: rgba(244, 63, 94, 0.55);
  background: rgba(244, 63, 94, 0.04);
  animation: pulse-red-glow 1.5s infinite ease-in-out;
}

.compare-slot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.compare-slot-title {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.compare-slot-title label {
  display: block;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.compare-slot-hint {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.compare-slot-badge {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.compare-slot-badge--a {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.compare-slot-badge--b {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.compare-address-input {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.55rem 0.7rem;
  word-break: break-all;
}

.compare-preview.identicon-medium-container {
  width: 100%;
  max-width: min(100%, 240px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0.35rem auto 0.15rem;
}

.btn-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-audio:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.55);
}

.btn-audio:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.15rem;
}

.compare-divider span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.35rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.7);
}

.comparator-secondary-panel {
  margin-top: 0;
}

.comparator-registry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.comparator-registry-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.comparator-registry-desc {
  margin: 0;
  max-width: 36rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.comparator-registry-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.xrpl-connection-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.xrpl-connection-pill.disconnected {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.xrpl-connection-pill.connected {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.xrpl-connection-pill.connecting {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.comparator-registry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.comparator-registry-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comparator-field {
  margin-bottom: 0;
}

.comparator-warning {
  font-size: 0.78rem;
  color: #f43f5e;
  padding: 0.7rem 0.85rem;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: 8px;
  line-height: 1.45;
}

.comparator-mono-input {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.7rem;
  color: #38bdf8;
}

.comparator-mono-input--secret {
  color: #fbbf24;
}

.comparator-secret-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.comparator-secret-badge {
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 600;
}

.comparator-burn-btn {
  margin-top: 0.15rem;
}

.comparator-console-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 100%;
}

.comparator-console {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 280px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.85rem;
  color: #38bdf8;
  overflow-y: auto;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (max-width: 960px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .compare-divider {
    padding: 0.15rem 0;
  }

  .compare-divider span {
    width: 100%;
    text-align: center;
  }

  .comparator-registry-grid {
    grid-template-columns: 1fr;
  }

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

  .comparator-example-tools {
    justify-content: flex-start;
  }

  .comparator-header {
    flex-direction: column;
  }

  .comparator-meta-row {
    flex-direction: column;
  }

  .comparison-grid--primary .compare-preview.identicon-medium-container {
    max-width: min(100%, 220px);
  }

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

@media (max-width: 640px) {
  .comparator-workspace {
    padding: 1rem 1rem 1.15rem;
  }
}

/* Legacy comparator aliases */
.comparison-column {
  display: flex;
  flex-direction: column;
}

.comparison-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}

.badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.badge.match {
  background: rgba(16, 185, 129, 0.15);
  color: var(--secondary);
  border: 2px solid var(--secondary);
  box-shadow: 0 0 15px var(--secondary-glow);
}

.badge.mismatch {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.status-msg {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-msg.match {
  color: var(--secondary);
}

.status-msg.mismatch {
  color: var(--accent);
}

/* ----------------------------------------------------
   COGNITIVE FIELD TESTING AND GAME TAB
   ---------------------------------------------------- */
.training-header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.training-header .card-title {
  margin-bottom: 0;
}

.training-playfield {
  margin-bottom: 1.25rem;
}

.training-playfield .identicon-target-container {
  width: 130px;
  height: 130px;
}

.training-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.training-options-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1.25rem;
}

.training-control {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 9rem;
}

.training-control label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.training-select {
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.training-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.game-screen {
  display: none;
  min-height: 350px;
}

.game-screen.active {
  display: flex;
  flex-direction: column;
}

/* Game Start Screen */
.start-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-grow: 1;
  gap: 1.25rem;
  padding: 3rem 0;
}

.start-icon {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.start-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.start-content p {
  color: var(--text-muted);
  max-width: 450px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Active Game Screen */
.target-container {
  display: flex;
  background: rgba(6, 9, 22, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.target-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  background: #080a14;
  border-radius: 12px;
  padding: 0.55rem 0.5rem 0.5rem;
  border: 1px solid var(--border-color);
  overflow: visible;
}

.badge-target {
  position: static;
  flex-shrink: 0;
  transform: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 1;
  white-space: nowrap;
  line-height: 1.2;
}

.identicon-target-container {
  width: 110px;
  height: 110px;
}

.identicon-target-container svg {
  width: 100%;
  height: 100%;
}

.target-instructions h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.target-instructions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.game-timer {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  white-space: nowrap;
}

.target-matching-rule {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 0.4rem;
}

.target-matching-highlight {
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
  text-decoration: underline;
}

.btn-listen-target {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: auto;
  max-width: 180px;
}

.target-instructions p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Options Grid for Selection */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 960px) {
  .training-options-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .target-instructions-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.option-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  position: relative;
}

.option-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-glow);
  transform: translateY(-2px);
}

/* Visual Feedback Effects */
.option-card.correct-flash {
  animation: correct-pulse 0.6s ease-out forwards;
}

.option-card.wrong-flash {
  animation: wrong-pulse 0.6s ease-out forwards;
}

@keyframes correct-pulse {
  0% { border-color: var(--border-color); box-shadow: none; }
  50% { border-color: var(--secondary); box-shadow: 0 0 15px var(--secondary-glow); background: rgba(16, 185, 129, 0.15); }
  100% { border-color: var(--secondary); }
}

@keyframes wrong-pulse {
  0% { border-color: var(--border-color); box-shadow: none; }
  50% { border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); background: rgba(244, 63, 94, 0.15); }
  100% { border-color: var(--accent); }
}

.identicon-option-container {
  width: 90px;
  height: 90px;
}

.identicon-option-container svg {
  width: 100%;
  height: 100%;
}

.option-address {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(6, 9, 22, 0.8);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  word-break: break-all;
  width: 100%;
  text-align: center;
}

/* Statistics Panel */
.stats-box {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(6, 9, 22, 0.4);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.stat-group h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  border-left: 3px solid var(--primary);
  padding-left: 0.5rem;
}

.stat-group:nth-child(3) h4 {
  border-left-color: #ec4899; /* Pink accent for chaotic mode */
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.divider {
  height: 1px;
  background: var(--border-color);
}

.stats-actions {
  margin-bottom: 1.5rem;
}

.conclusions-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 1.25rem;
  border-radius: 12px;
}

.conclusions-box h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.conclusions-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ----------------------------------------------------
   TABS DISPLAY CONTROL PANEL
   ---------------------------------------------------- */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

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

/* Information Footer */
.app-footer-info {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  line-height: 1.4;
}

/* Animations and Classes for Comparator and Alerts */
@keyframes pulse-red-glow {
  0% { box-shadow: 0 0 12px rgba(244, 63, 94, 0.35); border-color: rgba(244, 63, 94, 0.5); }
  50% { box-shadow: 0 0 35px rgba(244, 63, 94, 0.95); border-color: rgb(244, 63, 94); }
  100% { box-shadow: 0 0 12px rgba(244, 63, 94, 0.35); border-color: rgba(244, 63, 94, 0.5); }
}

@keyframes pulse-green-glow {
  0% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.35); border-color: rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 35px rgba(16, 185, 129, 0.95); border-color: rgb(16, 185, 129); }
  100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.35); border-color: rgba(16, 185, 129, 0.5); }
}

.mismatch-active {
  animation: pulse-red-glow 1.5s infinite ease-in-out;
  background: rgba(244, 63, 94, 0.03) !important;
}

.match-active {
  animation: pulse-green-glow 1.5s infinite ease-in-out;
  background: rgba(16, 185, 129, 0.03) !important;
}

.mismatch-text {
  color: #f43f5e !important;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
  font-weight: 800;
}

.match-text {
  color: #10b981 !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  font-weight: 800;
}

/* Placeholder for Empty Views in Comparator */
.empty-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 2px dashed rgba(99, 102, 241, 0.25);
  border-radius: 16px; /* Matches SVG border-radius */
  background: rgba(99, 102, 241, 0.03);
  box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.05);
  color: var(--text-muted);
  box-sizing: border-box;
  margin: 0 auto;
  transition: all var(--transition-fast);
}

.empty-preview-placeholder:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.1);
}

.empty-preview-placeholder span {
  font-size: 2rem;
  margin-bottom: 0.4rem;
  display: block;
  animation: gentle-key-pulse 2s infinite ease-in-out;
}

@keyframes gentle-key-pulse {
  0% { transform: scale(1); opacity: 0.55; filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.1)); }
  50% { transform: scale(1.1); opacity: 0.9; filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4)); }
  100% { transform: scale(1); opacity: 0.55; filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.1)); }
}

.empty-preview-placeholder p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 0 0.5rem;
}

/* XRPL Validation Badges */
.xrpl-badge-registered {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.xrpl-badge-unregistered {
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#xrpl-connection-status.connected {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}

#xrpl-connection-status.connecting {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.2) !important;
}

#xrpl-connection-status.disconnected {
  color: #f43f5e !important;
  background: rgba(244, 63, 94, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
}

/* Disabled Buttons */
.btn-block:disabled, .btn-tiny:disabled, button:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

/* Premium Classes for XRPL Buttons */
.btn-generate {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  width: 100%;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.btn-generate:active:not(:disabled) {
  transform: translateY(0);
}

.btn-connect {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  width: 100%;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-connect:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-connect:active:not(:disabled) {
  transform: translateY(0);
}

.btn-register {
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-register.wizard-mint-cta {
  width: auto;
  min-width: 160px;
}

.btn-register:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-register:active:not(:disabled) {
  transform: translateY(0);
}

.btn-register:disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.35 !important;
}

/* ----------------------------------------------------
   ONBOARDING & USER GUIDANCE
   ---------------------------------------------------- */
.welcome-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  margin-bottom: 0.5rem;
  animation: slideDown 0.4s ease;
}

.welcome-banner.hidden { display: none !important; }

.welcome-banner-content {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  flex: 1;
  min-width: 260px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.welcome-logo,
.brand-logo-sm {
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.welcome-logo {
  width: 40px;
  height: 40px;
}

.brand-logo-sm {
  width: 32px;
  height: 32px;
}

.help-modal-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.welcome-flow {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.welcome-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-sm {
  padding: 0.45rem 1rem !important;
  font-size: 0.82rem !important;
}

.host-platform-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem 0.65rem 1rem;
  font-size: 0.82rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.host-platform-notice.hidden {
  display: none !important;
}

.host-notice-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.host-notice-text {
  flex: 1;
  min-width: 0;
}

.host-notice-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}

.host-notice-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.host-platform-notice a {
  color: #38bdf8;
  text-decoration: underline;
}

.help-bug-report {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.06);
}

.help-known-issue {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.help-known-issue h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.help-known-issue p {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.help-known-issue .btn-secondary {
  display: inline-flex;
  font-size: 0.82rem;
}

.help-bug-report h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.help-bug-report p {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.help-bug-report .btn-secondary {
  display: inline-flex;
  font-size: 0.82rem;
}

.tab-guide-panel {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.tab-guide-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.tab-guide-icon { font-size: 1.5rem; }

.tab-guide-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
}

.tab-guide-summary {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.tab-guide-steps {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tab-guide-steps li { margin-bottom: 0.2rem; }

.field-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.4rem;
  line-height: 1.4;
}

.badge-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1.25rem;
  max-width: 700px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-item { display: flex; align-items: center; gap: 0.35rem; }

.section-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  vertical-align: middle;
}

.match-instructions-bar {
  flex: 1 1 14rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  text-align: left;
  font-size: 0.76rem;
  color: #fcd34d;
  padding: 0.5rem 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 8px;
  line-height: 1.4;
}

.match-instructions-bar p {
  margin: 0;
}

.match-instructions-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.2;
}

/* Tooltips */
.has-tip { position: relative; }

.ui-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
  pointer-events: none;
  text-align: center;
}

.has-tip:hover .ui-tooltip,
.has-tip:focus-within .ui-tooltip { display: block; }

.input-wrapper.has-tip .ui-tooltip { left: 0; transform: none; }

/* Toast notifications */
.ui-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.ui-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s ease;
}

.ui-toast.visible { opacity: 1; transform: translateY(0); }

.ui-toast--success { border-color: rgba(16, 185, 129, 0.5); }
.ui-toast--warn { border-color: rgba(244, 63, 94, 0.5); }
.ui-toast--info { border-color: rgba(99, 102, 241, 0.5); }

.ui-toast-icon { flex-shrink: 0; }

/* Help modal */
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.help-modal.open { opacity: 1; visibility: visible; }

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.help-modal-content {
  position: relative;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.help-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.help-modal-close:hover { color: var(--text-main); }

.help-modal-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.help-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.help-map-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  position: relative;
}

.help-map-card--optional {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
}

.help-map-num {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-map-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.help-map-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.help-map-cost {
  font-size: 0.72rem;
  color: #10b981;
  font-weight: 600;
}

.help-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

@media (max-width: 640px) {
  .ui-toast-container { left: 1rem; right: 1rem; max-width: none; }
  .welcome-banner { flex-direction: column; align-items: stretch; }
  .wallet-approach-actions { flex-direction: column; }
}

/* Wallet first-approach panel */
.wallet-approach-panel {
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.08);
}

.wallet-approach-panel.collapsed { display: none; }

.wallet-approach-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.wallet-approach-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
}

.wallet-approach-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.wallet-approach-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.wallet-approach-steps {
  margin: 0 0 1rem 0;
  padding-left: 1.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.wallet-approach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-xaman-primary {
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-family);
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-xaman-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.45);
}

.btn-gem-alt {
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-family);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-gem-alt:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wallet-approach-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.wallet-approach-note a {
  color: #38bdf8;
}

/* =============================================================================
   SITE FOOTER — LEGAL
   ============================================================================= */
.app-footer {
  margin-top: 3rem;
  padding: 1.75rem 1.25rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.footer-disclaimer {
  max-width: 720px;
  margin: 0 auto 1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.footer-disclaimer strong {
  color: var(--text-main);
  font-weight: 600;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-legal a {
  font-size: 0.8rem;
  color: #38bdf8;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin: 0;
}

/* =============================================================================
   TERMS OF USE MODAL
   ============================================================================= */
html[data-terms-accepted="1"] .terms-modal {
  display: none !important;
}

body.terms-locked {
  overflow: hidden;
}

html[data-terms-accepted="1"] body.terms-locked {
  overflow: auto;
}

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.terms-modal.open {
  opacity: 1;
  visibility: visible;
}

.terms-modal-panel {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.25rem;
  background: linear-gradient(160deg, rgba(30, 27, 75, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.terms-modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.terms-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.terms-modal-version {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.terms-modal-body {
  overflow-y: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  padding-right: 0.25rem;
}

.terms-lead {
  margin: 0 0 0.85rem;
  color: var(--text-main);
}

.terms-points {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
}

.terms-points li {
  margin-bottom: 0.45rem;
}

.terms-full-link {
  margin: 0;
  font-size: 0.8rem;
}

.terms-full-link a {
  color: #38bdf8;
}

.terms-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-main);
  cursor: pointer;
}

.terms-checkbox-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: #38bdf8;
}

.terms-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.terms-modal-actions .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.terms-declined-screen {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #020617;
}

.terms-declined-screen.hidden {
  display: none !important;
}

.terms-declined-panel {
  max-width: 420px;
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
}

.terms-declined-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.terms-declined-panel p {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.terms-declined-panel .btn-primary,
.terms-declined-panel .btn-secondary {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Keychain registration wizard */
.keychain-wizard { max-width: 640px; margin: 0 auto; }
.wizard-header h2 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.wizard-intro { margin: 0 0 0.85rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.wizard-progress { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.wizard-progress-step { flex: 1; min-width: 4.5rem; text-align: center; font-size: 0.68rem; color: var(--text-muted); padding: 0.3rem 0.2rem; border-radius: 8px; border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.03); }
.wizard-progress-step span { display: block; font-weight: 700; font-size: 0.78rem; margin-bottom: 0.1rem; }
.wizard-progress-step.active { color: var(--text-main); border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.08); }
.wizard-progress-step.done { border-color: rgba(16, 185, 129, 0.4); color: #10b981; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wizardFade 0.25s ease; }
.wizard-step h3 { margin: 0 0 0.35rem; font-size: 0.98rem; }
.wizard-step p { margin: 0 0 0.65rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.wizard-mosaic { margin: 0 auto 0.65rem; max-width: 220px; }
.field-error { margin: 0.35rem 0 0; font-size: 0.8rem; color: #f43f5e; min-height: 1.1rem; }
.wizard-status { display: inline-block; margin-bottom: 1rem; padding: 0.4rem 0.75rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600; }
.wizard-status.idle { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.wizard-status.connecting { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.wizard-status.connected { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.wizard-status.failed { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.wizard-console { margin-top: 0.5rem; max-height: 88px; overflow-y: auto; padding: 0.6rem 0.75rem; font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.4; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border-color); border-radius: 8px; color: #94a3b8; white-space: pre-wrap; }
.wizard-success-list { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; line-height: 1.6; }
.wizard-success-list code { font-size: 0.78rem; word-break: break-all; }
.wizard-success-banner { text-align: center; margin-bottom: 1.25rem; padding: 1.25rem 1rem; border-radius: 12px; border: 1px solid rgba(16, 185, 129, 0.35); background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04)); }
.wizard-success-icon { display: block; font-size: 2.5rem; margin-bottom: 0.35rem; }
.wizard-success-banner h3 { margin: 0 0 0.35rem; font-size: 1.15rem; color: #10b981; }
.wizard-success-lead { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

.wizard-xaman-trust-panel {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  text-align: left;
}

.wizard-xaman-trust-panel.wizard-xaman-trust-ok {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.wizard-xaman-trust-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #fbbf24;
}

.wizard-xaman-trust-panel.wizard-xaman-trust-ok h4 {
  color: #10b981;
}

.wizard-xaman-trust-panel p {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.wizard-trust-checklist {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.wizard-trust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.verify-page-body {
  min-height: 100vh;
  background: var(--bg-primary, #0b1120);
  color: var(--text-primary, #e2e8f0);
}

.verify-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.verify-header h1 {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.65rem;
}

.verify-back {
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.88rem;
}

.verify-lead {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.verify-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 16px;
}

.verify-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.verify-card p,
.verify-card li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.verify-log {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}

.verify-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.verify-status--idle {
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text-muted);
}

.verify-status--loading {
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

.verify-status--ok {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.verify-status--warn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.verify-status--error {
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.08);
}

.verify-result-list {
  margin: 0.5rem 0;
  padding-left: 1.1rem;
}

.verify-result-list code {
  word-break: break-all;
  font-size: 0.78rem;
}

.verify-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}

.verify-links a {
  color: #38bdf8;
  font-size: 0.84rem;
}

.verify-note {
  margin-top: 0.75rem !important;
  font-size: 0.82rem !important;
}

.verify-warning .btn-secondary {
  display: inline-flex;
  margin: 0.35rem 0.5rem 0 0;
}

.verify-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.verify-footer a {
  color: #38bdf8;
}

.wizard-return-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(2, 6, 23, 0.82); backdrop-filter: blur(6px); }
.wizard-return-overlay.hidden { display: none; }
.wizard-return-card { max-width: 420px; padding: 1.25rem 1.5rem; border-radius: 12px; border: 1px solid rgba(56, 189, 248, 0.35); background: rgba(15, 23, 42, 0.95); text-align: center; font-size: 0.9rem; line-height: 1.55; color: var(--text-main); }
.wizard-return-card p { margin: 0 0 0.65rem; }
.wizard-return-card p:last-child { margin-bottom: 0; color: var(--text-muted); font-size: 0.84rem; }
.wizard-celebrate-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.wizard-step[data-step="5"] { position: relative; }
.wizard-success-banner.wizard-celebrate-active { animation: wizardCelebratePulse 1.2s ease 2; box-shadow: 0 0 40px rgba(16, 185, 129, 0.35); }
@keyframes wizardCelebratePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.confetti-piece { position: absolute; top: -8px; left: var(--x); width: 8px; height: 8px; background: var(--color); border-radius: 2px; animation: confettiFall 1.8s ease-out var(--delay) forwards; opacity: 0.9; }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(320px) rotate(720deg); opacity: 0; } }
.wizard-unmint-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--border-color); }
.wizard-unmint-note { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.65rem; line-height: 1.45; }

/* Burn success — fresh confirmation after Xaman return */
.burn-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.burn-success-overlay.is-open { display: flex; }
body.burn-success-open { overflow: hidden; }
.burn-success-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
}
.burn-success-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: 1.5rem 1.5rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(251, 146, 60, 0.4);
  background: linear-gradient(180deg, rgba(30, 20, 12, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(251, 146, 60, 0.12);
}
.burn-success-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}
.burn-success-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.burn-success-banner { text-align: center; margin-bottom: 1.1rem; }
.burn-success-icon { display: block; font-size: 2.4rem; margin-bottom: 0.35rem; }
.burn-success-banner h2 { margin: 0 0 0.4rem; font-size: 1.2rem; color: #fb923c; }
.burn-success-lead { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); }
.burn-success-list {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  list-style: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  line-height: 1.55;
}
.burn-success-list li { margin-bottom: 0.4rem; }
.burn-success-list li:last-child { margin-bottom: 0; }
.burn-success-list code { font-size: 0.76rem; word-break: break-all; color: #fdba74; }
.burn-success-note { margin: 0 0 1.1rem; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }
.burn-success-actions { display: flex; gap: 0.65rem; }
.burn-success-actions .btn-primary { flex: 1; }

.cost-confirm-modal { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s, visibility 0.2s; }
.cost-confirm-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.cost-confirm-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.75); backdrop-filter: blur(4px); }
.cost-confirm-panel { position: relative; z-index: 1; max-width: 460px; width: 100%; padding: 1.35rem 1.5rem; border-radius: 14px; border: 1px solid rgba(56, 189, 248, 0.3); background: rgba(15, 23, 42, 0.97); box-shadow: 0 24px 48px rgba(0,0,0,0.45); }
.cost-confirm-panel h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.cost-confirm-body { font-size: 0.86rem; line-height: 1.55; color: var(--text-muted); max-height: 50vh; overflow-y: auto; }
.cost-confirm-lead { color: var(--text-main); margin: 0 0 0.5rem; }
.cost-confirm-address code { font-size: 0.76rem; word-break: break-all; color: #38bdf8; }
.cost-confirm-live { font-size: 0.75rem; opacity: 0.75; margin: 0 0 0.75rem; }
.cost-confirm-list { margin: 0 0 0.75rem; padding-left: 1.1rem; }
.cost-confirm-list li { margin-bottom: 0.35rem; }
.cost-confirm-note, .cost-confirm-warning { font-size: 0.82rem; margin: 0 0 0.65rem; padding: 0.55rem 0.65rem; border-radius: 8px; }
.cost-confirm-note { background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.2); }
.cost-confirm-warning { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.25); color: #fbbf24; }
.cost-confirm-disclaimer { font-size: 0.8rem; margin: 0; }
.cost-confirm-loading { font-style: italic; }
.cost-confirm-actions { display: flex; gap: 0.65rem; margin-top: 1.25rem; }
.cost-confirm-actions .btn-primary, .cost-confirm-actions .btn-secondary { flex: 1; }
.cost-confirm-modal[data-loading="1"] #cost-confirm-accept-btn,
.cost-confirm-modal[data-arming="1"] #cost-confirm-accept-btn {
  opacity: 0.55;
  cursor: wait;
}
.cost-confirm-modal[data-arming="1"] .cost-confirm-hint {
  display: block;
}
.cost-confirm-hint {
  display: none;
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
.cost-confirm-package {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
}
.cost-confirm-package-title { margin: 0 0 0.45rem; font-size: 0.84rem; color: var(--text-main); }
.cost-confirm-package-list {
  margin: 0 0 0.45rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.5;
}
.cost-confirm-package-list a { color: #38bdf8; }
.cost-confirm-package-note { margin: 0; font-size: 0.76rem; color: var(--text-muted); }
.cost-confirm-error-detail {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #fda4af;
  word-break: break-word;
}

.first-use-overlay {
  position: fixed;
  inset: 0;
  z-index: 10006;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.first-use-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.first-use-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

body.first-use-open {
  overflow: hidden;
}

.first-use-mosaic-error { margin: 0; padding: 1rem; font-size: 0.8rem; color: #fda4af; text-align: center; }

.first-use-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  width: min(100%, 520px);
  max-height: min(90vh, 720px);
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  outline: none;
}
.first-use-header { flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 1.25rem 1.35rem 0.85rem; border-bottom: 1px solid var(--border-color); }
.first-use-header-text { min-width: 0; padding-right: 0.25rem; }
.first-use-scroll { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1.35rem 0.5rem; }
.first-use-close { flex-shrink: 0; min-width: 5rem; height: 2.1rem; padding: 0 0.75rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 8px; color: var(--text-main); font-family: var(--font-family); font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.first-use-close:hover { background: rgba(255,255,255,0.14); }
.first-use-mosaic-wrap { position: relative; display: block; width: min(100%, 220px); margin: 0.5rem auto 0.75rem; padding: 0; border: 1px solid rgba(16, 185, 129, 0.25); border-radius: 14px; background: #0c0f1d; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; overflow: hidden; }
.first-use-mosaic-wrap:hover, .first-use-mosaic-wrap:focus-visible { border-color: rgba(16, 185, 129, 0.55); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); outline: none; }
.first-use-mosaic-canvas { width: 100%; aspect-ratio: 1 / 1; margin: 0; min-height: 160px; }
.first-use-mosaic-canvas svg { display: block; width: 100%; height: 100%; }
.first-use-mosaic-hint { display: block; padding: 0.45rem 0.55rem 0.55rem; text-align: center; font-size: 0.72rem; color: var(--text-muted); background: rgba(2, 6, 23, 0.72); pointer-events: none; }
.first-use-panel h2 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.first-use-intro { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.first-use-progress { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.first-use-progress-step { flex: 1; min-width: 4rem; text-align: center; font-size: 0.68rem; color: var(--text-muted); padding: 0.35rem 0.2rem; border-radius: 8px; border: 1px solid var(--border-color); }
.first-use-progress-step span { display: block; font-weight: 700; font-size: 0.8rem; }
.first-use-progress-step.active { border-color: rgba(16, 185, 129, 0.5); color: var(--text-main); background: rgba(16, 185, 129, 0.08); }
.first-use-progress-step.done { color: #10b981; border-color: rgba(16, 185, 129, 0.35); }
.first-use-step { display: none; }
.first-use-step.active { display: block; animation: wizardFade 0.25s ease; }
.first-use-step h3 { margin: 0 0 0.5rem; font-size: 1.02rem; }
.first-use-step p { margin: 0 0 0.75rem; font-size: 0.86rem; color: var(--text-muted); line-height: 1.5; }
.first-use-footer { flex-shrink: 0; display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0; padding: 0.85rem 1.35rem 1.25rem; border-top: 1px solid var(--border-color); background: rgba(15, 23, 42, 0.98); }
.first-use-footer-close { width: 100%; }
.first-use-footer-nav { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.first-use-footer-nav .btn-primary,
.first-use-footer-nav .btn-secondary { flex: 1 1 7rem; min-width: 0; }
.wizard-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border-color); }
.wizard-footer .btn-secondary { flex: 0 0 auto; font-size: 0.86rem; padding: 0.62rem 1rem; }
.wizard-footer .btn-primary,
.wizard-footer .btn-register { flex: 0 0 auto; min-width: 148px; font-size: 0.86rem; padding: 0.62rem 1.15rem; box-shadow: 0 2px 10px rgba(99, 102, 241, 0.22); }
.wizard-footer .btn-register { box-shadow: 0 2px 10px rgba(16, 185, 129, 0.22); }
.hidden { display: none !important; }
@keyframes wizardFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.has-production-banner .app-sidebar {
    top: auto;
    max-height: none;
  }

  .app-sidebar {
    position: static;
    max-height: none;
  }

  .sidebar-spacer {
    display: none;
  }

  .sidebar-group--service {
    margin-top: 0.35rem;
  }

  .header-subtitle {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .app-hero {
    padding: 0.85rem 1rem;
  }
}

@media (max-width: 560px) {
  body.has-production-banner .app-container {
    padding-top: 3.5rem;
  }

  .production-mode-banner {
    font-size: 0.72rem;
    padding: 0.5rem 0.65rem;
  }
}

/* NFT picker modal */
.nft-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

.nft-picker-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nft-picker-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
}

.nft-picker-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.nft-picker-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.nft-picker-subtitle {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.nft-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.nft-picker-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.nft-picker-option:hover {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.08);
}

.nft-picker-option-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.nft-picker-option-address,
.nft-picker-option-id,
.nft-picker-uri {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  word-break: break-all;
}

/* Desktop: fit register wizard without page scroll */
@media (min-width: 1024px) and (min-height: 720px) {
  .app-container {
    padding: 1rem 1.25rem 0.75rem;
  }

  #register-tab .tab-guide-slot {
    display: none;
  }

  #register-tab .keychain-wizard {
    padding: 1rem 1.15rem;
  }

  #register-tab .card.glass-panel {
    margin-bottom: 0;
  }

  .app-footer {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
  }
}

/* Full-width mint button only in comparator registry panel */
.xrpl-registry-panel .btn-register {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.85rem;
  border-radius: 12px;
}

