.code-editor-shell {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  background: #151515;
}

.code-editor-gutter {
  position: relative;
  overflow: hidden;
  padding: 3px 0;
  border-right: 1px solid #252a32;
  background: #101217;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.code-editor-line-numbers,
.code-editor-highlight,
.code-selection-overlay,
#codeInput {
  margin: 0;
  font-family: Consolas, Monaco, monospace;
  font-size: var(--code-font-size, 15px);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  tab-size: 2;
  font-kerning: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.code-editor-line-numbers {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  color: #5f6c7d;
  transform: translateY(3px);
  cursor: pointer;
  text-align: right;
  touch-action: manipulation;
  white-space: pre;
  will-change: transform;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.code-wrap-spacer,
.code-wrap-line,
.code-wrap-gutter-line {
  display: block;
}

.code-wrap-line,
.code-wrap-gutter-line {
  height: auto;
  min-height: var(--code-line-height-px, 1.5em);
  line-height: var(--code-line-height-px, 1.5em);
}

.code-line-number-row {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0 8px 0 0;
}

.code-line-number-row.is-selected,
.code-wrap-gutter-line.is-selected {
  background: #2d7c46;
  color: #eff9f2;
}

.code-wrap-gutter-line.is-selected.is-wrap-continuation {
  background: #2d7c46;
  color: transparent;
}

.code-wrap-gutter-line {
  width: 100%;
  text-align: right;
  box-sizing: border-box;
  padding: 0 8px 0 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.code-editor-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #151515;
}

.code-scrollbar-guard {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  background: transparent;
  cursor: default;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.code-editor-main.is-scrollbar-guard-active .code-scrollbar-guard {
  display: block;
}

html.is-code-scrollbar-lock,
html.is-code-scrollbar-lock body,
html.is-code-scrollbar-lock .code-editor-main,
html.is-code-scrollbar-lock .code-editor-main * {
  user-select: none !important;
  -moz-user-select: none !important;
  -webkit-user-select: none !important;
}

.code-wrap-viewport {
  position: absolute;
  inset: 0;
  display: block;
  overflow: auto;
  background: #151515;
  color-scheme: dark;
  cursor: text;
  pointer-events: auto;
  scrollbar-color: #4a5565 #151515;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.code-wrap-viewport::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.code-wrap-viewport::-webkit-scrollbar-track {
  background: #151515;
}

.code-wrap-viewport::-webkit-scrollbar-thumb {
  background: #3a4350;
  border: 3px solid #151515;
  border-radius: 999px;
}

.code-wrap-viewport::-webkit-scrollbar-thumb:hover {
  background: #4a5565;
}

.code-wrap-viewport::-webkit-scrollbar-corner {
  background: #151515;
}

.code-wrap-surface {
  position: relative;
  min-height: 100%;
  cursor: text;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.code-editor-highlight,
.code-selection-overlay,
.code-caret-overlay,
#codeInput {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  white-space: pre;
}

.code-editor-highlight,
.code-selection-overlay,
.code-caret-overlay {
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.code-caret-overlay {
  z-index: 3;
}

.code-caret-overlay.is-hidden,
.code-selection-overlay.is-hidden {
  display: none;
}

.is-code-wrap-enabled .code-editor-shell,
.is-code-view-code.is-code-wrap-enabled .code-editor-shell,
.is-code-view-lite .code-editor-shell {
  grid-template-columns: 45px minmax(0, 1fr);
}

.is-code-view-lite .code-editor-gutter,
.is-code-wrap-enabled .code-editor-gutter,
.is-code-view-code.is-code-wrap-enabled .code-editor-gutter {
  display: block;
}

.is-code-view-lite .code-editor-highlight,
.is-code-view-code.is-code-wrap-enabled .code-editor-highlight {
  display: block;
}

.is-code-wrap-enabled .code-editor-highlight,
.is-code-wrap-enabled .code-selection-overlay,
.is-code-wrap-enabled .code-caret-overlay,
.is-code-view-code.is-code-wrap-enabled .code-editor-highlight,
.is-code-view-code.is-code-wrap-enabled .code-selection-overlay,
.is-code-view-code.is-code-wrap-enabled .code-caret-overlay,
.is-code-view-lite.is-code-wrap-enabled .code-editor-highlight,
.is-code-view-lite.is-code-wrap-enabled .code-selection-overlay,
.is-code-view-lite.is-code-wrap-enabled .code-caret-overlay {
  padding: 0;
}

.is-code-wrap-enabled .code-wrap-viewport,
.is-code-view-code.is-code-wrap-enabled .code-wrap-viewport,
.is-code-view-lite.is-code-wrap-enabled .code-wrap-viewport {
  overflow-x: hidden;
}

html.app-booting.ui-lite-mode #appRoot .code-editor-shell,
html.app-booting.ui-wrap-enabled #appRoot .code-editor-shell,
html.app-booting.ui-code-mode.ui-wrap-enabled #appRoot .code-editor-shell {
  grid-template-columns: 45px minmax(0, 1fr);
}

html.app-booting.ui-lite-mode #appRoot .code-editor-gutter,
html.app-booting.ui-wrap-enabled #appRoot .code-editor-gutter,
html.app-booting.ui-code-mode.ui-wrap-enabled #appRoot .code-editor-gutter,
html.app-booting.ui-lite-mode #appRoot .code-editor-highlight,
html.app-booting.ui-code-mode.ui-wrap-enabled #appRoot .code-editor-highlight {
  display: block;
}

html.app-booting.ui-wrap-enabled #appRoot .code-wrap-viewport {
  display: block;
  overflow-x: hidden;
}

html.app-booting.ui-wrap-enabled #appRoot .code-editor-highlight,
html.app-booting.ui-wrap-enabled #appRoot .code-selection-overlay,
html.app-booting.ui-wrap-enabled #appRoot .code-caret-overlay {
  padding: 0;
}

