* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
}
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #10151f;
  color: #d7dfec;
  font:
    13px system-ui,
    sans-serif;
}
header {
  min-height: 66px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #293241;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #69dfbf;
  font-size: 26px;
  font-weight: 700;
}
.brand span {
  color: #e6edf7;
  font-size: 16px;
  font-weight: 600;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: #8495ad;
  margin-top: 4px;
}
a {
  color: #97acc6;
  text-decoration: none;
  font-size: 12px;
}
a:hover {
  color: #69dfbf;
}
nav {
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  align-items: center;
  background: #151c28;
}
button,
select {
  font: inherit;
  color: #cbd7e7;
  border: 1px solid #354155;
  border-radius: 5px;
  padding: 5px 10px;
  background: #1b2534;
  cursor: pointer;
}
button:hover {
  background: #29374c;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #69dfbf;
  outline-offset: 2px;
}
.separator {
  width: 1px;
  height: 18px;
  margin: 0 6px;
  background: #354155;
}
.spacer {
  flex: 1;
}
.font-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  color: #91a2bb;
}
.tabbar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 22px;
  border-bottom: 1px solid #293241;
  font-size: 12px;
}
.file-icon {
  color: #e9b078;
  font-family: monospace;
}
#modified {
  color: #69dfbf;
}
.badge {
  color: #7ecbb7;
  font-size: 10px;
  letter-spacing: 0.7px;
}
#findbar {
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1b2534;
}
#findbar[hidden] {
  display: none;
}
#query {
  padding: 6px 10px;
  background: #10151f;
  color: #e6edf7;
  border: 1px solid #354155;
  border-radius: 4px;
}
#find-result {
  color: #96a7c0;
  font-size: 11px;
}
#viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#editor-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#scroller {
  position: absolute;
  inset: 0;
  overflow: scroll;
  cursor: text;
  scrollbar-color: #3a4a62 #10151f;
}
#extent {
  pointer-events: none;
  min-width: 100%;
  min-height: 100%;
}
#text-input {
  position: absolute;
  width: 2px;
  height: 24px;
  opacity: 0.01;
  resize: none;
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  pointer-events: none;
}
footer {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 30px;
  padding: 6px 18px;
  background: #182536;
  color: #92a6c1;
  font-size: 11px;
}
footer .error {
  color: #ff8d9d;
}
@media (max-width: 650px) {
  header a {
    font-size: 10px;
  }
  footer {
    gap: 10px;
  }
  #render-info {
    display: none;
  }
}
#settings-panel {
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #1b2534;
  border-bottom: 1px solid #354155;
  font-size: 12px;
}
#settings-panel[hidden],
#problems-panel[hidden],
#breakpoint-panel[hidden] {
  display: none;
}
#settings-panel label,
#findbar label {
  display: flex;
  align-items: center;
  gap: 5px;
}
#settings-panel input[type="number"] {
  width: 48px;
  padding: 4px;
}
#findbar {
  flex-wrap: wrap;
  font-size: 12px;
}
#replacement {
  padding: 6px 10px;
  background: #10151f;
  color: #e6edf7;
  border: 1px solid #354155;
  border-radius: 4px;
}
#problems-panel {
  max-height: 170px;
  overflow: auto;
  border-top: 1px solid #354155;
  background: #151c28;
  padding: 6px 12px;
}
#problems-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  margin: 2px 0;
  background: transparent;
}
#breakpoint-panel {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 24px;
  padding: 14px;
  border: 1px solid #5a7494;
  background: #1b2534;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 6px 24px #0008;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
nav label {
  display: flex;
  align-items: center;
  gap: 6px;
}
body[data-theme="light"] {
  background: #fafbfd;
  color: #243449;
}
body[data-theme="light"] header,
body[data-theme="light"] nav,
body[data-theme="light"] .tabbar {
  background: #eaf0f8;
  color: #243449;
}
body[data-theme="light"] .brand span {
  color: #243449;
}
body[data-theme="light"] #settings-panel,
body[data-theme="light"] #findbar,
body[data-theme="light"] #problems-panel,
body[data-theme="light"] #breakpoint-panel {
  background: #eaf0f8;
  color: #243449;
  border-color: #a6b6cb;
}
body[data-theme="light"] button,
body[data-theme="light"] select,
body[data-theme="light"] input {
  background: #f8fafc;
  color: #243449;
  border-color: #a6b6cb;
}
body[data-theme="light"] .badge,
body[data-theme="light"] header a {
  color: #386e68;
}
body[data-theme="light"] #scroller {
  scrollbar-color: #b1bfd2 #eef2f8;
}
