:root {
  --ink: #10141f;
  --muted: #596474;
  --muted-2: #7d8794;
  --line: #dbe3ea;
  --line-strong: #bfd3dc;
  --accent: #007d93;
  --accent-strong: #005f72;
  --background: #f8fafb;
  --danger: #b42318;
  --ok: #18794e;
  --shadow: 0 18px 45px rgba(12, 25, 37, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0, 125, 147, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 125, 147, 0.04) 1px, transparent 1px),
    var(--background);
  background-size: 42px 42px;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

textarea {
  min-height: 290px;
  padding: 14px;
  resize: vertical;
  line-height: 1.45;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 14px;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

label {
  display: grid;
  gap: 7px;
  color: #354052;
  font-size: 13px;
  font-weight: 850;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav,
.header-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand {
  gap: 12px;
  font-size: 23px;
  font-weight: 800;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border: 1px solid #182434;
  border-radius: 6px;
  background: #060b12;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 8px 18px rgba(12, 25, 37, 0.16);
}

.main-nav {
  justify-content: center;
  gap: 34px;
}

.main-nav a,
.header-actions a {
  color: #202838;
  font-size: 14px;
  font-weight: 750;
}

.main-nav a:hover,
.header-actions a:hover {
  color: var(--accent);
}

.header-actions {
  justify-content: flex-end;
  gap: 16px;
}

.github-link {
  align-items: center;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  gap: 8px;
  justify-self: end;
}

.github-link svg {
  height: 18px;
  width: 18px;
}

.site-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 40px 42px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.tool-shell {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px 40px 42px;
}

.tool-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.tool-top h1 {
  max-width: 760px;
  margin: 4px 0 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
}

.tool-top p {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.back-link,
.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
}

.button-row,
.utility-row,
.switcher,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button,
.switcher a,
.quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #354052;
  padding: 0 13px;
  font-weight: 850;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  color: #fff;
}

.file-button input {
  display: none;
}

.button:hover,
.switcher a:hover,
.quick-links a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.switcher {
  display: none;
}

.switcher a.is-active {
  border-color: #b9dce5;
  background: #e8f7f9;
  color: var(--accent-strong);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.tool-panel,
.output-panel,
.more-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.tool-panel,
.output-panel {
  padding: 18px;
}

.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.single-column {
  grid-template-columns: 1fr;
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tool-controls label {
  min-width: 160px;
  flex: 1;
}

.result-box,
.preview-box {
  min-height: 290px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.45;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 14px;
}

.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--ok);
}

.more-panel {
  margin-top: 16px;
  padding: 16px;
}

.more-panel h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.diff-line {
  display: block;
  margin: 0 -14px;
  padding: 2px 14px;
}

.diff-add {
  background: #e8f8ef;
  color: #17633d;
}

.diff-remove {
  background: #fff0ef;
  color: #9f2f24;
}

.diff-same {
  color: #354052;
}

.match-item {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.match-item:last-child {
  border-bottom: 0;
}

.color-preview {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #007d93;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.password-layout {
  display: grid;
  gap: 14px;
}

.password-tool-panel {
  display: grid;
  gap: 16px;
}

.tool-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.tool-panel-heading h2 {
  margin: 0;
  font-size: 22px;
}

.tool-panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.tool-panel-heading a {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.password-mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.password-mode-card {
  display: grid;
  gap: 6px;
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 12%, rgba(0, 125, 147, 0.1), transparent 34%),
    #fff;
  color: #354052;
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.password-mode-card:hover,
.password-mode-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(0, 125, 147, 0.13);
}

.password-mode-card.is-active {
  background:
    radial-gradient(circle at 86% 12%, rgba(0, 125, 147, 0.18), transparent 34%),
    #f2fbfd;
}

.password-mode-card strong {
  color: #10141f;
  font-size: 16px;
}

.password-mode-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.compact-mode-select {
  background: #f8fbfc;
}

.password-options,
.option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.asset-viewer-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.asset-viewer-panel {
  display: grid;
  gap: 14px;
}

.asset-viewer-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.asset-drop-zone {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 16%, rgba(0, 125, 147, 0.14), transparent 34%),
    #f8fbfc;
}

.asset-drop-zone.is-dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 125, 147, 0.12);
}

.asset-drop-zone canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 540px;
}

.asset-empty-state {
  position: absolute;
  inset: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #a8d2dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: #354052;
  padding: 20px;
  text-align: center;
  pointer-events: none;
}

.asset-empty-state[hidden] {
  display: none;
}

.asset-empty-state strong {
  font-size: 22px;
}

.asset-empty-state span {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.45;
}

