
  .theme-panel {
    --bg:              var(--theme-bg);
    --text:            var(--theme-fg);
    --text-muted:      var(--theme-secondary);
    --theme-quiet:     var(--theme-secondary);
    --border:          var(--theme-border);
    --panel-border:    var(--theme-border);

    --accent-green:    var(--theme-focus);
    --accent-green-bg: color-mix(in srgb, var(--theme-focus) 14%, transparent);
    --surface-hover:   color-mix(in srgb, var(--theme-fg) 10%, transparent);

    --code-plain:      var(--theme-fg);
    --code-punct:      var(--theme-fg);
    --code-property:   var(--theme-fg);
    --code-keyword:    var(--theme-keyword);
    --code-string:     var(--theme-string);
    --code-number:     var(--theme-number);
    --code-comment:    var(--theme-comment);
    --code-function:   var(--theme-title);
    --code-builtin:    var(--theme-builtin);
    --code-line:       var(--theme-quiet);

    --diff-del-bg:     var(--theme-diff-del);
    --diff-add-bg:     var(--theme-diff-add);
    --diff-del-panel:  var(--theme-diff-del);
    --diff-add-panel:  var(--theme-diff-add);
    --diff-del:        var(--theme-error);
    --diff-add:        var(--theme-success);
  }

  :root {
    --site-accent:      var(--accent-green);
    --site-accent-bg:   var(--accent-green-bg);
    --site-diff-del:    var(--diff-del);
    --site-diff-add:    var(--diff-add);
    --site-diff-del-bg: var(--diff-del-bg);
    --site-diff-add-bg: var(--diff-add-bg);
  }
  :root.dark {
    --site-diff-del-bg: var(--diff-del-panel);
    --site-diff-add-bg: var(--diff-add-panel);
  }
  :root:not(.dark) .theme-panel[data-cli-theme="default-light"],
  :root.dark .theme-panel[data-cli-theme="default"] {
    --theme-focus:     var(--site-accent);
    --theme-success:   var(--site-diff-add);
    --theme-error:     var(--site-diff-del);
    --theme-diff-add:  var(--site-diff-add-bg);
    --theme-diff-del:  var(--site-diff-del-bg);
    --accent-green-bg: var(--site-accent-bg);
  }
  body.theme-scene {
    background: transparent;
  }

  .theme-panel {
    border: 0;
    width: 85%;
    margin: 0 auto;
    padding: 1.6em 1.4em;
    color: var(--theme-fg);
    box-shadow: 0 8px 22px rgb(35 28 102 / 0.3), 0 2px 6px rgb(35 28 102 / 0.22);
  }
  :root.dark .theme-panel {
    box-shadow: 0 8px 22px rgb(56 39 51 / 0.55), 0 2px 6px rgb(56 39 51 / 0.4);
  }
  .theme-panel::after {
    content: none;
  }

  .theme-cols {
    display: grid;
    --theme-column-gap: clamp(12px, 3vw, 40px);
    --theme-list-offset: clamp(20px, 3vw, 40px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--theme-column-gap);
  }

  .theme-title {
    margin-bottom: 1.4em;
    color: var(--theme-fg);
    font-weight: 700;
    line-height: 1.75;
    transition: color 0.3s ease;
  }

  .theme-scroll {
    display: block;
    border: 0;
    padding: 0;
    background: none;
    color: var(--theme-secondary);
    font: inherit;
    font-size: 0.85em;
    line-height: 1.75;
    cursor: pointer;
    transition: color 0.3s ease;
  }
  .theme-scroll:hover {
    color: var(--theme-focus);
  }
  .theme-scroll:focus-visible {
    outline: 1.5px solid var(--theme-focus);
    outline-offset: 2px;
  }

  .theme-panel .theme-list {
    display: grid;
    width: calc(100% - var(--theme-list-offset));
    margin-left: var(--theme-list-offset);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--theme-column-gap);
    line-height: 1.75;
  }
  .theme-list-group {
    min-width: 0;
  }
  .theme-group-options {
    list-style: none;
  }
  .theme-group-title {
    margin-bottom: 0.35em;
    margin-left: calc(20px + 4ch);
    color: var(--theme-secondary);
    font-weight: 700;
    line-height: 1.75;
    transition: color 0.3s ease;
  }
  .theme-list:focus {
    outline: none;
  }

  .theme-panel .theme-item {
    white-space: nowrap;
    cursor: pointer;
    margin: 0.125em -0.45em;
    padding: 0 0.45em;
    line-height: 1.5;
  }
  .theme-panel .theme-item:not(.selected):hover {
    background: var(--surface-hover);
  }
  .theme-item .tool-opt-bullet {
    visibility: hidden;
    color: var(--accent-green);
  }
  .theme-item.selected .tool-opt-bullet {
    visibility: visible;
  }
  .theme-list:focus-visible .theme-item.selected {
    background: color-mix(in srgb, var(--theme-focus) 26%, transparent);
  }
  .theme-num {
    display: inline-block;
    min-width: 3ch;
    text-align: right;
    color: var(--theme-quiet);
  }

  .theme-hint {
    margin-top: 1.6em;
    color: var(--theme-secondary);
    line-height: 1.75;
    transition: color 0.3s ease;
  }

  .theme-preview {
    overflow: hidden;
    border: 1.5px solid var(--theme-border);
    border-radius: 6px;
    padding: 1.7em 1.1em;
    transition: border-color 0.3s ease;
  }
  .theme-preview .diff-gap {
    margin: 0.9em 0;
    background-color: transparent;
  }
  .theme-panel .theme-preview .diff-line {
    width: 100%;
  }

  @media (max-width: 34rem) {
    .theme-panel {
      width: 100%;
    }
    .theme-cols {
      grid-template-columns: minmax(0, 1fr);
    }
    .theme-preview-col {
      margin-top: 0.6em;
    }
  }