html.app-booting.ui-lite-mode #appRoot #codeInput {
  color: #d6deea;
  caret-color: #eef4ff;
  -webkit-text-fill-color: #d6deea;
}

html.app-booting.ui-expert #appRoot #beginnerPanel,
html.app-booting.ui-expert #appRoot #historySummary.is-hidden,
html.app-booting.ui-history-enabled #appRoot #historySummary,
html.app-booting.ui-history-disabled #appRoot #historyTable,
html.app-booting.ui-history-disabled #appRoot #undoHistoryBtn {
  display: none !important;
}

html.app-booting.ui-expert #appRoot #expertPanel {
  display: grid !important;
}

html.app-booting.ui-history-enabled #appRoot #historyTable {
  display: block !important;
}

html.app-booting.ui-history-enabled #appRoot #undoHistoryBtn {
  display: inline-flex !important;
}

html.app-booting.ui-code-mode #appRoot #codeSyntaxToggleBtn,
html.app-booting.ui-wrap-enabled #appRoot #toggleCodeWrapBtn,
html.app-booting.ui-history-enabled #appRoot #historyToggleBtn {
  background: #245fbd;
}

html.app-booting.ui-lite-mode #appRoot #codeSyntaxToggleBtn,
html.app-booting.ui-wrap-disabled #appRoot #toggleCodeWrapBtn,
html.app-booting.ui-history-disabled #appRoot #historyToggleBtn {
  background: #4a4f57;
}

html.app-booting.ui-code-mode #appRoot #codeSyntaxToggleBtn + .toggle-handle,
html.app-booting.ui-wrap-enabled #appRoot #toggleCodeWrapBtn + .toggle-handle,
html.app-booting.ui-history-enabled #appRoot #historyToggleBtn + .toggle-handle {
  left: 16px;
}

html.app-booting.ui-lite-mode #appRoot #codeSyntaxToggleBtn + .toggle-handle,
html.app-booting.ui-wrap-disabled #appRoot #toggleCodeWrapBtn + .toggle-handle,
html.app-booting.ui-history-disabled #appRoot #historyToggleBtn + .toggle-handle {
  left: 2px;
}

