﻿* {
      box-sizing: border-box;
    }
    html,
    body {
      margin: 0;
      min-height: 100%;
      background: #000;
      color: #e8e8ef;
      font-family: "JetBrains Mono", ui-monospace, monospace;
      font-size: 15px;
    }
    .cosmos {
      position: fixed;
      inset: 0;
      z-index: 0;
      background:
        radial-gradient(ellipse 120% 80% at 50% 100%, var(--cosmos-glow) 0%, transparent 55%),
        radial-gradient(ellipse 90% 55% at 8% 10%, var(--cosmos-glow-2) 0%, transparent 48%),
        radial-gradient(ellipse 70% 45% at 94% 18%, var(--cosmos-glow-3) 0%, transparent 42%),
        linear-gradient(180deg, #000 0%, #050508 55%, #000 100%);
    }
    .cosmos::before {
      content: "";
      position: absolute;
      inset: 0;
      opacity: 0.55;
      background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(1px 1px at 82% 30%, rgba(255, 255, 255, 0.15), transparent);
    }
    .shell {
      position: relative;
      z-index: 1;
      max-width: 38rem;
      margin: 0 auto;
      padding: 1.25rem 1rem 2.5rem;
    }
    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
      padding-bottom: 1rem;
      margin-bottom: 1rem;
      border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
    }
    .title-block h1 {
      margin: 0;
      font-size: 1rem;
      font-weight: 600;
      color: #9cdcfe;
      letter-spacing: 0.03em;
    }
    .title-block p {
      margin: 0.2rem 0 0;
      font-size: 0.68rem;
      color: rgba(156, 220, 254, 0.45);
      text-transform: uppercase;
      letter-spacing: 0.14em;
    }
    .nav-links {
      display: flex;
      gap: 0.45rem;
      flex-wrap: wrap;
    }
    .nav-links a {
      font-size: 0.72rem;
      font-weight: 500;
      color: var(--accent-soft);
      text-decoration: none;
      padding: 0.35rem 0.65rem;
      border-radius: 0.35rem;
      border: 1px solid rgba(var(--accent-rgb), 0.28);
      background: rgba(6, 8, 14, 0.55);
    }
    .nav-links a:hover {
      border-color: rgba(var(--accent-rgb), 0.5);
      color: #c8e4ff;
    }
    .tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-bottom: 1.1rem;
    }
    .tabs button {
      font: inherit;
      font-size: 0.72rem;
      font-weight: 500;
      padding: 0.4rem 0.7rem;
      border-radius: 0.35rem;
      border: 1px solid rgba(var(--accent-rgb), 0.22);
      background: rgba(8, 10, 16, 0.5);
      color: rgba(210, 218, 235, 0.75);
      cursor: pointer;
    }
    .tabs button:hover {
      border-color: rgba(var(--accent-rgb), 0.4);
      color: #e8ecf5;
    }
    .tabs button.is-active {
      border-color: var(--accent);
      background: rgba(var(--accent-rgb), 0.15);
      color: #f0f4ff;
    }
    .panel {
      border: 1px solid rgba(var(--accent-rgb), 0.22);
      border-radius: 0.5rem;
      padding: 1.1rem 1.15rem;
      background: rgba(6, 8, 14, 0.65);
    }
    .panel h2 {
      margin: 0 0 0.85rem;
      font-size: 0.78rem;
      font-weight: 600;
      color: #c8d6e8;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .field {
      margin-bottom: 1rem;
    }
    .field:last-child {
      margin-bottom: 0;
    }
    .field label {
      display: block;
      font-size: 0.68rem;
      font-weight: 500;
      color: rgba(156, 220, 254, 0.55);
      margin-bottom: 0.35rem;
      letter-spacing: 0.04em;
    }
    .field .hint {
      margin: 0.35rem 0 0;
      font-size: 0.62rem;
      color: rgba(156, 220, 254, 0.38);
      line-height: 1.45;
    }
    .custom-bg-label {
      margin-bottom: 0.45rem;
    }
    .custom-bg-field .custom-bg-box {
      margin: 0;
    }
    .custom-bg-box {
      padding: 0.75rem 0.8rem 0.85rem;
      border-radius: 0.45rem;
      border: 1px solid rgba(var(--accent-rgb), 0.22);
      background:
        linear-gradient(145deg, rgba(var(--accent-rgb), 0.1) 0%, transparent 42%),
        rgba(0, 0, 0, 0.42);
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 18px rgba(0, 0, 0, 0.45);
    }
    .custom-bg-box-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.35rem 0.5rem;
      margin-bottom: 0.5rem;
    }
    .custom-bg-pill {
      display: inline-block;
      font-size: 0.6rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(200, 220, 255, 0.7);
      padding: 0.2rem 0.45rem;
      border-radius: 999px;
      border: 1px solid rgba(var(--accent-rgb), 0.35);
      background: rgba(var(--accent-rgb), 0.12);
    }
    .custom-bg-note {
      font-size: 0.58rem;
      color: rgba(156, 220, 254, 0.4);
    }
    .custom-bg-input-wrap {
      position: relative;
    }
    .custom-bg-input {
      width: 100%;
      font: inherit;
      font-size: 0.75rem;
      padding: 0.55rem 0.6rem 0.55rem 0.7rem;
      border-radius: 0.3rem;
      border: 1px solid rgba(var(--accent-rgb), 0.3);
      border-left: 3px solid var(--accent);
      background: rgba(0, 0, 0, 0.5);
      color: #e4eaf5;
      outline: none;
      font-variant-ligatures: none;
    }
    .custom-bg-input::placeholder {
      color: rgba(156, 220, 254, 0.28);
    }
    .custom-bg-input:focus {
      border-color: rgba(var(--accent-rgb), 0.6);
      border-left-color: var(--accent);
      box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.15);
    }
    .custom-bg-hint {
      margin: 0.5rem 0 0;
      max-width: 32rem;
    }
    .custom-bg-hint strong {
      color: rgba(200, 215, 245, 0.65);
      font-weight: 600;
    }
    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="url"],
    select,
    textarea {
      width: 100%;
      font: inherit;
      font-size: 0.8rem;
      padding: 0.55rem 0.65rem;
      border-radius: 0.35rem;
      border: 1px solid rgba(var(--accent-rgb), 0.3);
      background: rgba(0, 0, 0, 0.35);
      color: #dce4f0;
      outline: none;
    }
    input:focus,
    select:focus,
    textarea:focus {
      border-color: rgba(var(--accent-rgb), 0.55);
      box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12);
    }
    textarea {
      min-height: 6.5rem;
      resize: vertical;
    }
    .row-check {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      font-size: 0.78rem;
      color: rgba(210, 220, 235, 0.88);
      cursor: pointer;
    }
    .row-check input {
      width: auto;
      accent-color: var(--accent);
    }
    .palette-row {
      display: grid;
      grid-template-columns: auto 1fr;
      align-items: center;
      gap: 0.4rem 0.75rem;
    }
    .palette-row label {
      margin: 0;
    }
    .palette-row input[type="color"] {
      width: 100%;
      min-height: 2.15rem;
      padding: 0.2rem;
      cursor: pointer;
    }
    .theme-grid {
      display: grid;
      gap: 0.55rem;
      grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
    }
    .theme-grid button {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.45rem;
      padding: 0.55rem;
      border-radius: 0.4rem;
      border: 1px solid rgba(var(--accent-rgb), 0.25);
      background: rgba(0, 0, 0, 0.3);
      cursor: pointer;
      font: inherit;
      color: inherit;
    }
    .theme-grid button.is-active {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2);
    }
    .theme-grid button:disabled {
      opacity: 0.38;
      cursor: not-allowed;
      filter: grayscale(0.4);
    }
    #theme-pick-disabled-hint {
      margin: 0 0 0.75rem;
    }
    .swatch {
      height: 2rem;
      border-radius: 0.25rem;
    }
    .swatch.galaxy {
      background: linear-gradient(135deg, #3178c6, #6b4fa8);
    }
    .swatch.void {
      background: linear-gradient(135deg, #4a5068, #2a2d3a);
    }
    .swatch.aurora {
      background: linear-gradient(135deg, #2eb8a8, #2a6b8f);
    }
    .swatch.classic {
      background:
        radial-gradient(1px 1px at 22% 35%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(1px 1px at 58% 22%, rgba(220, 230, 255, 0.7), transparent),
        radial-gradient(1px 1px at 78% 62%, rgba(255, 255, 255, 0.65), transparent),
        radial-gradient(1px 1px at 40% 72%, rgba(255, 255, 255, 0.55), transparent),
        linear-gradient(180deg, #000000 0%, #08080a 55%, #000000 100%);
    }
    .swatch.sunset {
      background: linear-gradient(135deg, #ff7a59, #ffb36a 45%, #d052c2 100%);
    }
    .swatch.vanta-net {
      background:
        linear-gradient(180deg, #050914 0%, #081427 100%),
        repeating-linear-gradient(
          60deg,
          rgba(84, 255, 229, 0.36) 0 2px,
          rgba(84, 255, 229, 0) 2px 20px
        );
      box-shadow: inset 0 0 0 1px rgba(84, 255, 229, 0.22);
    }
    .swatch.neon {
      background: conic-gradient(from 200deg, #ff00c8, #00f5e8, #b94dff, #ff36a8, #ff00c8);
      box-shadow:
        inset 0 0 0 1px rgba(0, 245, 232, 0.35),
        0 0 10px rgba(255, 0, 200, 0.22);
    }
    .theme-grid span {
      font-size: 0.65rem;
      font-weight: 500;
      color: rgba(200, 210, 230, 0.85);
    }
    .about-copy {
      font-size: 0.78rem;
      line-height: 1.55;
      color: rgba(210, 220, 235, 0.82);
      margin: 0 0 0.85rem;
    }
    .about-copy:last-child {
      margin-bottom: 0;
    }
    #settings-status {
      min-height: 1.1rem;
      margin-top: 0.85rem;
      font-size: 0.68rem;
      color: var(--accent-soft);
    }