.asset-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.asset-stats-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.asset-stats-grid strong {
  overflow: hidden;
  color: #10141f;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-stats-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.check-option {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0 12px;
}

.strength-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 14px;
}

.strength-panel strong,
.strength-panel span {
  display: block;
}

.strength-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.strength-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde7ed;
}

.strength-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition:
    width 180ms ease,
    background 180ms ease;
}

.json-visualizer-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.json-visualizer-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.15fr) minmax(260px, 0.55fr);
  gap: 14px;
  min-height: 580px;
}

.json-input-panel textarea {
  min-height: 560px;
}

.json-canvas-panel,
.json-detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.json-canvas-panel {
  overflow: hidden;
}

.canvas-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
}

.canvas-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.json-canvas {
  position: relative;
  min-height: 530px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 125, 147, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 125, 147, 0.04) 1px, transparent 1px),
    #f8fbfc;
  background-size: 28px 28px;
}

.json-canvas-inner {
  position: relative;
  min-width: 760px;
  min-height: 520px;
}

.json-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.json-lines path {
  fill: none;
  stroke: #9bb8c3;
  stroke-width: 2;
}

.json-node {
  position: absolute;
  display: grid;
  gap: 9px;
  width: 210px;
  min-height: 118px;
  border: 1px solid #cfdbe3;
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: #fffdf5;
  padding: 12px;
  box-shadow: 0 12px 26px rgba(12, 25, 37, 0.1);
  cursor: pointer;
}

.json-node:hover,
.json-node.is-selected {
  border-color: var(--accent);
  box-shadow: 0 18px 42px rgba(0, 125, 147, 0.18);
}

.json-node.is-array {
  border-top-color: #7c3aed;
}

.json-node.is-value {
  border-top-color: #ffb444;
}

.json-node h3 {
  margin: 0;
  overflow: hidden;
  color: #10141f;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-meta span {
  border-radius: 999px;
  background: #e8f7f9;
  color: var(--accent-strong);
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
}

.node-preview {
  max-height: 54px;
  overflow: hidden;
  color: var(--muted);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.35;
}

.json-detail-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.json-detail-panel h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.json-tree,
.node-details {
  max-height: 248px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.tree-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #354052;
  padding: 5px 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.tree-item:hover,
.tree-item.is-selected {
  border-radius: 6px;
  background: #e8f7f9;
  color: var(--accent-strong);
}

.node-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 10px;
  margin: 0;
}

.node-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.node-details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #263142;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
}

.website-image-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-note {
  margin: 0 0 14px;
  border: 1px solid #cfe2e8;
  border-radius: 8px;
  background: #f2fbfd;
  color: #354052;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.image-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.image-results-toolbar strong {
  font-size: 15px;
}