html.app-booting.ui-preview-expanded #appRoot #togglePreviewPanelBtn,
html.app-booting.ui-history-expanded #appRoot #toggleHistorySidebarBtn {
  background: #223348;
}

html.app-booting.ui-preview-collapsed #appRoot #togglePreviewPanelBtn,
html.app-booting.ui-history-collapsed #appRoot #toggleHistorySidebarBtn {
  background: #223348;
}

html.app-booting.ui-preview-expanded #appRoot #togglePreviewPanelBtn .panel-toggle-state,
html.app-booting.ui-history-expanded #appRoot #toggleHistorySidebarBtn .panel-toggle-state {
  color: #d8e6ff;
}

html.app-booting.ui-preview-collapsed #appRoot #togglePreviewPanelBtn .panel-toggle-state,
html.app-booting.ui-history-collapsed #appRoot #toggleHistorySidebarBtn .panel-toggle-state {
  color: #8d97a8;
}

html.app-booting.ui-preview-expanded #appRoot #togglePreviewPanelBtn .panel-toggle-track,
html.app-booting.ui-history-expanded #appRoot #toggleHistorySidebarBtn .panel-toggle-track {
  background: #245fbd;
}

html.app-booting.ui-preview-collapsed #appRoot #togglePreviewPanelBtn .panel-toggle-track,
html.app-booting.ui-history-collapsed #appRoot #toggleHistorySidebarBtn .panel-toggle-track {
  background: #4a4f57;
}

html.app-booting.ui-preview-expanded #appRoot #togglePreviewPanelBtn .toggle-handle,
html.app-booting.ui-history-expanded #appRoot #toggleHistorySidebarBtn .toggle-handle {
  left: 16px;
}

html.app-booting.ui-preview-collapsed #appRoot #togglePreviewPanelBtn .toggle-handle,
html.app-booting.ui-history-collapsed #appRoot #toggleHistorySidebarBtn .toggle-handle {
  left: 2px;
}

.code-option-switch {
  margin-right: 2px;
}

.code-wrap-line,
.code-wrap-gutter-line {
  position: absolute;
  display: block;
  white-space: pre;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.code-editor-main,
.code-wrap-viewport,
.code-wrap-surface,
.code-editor-highlight,
.code-highlight-content,
.code-highlight-chunk,
.code-highlight-spacer,
.code-wrap-line,
.code-editor-line-numbers,
.code-wrap-gutter-line {
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

.code-editor-main::selection,
.code-wrap-viewport::selection,
.code-wrap-surface::selection,
.code-editor-highlight::selection,
.code-highlight-content::selection,
.code-highlight-chunk::selection,
.code-highlight-spacer::selection,
.code-wrap-line::selection,
.code-editor-line-numbers::selection,
.code-wrap-gutter-line::selection,
.code-editor-main *::selection,
.code-wrap-viewport *::selection,
.code-wrap-surface *::selection,
.code-editor-highlight *::selection,
.code-highlight-content *::selection,
.code-highlight-chunk *::selection,
.code-highlight-spacer *::selection,
.code-wrap-line *::selection,
.code-editor-line-numbers *::selection,
.code-wrap-gutter-line *::selection {
  background: transparent;
  color: inherit;
}

.code-editor-main::-moz-selection,
.code-wrap-viewport::-moz-selection,
.code-wrap-surface::-moz-selection,
.code-editor-highlight::-moz-selection,
.code-highlight-content::-moz-selection,
.code-highlight-chunk::-moz-selection,
.code-highlight-spacer::-moz-selection,
.code-wrap-line::-moz-selection,
.code-editor-line-numbers::-moz-selection,
.code-wrap-gutter-line::-moz-selection,
.code-editor-main *::-moz-selection,
.code-wrap-viewport *::-moz-selection,
.code-wrap-surface *::-moz-selection,
.code-editor-highlight *::-moz-selection,
.code-highlight-content *::-moz-selection,
.code-highlight-chunk *::-moz-selection,
.code-highlight-spacer *::-moz-selection,
.code-wrap-line *::-moz-selection,
.code-editor-line-numbers *::-moz-selection,
.code-wrap-gutter-line *::-moz-selection {
  background: transparent;
  color: inherit;
}

.code-wrap-line {
  left: 2px;
  right: 50px;
  min-height: var(--code-line-height-px, 1.5em);
  line-height: var(--code-line-height-px, 1.5em);
  cursor: text;
}

.code-wrap-gutter-line {
  left: 0;
  right: 0;
  padding: 0 8px 0 0;
  min-height: var(--code-line-height-px, 1.5em);
  line-height: var(--code-line-height-px, 1.5em);
}

.code-selection-block,
.code-caret-block {
  position: absolute;
  display: block;
  pointer-events: none;
}

.code-selection-block {
  min-width: 2px;
  background: rgba(88, 143, 230, 0.26);
}

.code-selection-block.is-linked {
  background: rgba(53, 194, 172, 0.24);
}

.code-caret-block {
  width: 2px;
  background: #eef4ff;
  animation: code-caret-blink 1s step-end infinite;
}

@keyframes code-caret-blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.regex-mode-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: 4px;
  flex-shrink: 0;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.regex-mode-switch-track {
  display: block;
  flex: 0 0 30px;
  width: 30px;
  height: 16px;
  margin-right: 8px;
  border-radius: 999px;
  background: #4a4f57;
  transition: background-color 0.2s ease;
}

.regex-mode-switch.is-on .regex-mode-switch-track {
  background: #245fbd;
}

.regex-mode-switch .toggle-handle {
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
}

.regex-mode-switch.is-on .toggle-handle {
  left: 16px;
}

.regex-mode-switch:focus-visible {
  outline: none;
}

.regex-mode-switch:focus-visible .regex-mode-switch-track {
  box-shadow: 0 0 0 2px rgba(143, 188, 255, 0.32);
}

.regex-mode-switch-label {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #d7deea;
  line-height: 1.2;
  white-space: nowrap;
}

.expert-grid .input-row.compact .regex-mode-switch {
  align-self: center;
  justify-self: start;
  width: auto;
  max-width: max-content;
}

.regex-match-case-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: #d7deea;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.regex-match-case-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #245fbd;
}

@media (max-width: 1050px) {
  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-mode-switch,
  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-match-case-toggle {
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #303846;
    border-radius: 11px;
    background: #202733;
  }

  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-mode-switch {
    margin-left: 0;
  }

  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-mode-switch-track {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 22px;
    margin-right: 8px;
  }

  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-mode-switch .toggle-handle {
    left: 13px;
    width: 16px;
    height: 16px;
  }

  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-mode-switch.is-on .toggle-handle {
    left: 31px;
  }

  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-match-case-toggle {
    justify-content: flex-start;
  }

  .app.is-tools-panel-open .cleanup-tools:not(.is-hidden) .regex-match-case-toggle input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }
}

.expert-grid .input-row.compact .text-input.is-disabled {
  color: #7f8998;
  background: #171c24;
}

.panel-toggle-control {
  gap: 10px;
  height: 42px;
  padding: 6px 12px;
  border-radius: 0;
  background: transparent;
  position: relative;
}

.panel-toggle-copy {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  line-height: 1.2;
}

.panel-toggle-state {
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: #8d97a8;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: right;
}

.panel-toggle-control.is-on .panel-toggle-state {
  color: #d8e6ff;
}

.topbar-actions .panel-toggle-control:hover,
.topbar-actions .panel-toggle-control:focus-visible {
  background: #223348;
}

.topbar-actions #togglePreviewPanelBtn::before,
.topbar-actions .panel-toggle-control + .panel-toggle-control::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: #2f3b4c;
}

.panel-toggle-switch {
  position: relative;
  min-height: 16px;
  width: 30px;
  margin-right: 0;
  pointer-events: none;
}

.panel-toggle-switch .panel-toggle-track {
  display: block;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #4a4f57;
  transition: background-color 0.2s ease;
}

.panel-toggle-control.is-on .panel-toggle-switch .panel-toggle-track {
  background: #245fbd;
}

.panel-toggle-control.is-on .panel-toggle-switch .toggle-handle {
  left: 16px;
}

.code-font-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