.image-results-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.website-image-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.website-image-card,
.empty-result {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.website-image-card {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.website-image-preview {
  display: grid;
  min-height: 154px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfe8ee;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #eef3f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef3f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef3f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef3f6 75%);
  background-color: #fff;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.website-image-preview img {
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.website-image-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.website-image-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.image-result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.image-result-actions .button {
  min-height: 36px;
  padding: 0 8px;
  font-size: 12px;
}

.empty-result {
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 26px;
  text-align: center;
}

.url-output-label {
  margin-top: 14px;
}

.url-output-label textarea {
  min-height: 140px;
}

.bg-remover-panel {
  display: grid;
  gap: 16px;
}

.bg-remover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bg-preview-panel,
.bg-control-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.bg-preview-panel .canvas-toolbar strong {
  font-size: 14px;
}

.bg-canvas-frame {
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: auto;
  padding: 14px;
  background: #f8fbfc;
}

.checker-bg {
  background:
    linear-gradient(45deg, #dfe8ee 25%, transparent 25%),
    linear-gradient(-45deg, #dfe8ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe8ee 75%),
    linear-gradient(-45deg, transparent 75%, #dfe8ee 75%);
  background-color: #fff;
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0;
  background-size: 24px 24px;
}

.bg-canvas-frame.preview-white {
  background: #fff;
}

.bg-canvas-frame.preview-black {
  background: #10141f;
}

.bg-canvas-frame.preview-teal {
  background: #007d93;
}

.bg-canvas-frame canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(16, 20, 31, 0.08);
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(12, 25, 37, 0.12);
}

#bgSourceCanvas {
  cursor: crosshair;
}

.bg-control-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.bg-sample-row,
.bg-slider-grid {
  display: grid;
  gap: 12px;
}

.bg-sample-row {
  grid-template-columns: 180px minmax(0, 1fr);
}

.bg-slider-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bg-slider-grid label span {
  color: var(--accent-strong);
  font-weight: 900;
}

.vector-panel {
  display: grid;
  gap: 16px;
}

.vector-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.svg-preview-frame {
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: auto;
  padding: 14px;
}

.svg-preview-frame svg {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(16, 20, 31, 0.08);
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(12, 25, 37, 0.12);
}

.svg-preview-frame.preview-white {
  background: #fff;
}

.svg-preview-frame.preview-black {
  background: #10141f;
}

.svg-preview-frame.preview-teal {
  background: #007d93;
}

.vector-control-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vector-control-row .check-option {
  margin-top: 20px;
}

.vector-sliders {
  margin-top: 2px;
}

.text-studio-panel {
  display: grid;
  gap: 16px;
}

.text-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.7fr);
  gap: 14px;
}

.text-canvas-panel,
.text-editor-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.text-canvas-frame {
  display: grid;
  min-height: 650px;
  place-items: center;
  overflow: auto;
  padding: 14px;
}

.text-canvas-frame canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(16, 20, 31, 0.12);
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(12, 25, 37, 0.14);
  cursor: grab;
}

.text-canvas-frame canvas.is-dragging {
  cursor: grabbing;
}

.text-editor-controls {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.text-editor-controls textarea {
  min-height: 92px;
}

.text-format-row,
.text-style-row,
.text-color-row,
.text-layer-actions {
  display: grid;
  gap: 10px;
}

.text-format-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-color-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.text-style-row,
.text-layer-actions,
.text-slider-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.html-editor-panel {
  display: grid;
  gap: 14px;
}

.html-editor-toolbar {
  display: grid;
  grid-template-columns: 170px minmax(180px, 240px) minmax(160px, 220px);
  gap: 12px;
  align-items: end;
}

.html-editor-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
}

.html-code-panel textarea {
  min-height: 620px;
  tab-size: 2;
}

.html-code-panel.is-dark textarea {
  border-color: #263142;
  background: #10141f;
  color: #f8fafb;
  caret-color: #ffb444;
}

.html-preview-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.html-preview-wrap {
  display: grid;
  min-height: 620px;
  place-items: start center;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 125, 147, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 125, 147, 0.04) 1px, transparent 1px),
    #f8fbfc;
  background-size: 28px 28px;
  padding: 14px;
}

.html-preview-wrap iframe {
  width: 100%;
  min-height: 590px;
  border: 1px solid #cfdbe3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(12, 25, 37, 0.12);
}

.html-preview-wrap.preview-desktop iframe {
  width: 1200px;
}

.html-preview-wrap.preview-tablet iframe {
  width: 768px;
}

.html-preview-wrap.preview-mobile iframe {
  width: 390px;
}

@media (max-width: 1100px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
    gap: 14px;
  }

  .main-nav {
    display: none;
  }

  .tool-shell {
    padding: 20px;
  }

  .tool-workspace,
  .color-grid,
  .password-mode-cards,
  .password-options,
  .option-grid,
  .tool-panel-heading,
  .strength-panel,
  .json-visualizer-shell,
  .website-image-controls,
  .bg-remover-grid,
  .bg-sample-row,
  .bg-slider-grid,
  .vector-preview-grid,
  .vector-control-row,
  .text-studio-grid,
  .html-editor-toolbar,
  .html-editor-grid,
  .asset-viewer-toolbar,
  .asset-stats-grid {
    grid-template-columns: 1fr;
  }

  .website-image-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bg-canvas-frame {
    min-height: 300px;
  }

  .svg-preview-frame {
    min-height: 300px;
  }

  .vector-control-row .check-option {
    margin-top: 0;
  }

  .text-canvas-frame {
    min-height: 360px;
  }

  .html-code-panel textarea,
  .html-preview-wrap {
    min-height: 420px;
  }

  .html-preview-wrap iframe {
    min-height: 390px;
  }

  .asset-drop-zone,
  .asset-drop-zone canvas {
    min-height: 420px;
  }

  .tool-top {
    align-items: stretch;
    flex-direction: column;
  }

  .json-input-panel textarea {
    min-height: 260px;
  }

  .json-canvas-inner {
    min-width: 720px;
  }
}

@media (max-width: 520px) {
  .tool-shell {
    padding: 14px;
  }

  .site-header {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .header-actions a:not(:first-child) {
    display: none;
  }

  .tool-top h1 {
    font-size: 2rem;
  }

  .switcher {
    display: none;
  }

  .switcher a,
  .quick-links a,
  .button {
    width: 100%;
  }

  .website-image-results,
  .image-result-actions,
  .text-format-row,
  .text-color-row,
  .text-style-row,
  .text-layer-actions,
  .text-slider-grid {
    grid-template-columns: 1fr;
  }

  textarea,
  .result-box,
  .preview-box {
    min-height: 220px;
  }
}