button.icon-only {
  min-width: 34px;
  width: 34px;
  min-height: 32px;
  padding: 0;
}

.code-font-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.toggle-switch input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 30px;
  height: 16px;
  display: inline-flex;
  margin: 0 8px 0 0;
  border: 0;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: #4a4f57;
  transition: background-color 0.2s ease;
}

.toggle-switch .toggle-handle {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%);
  transition: left 0.2s ease;
  pointer-events: none;
}

.toggle-switch input:checked {
  background: #245fbd;
}

.toggle-switch input:checked + .toggle-handle {
  left: 16px;
}

.toggle-switch input:focus-visible {
  box-shadow: 0 0 0 2px rgba(143, 188, 255, 0.32);
}

.toggle-switch label {
  cursor: pointer;
  color: #d7deea;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.history-toggle-switch {
  margin-left: auto;
  padding-right: 6px;
}

.history-toggle-switch input {
  margin-right: 0;
}

.code-editor-highlight {
  z-index: 1;
  border: 0;
  background: #151515;
  color: #d6deea;
  pointer-events: none;
  overflow: hidden;
}

.code-highlight-spacer,
.code-highlight-chunk,
.code-highlight-content {
  display: block;
}

.code-highlight-spacer {
  pointer-events: none;
}

#codeSelectionOverlay,
.code-selection-overlay {
  z-index: 2;
  border: 0;
  background: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

#codeSelectionOverlay.is-hidden {
  display: none;
}

#codeInput {
  z-index: 3;
  top: 0;
  left: 0;
  inset: auto;
  width: 1px;
  height: 1px;
  padding: 3px 50px 3px 2px;
  margin: 0;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  overflow: hidden;
  caret-color: #eef4ff;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  pointer-events: none;
}

#codeInput::selection {
  background: rgba(88, 143, 230, 0.26);
}

@media (max-width: 1050px) {
  .code-editor-line-numbers,
  .code-editor-highlight,
  #codeInput {
    font-size: var(--code-font-size, 16px) !important;
  }

  #codeInput {
    padding-bottom: 96px !important;
  }

}

@media (pointer: coarse) {
  #codeInput {
    top: 0;
    left: 0;
    inset: auto;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    color: rgba(238, 244, 255, 0.001);
    -webkit-text-fill-color: rgba(238, 244, 255, 0.001);
    caret-color: transparent;
    pointer-events: none;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    -webkit-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: transparent;
  }

  #codeInput::selection {
    background: transparent;
    color: transparent;
  }
}

#codeInput.is-linked-selection::selection {
  background: transparent;
}

.is-code-wrap-enabled .code-editor-line-numbers,
.is-code-view-code.is-code-wrap-enabled .code-editor-line-numbers {
  white-space: normal;
}

.is-code-view-lite #codeInput {
  color: transparent;
  caret-color: #eef4ff;
  -webkit-text-fill-color: transparent;
}

.is-code-view-code.is-code-wrap-enabled .code-editor-highlight {
  display: block;
}

.is-code-view-code:not(.is-code-wrap-enabled) .code-editor-highlight,
.is-code-view-code:not(.is-code-wrap-enabled) .code-selection-overlay {
  overflow: hidden;
}

.code-token-doctype,
.code-token-tag-bracket {
  color: #8fbcff;
}

.code-token-tag-name {
  color: #7ed0ff;
}

.code-token-tag-match {
  color: #29e2da;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.code-token-tag-match .code-token-tag-bracket,
.code-token-tag-match .code-token-tag-name,
.code-token-tag-match .code-token-attr-name,
.code-token-tag-match .code-token-attr-equals,
.code-token-tag-match .code-token-attr-value {
  color: inherit;
}

.code-token-tag-broken {
  color: #ff7c7c;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.code-token-tag-broken .code-token-tag-bracket,
.code-token-tag-broken .code-token-tag-name,
.code-token-tag-broken .code-token-attr-name,
.code-token-tag-broken .code-token-attr-equals,
.code-token-tag-broken .code-token-attr-value {
  color: inherit;
}

.code-token-attr-name {
  color: #ffd479;
}

.code-token-attr-equals {
  color: #7b8796;
}

.code-token-attr-value {
  color: #9de58f;
}

.code-token-comment {
  color: #6f7b8a;
}

.code-token-text {
  color: #d6deea;
}

.code-token-css-selector {
  color: #8fbcff;
}

.code-token-css-selector .code-token-text,
.code-token-css-selector .code-token-css-punctuation,
.code-token-css-selector .code-token-css-value {
  color: inherit;
}

.code-token-css-property {
  color: #ffd479;
}

.code-token-css-value {
  color: #9de58f;
}

.code-token-css-atrule {
  color: #e0a8ff;
}

.code-token-css-punctuation {
  color: #7b8796;
}

.code-token-json-key {
  color: #ffd479;
}

.code-token-json-string {
  color: #9de58f;
}

.code-token-json-number {
  color: #7ed0ff;
}

.code-token-json-boolean {
  color: #e0a8ff;
}

.code-token-json-null {
  color: #f29c9c;
}

.code-token-json-punctuation {
  color: #7b8796;
}

.code-token-xml-cdata {
  color: #8fbcff;
}

.code-token-xml-entity {
  color: #e0a8ff;
}

.code-token-go-keyword {
  color: #8fbcff;
}

.code-token-go-type {
  color: #7ed0ff;
}

.code-token-go-builtin {
  color: #e0a8ff;
}

.code-token-go-constant {
  color: #f29c9c;
}

.code-token-go-string {
  color: #9de58f;
}

.code-token-go-rune {
  color: #ffc36b;
}

.code-token-go-number {
  color: #7ed0ff;
}

.code-token-go-operator {
  color: #7b8796;
}

.code-token-php-tag {
  color: #8fbcff;
}

.code-token-php-keyword {
  color: #8fbcff;
}

.code-token-php-type {
  color: #7ed0ff;
}

.code-token-php-constant {
  color: #f29c9c;
}

.code-token-php-string {
  color: #9de58f;
}

.code-token-php-variable {
  color: #ffc36b;
}

.code-token-php-number {
  color: #7ed0ff;
}

.code-token-php-operator {
  color: #7b8796;
}

.code-token-python-keyword {
  color: #8fbcff;
}

.code-token-python-builtin {
  color: #e0a8ff;
}

.code-token-python-self {
  color: #ffc36b;
}

.code-token-python-string {
  color: #9de58f;
}

.code-token-python-decorator {
  color: #ffd479;
}

.code-token-python-number {
  color: #7ed0ff;
}

.code-token-python-operator {
  color: #7b8796;
}

.code-token-selection {
  display: inline;
  background: rgba(88, 143, 230, 0.28);
  color: transparent;
  line-height: inherit;
  vertical-align: baseline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: 0;
}

#previewFrame {
  flex: 1;
  width: 100%;
  border: 0;
  outline: none;
  box-shadow: none;
  background: #151515;
  color-scheme: dark;
}

#previewFrame:focus,
#previewFrame:focus-visible,
#previewFrame:-moz-focusring {
  outline: none;
  box-shadow: none;
}

html.app-booting #previewFrame {
  visibility: hidden;
}

.toggle-row {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #aaa;
  font-size: 12px;
}

details.advanced {
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  background: #191919;
  overflow: hidden;
}

details.advanced summary {
  cursor: pointer;
  padding: 12px;
  color: #ddd;
  font-size: 13px;
  font-weight: bold;
}

.advanced-body {
  display: grid;
  gap: 9px;
  padding: 0 12px 12px;
}

.template-select-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.regex-template-picker label {
  color: #d3e4ff;
  font-size: 12px;
  font-weight: 700;
}

.regex-template-picker #expertTemplateSelect {
  border-color: #33475f;
  background: #101721;
  color: #d7e4f6;
}

.regex-template-picker #expertTemplateSelect:focus {
  border-color: #5e8dca;
  box-shadow: 0 0 0 2px rgba(94, 141, 202, 0.18);
}

#expertTemplateSelect:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.regex-search-results {
  margin-top: 10px;
  border: 1px solid #27303b;
  border-radius: 10px;
  background: #11161d;
  overflow: hidden;
}

.regex-search-results.is-hidden {
  display: none;
}

.regex-search-results-list {
  max-height: 184px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.regex-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #202833;
  background: transparent;
  color: #d8e2f0;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}

.regex-search-result:last-child {
  border-bottom: 0;
}

.regex-search-result:hover,
.regex-search-result:focus-visible {
  background: #18212d;
}

.regex-search-result.is-active {
  background: #1c2a3b;
}

.regex-search-result-line {
  color: #7f96b3;
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.regex-search-result-snippet {
  min-width: 0;
  color: #d8e2f0;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.regex-search-result-snippet mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #355d24;
  color: #f3f8ef;
}

.template-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #26384f;
  color: #bcd7ff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.2;
  white-space: nowrap;
}

.history-summary {
  padding: 10px 12px;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  background: #191919;
}

.history-table {
  display: block;
  min-height: 0;
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  overflow: scroll;
  background: #171717;
}

.history-list {
  display: grid;
  gap: 0;
  min-height: 0;
  align-content: start;
  overflow: hidden;
}

.history-empty {
  padding: 14px;
  color: #8f8f8f;
  font-size: 12px;
  line-height: 1.5;
}

.history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0;
  border-top: 1px solid #2a2a2a;
  background: #191919;
  position: relative;
}

.history-entry.is-latest {
  background: #1a2230;
}

.history-entry:first-child {
  border-top: 0;
}

.history-entry-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px 12px;
}

.history-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.history-entry-time {
  color: #8fa3bd;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.history-entry-label {
  color: #e4e8ee;
  font-size: 11px;
  line-height: 1.4;
}

.history-entry-preview {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #9ea4ae;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.history-entry-preview-line {
  display: block;
}

.history-entry-preview-kind {
  display: inline-block;
  width: 14px;
  color: #76879b;
}

.history-entry-preview-mark {
  padding: 0 2px;
  border-radius: 4px;
}

.history-entry-preview-mark.is-before {
  background: #5b2a2a;
  color: #ffd5d5;
}

.history-entry-preview-mark.is-after {
  background: #264632;
  color: #d6ffe3;
}

.history-entry-actions {
  padding: 9px 12px;
  position: absolute;
  top: 0;
  right: 0;
}

.editor-context-menu {
  width: 280px;
  position: fixed;
  z-index: 120;
  display: grid;
  border: 1px solid #2c3440;
  border-radius: 10px;
  background: #151a21;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.editor-context-menu.is-hidden {
  display: none;
}

.editor-context-menu-actions,
.editor-context-menu-section,
.editor-context-menu-template-list,
.editor-context-menu-form {
  display: grid;
  gap: 0;
}

.editor-context-menu-section {
  border-top: 1px solid #242a33;
}

.editor-context-menu-section-header,
.editor-context-menu-form-actions,
.editor-context-menu-template-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.editor-context-menu-section-header {
  justify-content: space-between;
}

.editor-context-menu-item,
.editor-context-menu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dfe7f2;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  box-shadow: none;
}

.editor-context-menu-item {
  width: 100%;
  padding: 7px 10px;
  border-top: 1px solid #20262f;
}

.editor-context-menu-item:hover,
.editor-context-menu-item:focus-visible,
.editor-context-menu-link:hover,
.editor-context-menu-link:focus-visible {
  background: #1d2430;
}

.editor-context-menu-item.is-template {
  min-width: 0;
  flex: 1 1 auto;
  border-top: 0;
}

.editor-context-menu-item.is-danger,
.editor-context-menu-link.is-danger {
  color: #ffbcbc;
}

.editor-context-menu-item.is-icon {
  width: 30px;
  min-width: 30px;
  padding: 7px 0;
  flex: 0 0 30px;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  border: none;
}

.editor-context-menu-item.is-disabled {
  opacity: 0.45;
}

.cpbts {
  justify-content: center;
  text-align: center;
}

.editor-context-menu-item:disabled,
.editor-context-menu-link:disabled {
  cursor: default;
  opacity: 0.45;
}

.editor-context-menu-link {
  width: 100%;
  padding: 5px 7px;
  color: #8fb5ff;
  font-size: 13px;
}

.editor-context-menu-link i {
  font-size: 15px;
  margin: 0 3px 0 0;
}

#addQuickTemplateBtn .ui-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.editor-context-menu-link.is-muted {
  color: #8fa1b9;
}

.editor-context-menu-input,
.editor-context-menu-textarea {
  width: 100%;
  border: 1px solid #2d3745;
  border-radius: 6px;
  background: #12161c;
  color: #e4ebf5;
  font-size: 12px;
  line-height: 1.4;
}

.editor-context-menu-input {
  height: 30px;
  padding: 6px 8px;
}

.editor-context-menu-textarea {
  min-height: 78px;
  padding: 7px 8px;
  resize: vertical;
}

.editor-context-menu-input:focus,
.editor-context-menu-textarea:focus {
  border-color: #4d79b7;
}

.editor-context-menu-empty {
  padding: 8px 10px 2px;
  color: #8fa1b9;
  font-size: 12px;
  line-height: 1.45;
}

.editor-context-menu-actions .editor-context-menu-item:first-child {
  border-top: 0;
}

.editor-context-menu-form {
  gap: 6px;
  padding: 8px 10px 0;
}

.editor-context-menu-form-actions {
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.editor-context-menu-template-row {
  border-top: 1px solid #20262f;
}

@supports not (gap: 8px) {
  .toggle-row > * + * {
    margin-left: 7px;
  }

  .history-entry-meta > * + * {
    margin-left: 8px;
  }
}

html[dir="rtl"] .code-editor-shell,
html[dir="rtl"] .code-editor-main,
html[dir="rtl"] .code-editor-highlight,
html[dir="rtl"] .code-selection-overlay,
html[dir="rtl"] #codeInput {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .code-editor-line-numbers,
html[dir="rtl"] .code-line-number-row,
html[dir="rtl"] .code-wrap-gutter-line {
  direction: ltr;
  text-align: right;
}

html[dir="rtl"] .code-option-switch {
  margin-right: 0;
  margin-left: 2px;
}

html[dir="rtl"] .toggle-switch,
html[dir="rtl"] .regex-mode-switch {
  direction: ltr;
}

html[dir="rtl"] .toggle-switch input {
  margin: 0 8px 0 0;
}

html[dir="rtl"] .regex-mode-switch {
  margin-left: 4px;
  margin-right: 0;
}

html[dir="rtl"] .regex-mode-switch-track {
  margin-right: 8px;
  margin-left: 0;
}

html[dir="rtl"] .history-toggle-switch {
  margin-left: 0;
  margin-right: 0;
  padding-right: 0;
  padding-left: 0;
}

html[dir="rtl"] .panel-header .buttons .toggle-switch {
  flex: 0 0 auto;
}

html[dir="rtl"] .toggle-switch label,
html[dir="rtl"] .regex-mode-switch-label,
html[dir="rtl"] .panel-toggle-copy,
html[dir="rtl"] .panel-toggle-state {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .expert-grid .input-row.compact .regex-mode-switch {
  justify-self: start;
}

html[dir="rtl"] .topbar-actions #togglePreviewPanelBtn::before,
html[dir="rtl"] .topbar-actions .panel-toggle-control + .panel-toggle-control::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .regex-search-result {
  text-align: right;
}

html[dir="rtl"] .regex-search-result-line {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .history-entry-preview {
  text-align: right;
}

html[dir="rtl"] .history-entry-actions {
  right: auto;
  left: 0;
}

html[dir="rtl"] .editor-context-menu,
html[dir="rtl"] .editor-context-menu-item,
html[dir="rtl"] .editor-context-menu-link,
html[dir="rtl"] .editor-context-menu-empty {
  text-align: right;
}

html[dir="rtl"] .editor-context-menu-link i {
  margin: 0 0 0 3px;
}

html[dir="rtl"] .editor-context-menu-form-actions {
  justify-content: flex-start;
}
