:root {
  --bg: #08101f;
  --bg-elevated: rgba(13, 21, 40, 0.88);
  --bg-soft: rgba(255, 255, 255, 0.04);
  --panel: rgba(11, 18, 34, 0.88);
  --panel-strong: rgba(15, 23, 42, 0.98);
  --text: #edf2ff;
  --text-soft: #b8c4e8;
  --muted: #8fa0c3;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #6ea8fe;
  --accent-2: #9b7bff;
  --success: #14b86c;
  --danger: #cf3f63;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html[data-theme="light"] {
  --bg: #f3f6ff;
  --bg-elevated: rgba(255, 255, 255, 0.86);
  --bg-soft: rgba(14, 23, 42, 0.04);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --text: #18233b;
  --text-soft: #40506f;
  --muted: #5d6b87;
  --border: rgba(18, 35, 60, 0.09);
  --accent: #2d67f5;
  --accent-2: #7b52ff;
  --success: #0d9e5b;
  --danger: #cf264f;
  --shadow: 0 24px 80px rgba(29, 46, 89, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(110, 168, 254, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(155, 123, 255, 0.16), transparent 24%),
    var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
textarea, input, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}
textarea:focus, input:focus, select:focus {
  border-color: rgba(110, 168, 254, 0.5);
  box-shadow: 0 0 0 4px rgba(110, 168, 254, 0.14);
}
textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.site-shell {
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 40px;
}
.site-header {
  position: sticky;
  top: 14px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin: 16px 0 22px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(110, 168, 254, 0.28), rgba(155, 123, 255, 0.24));
  font-size: 24px;
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 1rem; }
.brand-copy small { color: var(--muted); }
.hamburger-btn,
.menu-close-btn,
.theme-pill,
.primary-btn,
.secondary-btn,
.copy-chip,
.small-btn,
.action-btn {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-soft);
  border-radius: 16px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.hamburger-btn:hover,
.menu-close-btn:hover,
.theme-pill:hover,
.primary-btn:hover,
.secondary-btn:hover,
.copy-chip:hover,
.small-btn:hover,
.action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 168, 254, 0.45);
}
.hamburger-btn {
  width: 56px;
  height: 56px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 15px;
}
.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}
.menu-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(380px, calc(100vw - 24px));
  z-index: 95;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 24px));
  transition: transform .22s ease;
}
.menu-panel.is-open { transform: translateX(0); }
.menu-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.menu-panel-header h2 { margin: 4px 0 0; }
.menu-close-btn {
  width: 42px;
  height: 42px;
}
.theme-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.theme-pill {
  padding: 12px 14px;
  font-weight: 600;
}
.menu-links {
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 6px;
}
.menu-link {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--text);
}
.menu-link:hover, .menu-link.is-active {
  text-decoration: none;
  border-color: rgba(110, 168, 254, 0.45);
  background: rgba(110, 168, 254, 0.11);
}
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.5);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.menu-overlay.is-open { opacity: 1; pointer-events: auto; }
.page-wrap { display: grid; gap: 22px; }
.section-card,
.hero-card,
.site-footer {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
  gap: 24px;
  padding: 28px;
}
.hero-copy h1,
.tool-hero-copy h1,
.prose-card h1,
.section-heading h2,
.prose-card h2 { margin: 8px 0 12px; }
.hero-text, .tool-hero-copy p { color: var(--text-soft); line-height: 1.8; }
.hero-chips, .tool-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-chips span,
.tool-meta-row span,
.tool-category,
.copy-chip {
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: .92rem;
}
.hero-side {
  display: grid;
  gap: 18px;
}
.hero-stat,
.hero-note {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--border);
}
.hero-stat strong { font-size: clamp(2rem, 6vw, 3.5rem); display: block; }
.hero-note p { margin: 0; color: var(--text-soft); line-height: 1.8; }
.section-card { padding: 26px; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eyebrow {
  margin: 0;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.tool-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  color: var(--text);
  text-decoration: none;
}
.tool-card:hover { text-decoration: none; transform: translateY(-2px); }
.tool-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tool-icon { font-size: 1.75rem; }
.tool-card p { margin: 0; color: var(--text-soft); line-height: 1.75; }
.tool-card-cta { color: var(--accent); font-weight: 700; }
.prose-card { line-height: 1.85; }
.prose-card p { color: var(--text-soft); }
.usage-list { margin: 0; padding-left: 1.25rem; color: var(--text-soft); display: grid; gap: 10px; }
.tool-app-shell { overflow: hidden; }
.tool-app-grid,
.dual-output-grid,
.compare-grid,
.url-extractor-grid,
.base64-grid,
.bulk-grid,
.color-picker-layout {
  display: grid;
  gap: 16px;
}
.tool-app-grid,
.dual-output-grid,
.compare-grid,
.url-extractor-grid,
.base64-grid,
.bulk-grid,
.color-picker-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tool-app-header { margin-bottom: 18px; }
.panel {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: 22px;
  padding: 18px;
}
.panel h3, .panel h4 { margin-top: 0; }
.panel p { color: var(--text-soft); }
.control-row, .action-row, .inline-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.inline-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.primary-btn,
.secondary-btn,
.small-btn,
.action-btn,
.copy-chip {
  padding: 12px 16px;
  font-weight: 700;
}
.primary-btn {
  background: linear-gradient(135deg, rgba(110,168,254,.22), rgba(155,123,255,.22));
}
.secondary-btn { background: transparent; }
.small-btn { padding: 10px 14px; }
.action-row { margin-top: 14px; }
.label-block { display: grid; gap: 8px; }
.label-block label { font-weight: 700; }
.helper-text { color: var(--muted); font-size: .92rem; line-height: 1.65; }
.status-box {
  min-height: 44px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.02);
}
.drop-zone {
  position: relative;
  border: 1px dashed rgba(110, 168, 254, 0.45);
  background: linear-gradient(180deg, rgba(110,168,254,.08), rgba(155,123,255,.06));
  border-radius: 20px;
  padding: 22px;
  text-align: center;
  overflow: hidden;
}
.drop-zone strong { display: block; margin-bottom: 6px; }
.drop-zone p { margin: 0; color: var(--text-soft); }
.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone.is-dragover {
  border-color: rgba(110, 168, 254, 0.9);
  box-shadow: inset 0 0 0 2px rgba(110, 168, 254, 0.18);
}
.output-area {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}
.result-box {
  min-height: 200px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  white-space: pre-wrap;
  overflow: auto;
}
.info-list {
  display: grid;
  gap: 10px;
}
.info-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.diff-column {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.diff-column-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  font-weight: 700;
}
.diff-lines {
  max-height: 600px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.diff-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.diff-line .line-no { color: var(--muted); text-align: right; }
.diff-line.match { background: rgba(20,184,108,0.16); color: #fff; }
.diff-line.diff { background: rgba(207,63,99,0.72); color: #fff; }
.diff-line.empty { background: transparent; color: var(--muted); }
.url-output-toolbar,
.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.kv-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.result-highlight {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
}
.result-highlight strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.color-box-card {
  display: grid;
  gap: 18px;
}
.color-preview {
  min-height: 200px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background-image:
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%),
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  overflow: hidden;
  position: relative;
}
.color-preview-fill {
  position: absolute;
  inset: 0;
}
.color-canvas-wrap { display: grid; gap: 14px; }
.color-canvas {
  width: 100%;
  height: 220px;
  border-radius: 24px;
  border: 1px solid var(--border);
  display: block;
  cursor: crosshair;
}
.slider-stack { display: grid; gap: 14px; }
.slider-line { display: grid; gap: 8px; }
.slider-line input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  padding: 0;
  border: 0;
}
.slider-line input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.slider-line input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--text);
}
.color-codes { display: grid; gap: 12px; }
.code-chip {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.code-chip code {
  overflow-wrap: anywhere;
  color: var(--text);
}
.cursor-toast {
  position: fixed;
  z-index: 120;
  min-width: 120px;
  max-width: 240px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(13, 20, 37, 0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
  transform: translate(-50%, -120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.cursor-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -135%);
}
.site-footer {
  margin-top: 24px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.site-footer p { margin: 6px 0 0; color: var(--text-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.footer-links a { color: var(--text); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero-card,
  .tool-app-grid,
  .dual-output-grid,
  .compare-grid,
  .url-extractor-grid,
  .base64-grid,
  .bulk-grid,
  .color-picker-layout,
  .kv-grid,
  .inline-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell { width: min(100%, calc(100% - 16px)); }
  .site-header { top: 8px; padding: 14px; margin-top: 8px; border-radius: 20px; }
  .brand-badge { width: 46px; height: 46px; border-radius: 16px; }
  .hero-card, .section-card, .site-footer { padding: 18px; border-radius: 22px; }
  .menu-panel { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); }
  .code-chip { grid-template-columns: 1fr; }
  .diff-line { grid-template-columns: 42px minmax(0, 1fr); }
}

/* patched ui refinements */
.compact-card {
  padding-top: 22px;
  padding-bottom: 22px;
}
.home-top {
  padding: 26px;
}
.home-top-copy h1 {
  margin-bottom: 10px;
}
.home-top-copy p:last-child {
  margin-bottom: 0;
}
.home-heading-row {
  margin-bottom: 14px;
}
.home-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-tab {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
}
.filter-tab.is-active {
  background: rgba(110, 168, 254, 0.16);
  border-color: rgba(110, 168, 254, 0.48);
}
.tool-category-section.is-hidden {
  display: none;
}
.label-block {
  gap: 10px;
  margin-bottom: 12px;
}
.label-block label {
  display: block;
  line-height: 1.3;
}
.helper-text {
  margin: 0;
}
.panel textarea,
.panel input,
.panel select {
  margin-top: 4px;
}
.option-row {
  margin-top: 0;
  margin-bottom: 12px;
}
.compare-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.compact-drop-zone {
  padding: 16px;
}
.image-preview-frame {
  min-height: 220px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 360px;
}
.empty-note {
  color: var(--muted);
  text-align: center;
  padding: 24px;
}
.palette-grid,
.results-stack,
.opportunity-list,
.resource-table,
.check-card-grid {
  display: grid;
  gap: 14px;
}
.palette-card,
.result-card,
.check-card,
.score-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
}
.palette-card {
  overflow: hidden;
}
.palette-swatch {
  min-height: 86px;
  border-bottom: 1px solid var(--border);
}
.palette-card-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.palette-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.swatch-copy-list,
.code-block-wrap {
  display: grid;
  gap: 10px;
}
.mini-code-row,
.resource-row,
.check-card-top,
.mini-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.mini-code-row {
  flex-wrap: wrap;
}
.mini-code-row span,
.mini-meta {
  color: var(--muted);
  font-size: .9rem;
}
.mini-code-row code {
  flex: 1 1 200px;
  overflow-wrap: anywhere;
}
.score-card-grid,
.mini-stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.score-card {
  padding: 16px;
  display: grid;
  gap: 6px;
}
.score-card strong {
  font-size: 1.5rem;
}
.score-card span {
  color: var(--text-soft);
}
.check-card {
  padding: 16px;
}
.check-card p,
.check-card small {
  margin: 0;
  color: var(--text-soft);
}
.check-status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: capitalize;
  font-size: .85rem;
  font-weight: 700;
}
.status-pass {
  background: rgba(20,184,108,0.12);
}
.status-warn {
  background: rgba(245,158,11,0.12);
}
.status-fail {
  background: rgba(239,68,68,0.12);
}
.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.panel-screenshot-wrap {
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.result-screenshot {
  display: block;
  width: 100%;
  height: auto;
}
.resource-row {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  flex-wrap: wrap;
}
.inline-note {
  min-height: auto;
  padding: 12px 14px;
}
.single-stack-grid {
  grid-template-columns: minmax(0, 1fr);
}
.site-footer {
  padding: 22px 24px;
}
.site-footer p {
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .tool-app-grid,
  .dual-output-grid,
  .compare-grid,
  .url-extractor-grid,
  .base64-grid,
  .bulk-grid,
  .color-picker-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* advanced refresh patch */
button:active,
.copy-chip:active,
.small-btn:active,
.primary-btn:active,
.secondary-btn:active,
.action-btn:active,
.filter-tab:active,
.syntax-tab:active,
.lh-tab:active {
  transform: translateY(0) scale(0.98);
}

.uniform-action-row .primary-btn,
.uniform-action-row .secondary-btn,
.uniform-action-row .copy-chip,
.uniform-action-row .action-btn {
  background: linear-gradient(180deg, rgba(110,168,254,.12), rgba(155,123,255,.08));
  border-color: rgba(110,168,254,.3);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(45,103,245,0.16), transparent 26%),
    radial-gradient(circle at 90% 0%, rgba(123,82,255,0.14), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(20,184,108,0.08), transparent 28%),
    linear-gradient(180deg, #f7f9ff 0%, #eef3ff 48%, #f8fbff 100%);
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .section-card,
html[data-theme="light"] .panel,
html[data-theme="light"] .site-footer,
html[data-theme="light"] .menu-panel,
html[data-theme="light"] .hero-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.94));
  border-color: rgba(44, 77, 140, 0.12);
  box-shadow: 0 24px 60px rgba(38, 74, 139, 0.09);
}

html[data-theme="light"] .tool-card,
html[data-theme="light"] .result-card,
html[data-theme="light"] .palette-card,
html[data-theme="light"] .score-card,
html[data-theme="light"] .check-card,
html[data-theme="light"] .info-row,
html[data-theme="light"] .diff-column,
html[data-theme="light"] .status-box,
html[data-theme="light"] .drop-zone,
html[data-theme="light"] .code-chip,
html[data-theme="light"] .result-highlight,
html[data-theme="light"] .image-preview-frame,
html[data-theme="light"] .image-inspector-frame {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(243,247,255,.9));
  border-color: rgba(44,77,140,.12);
}

html[data-theme="light"] .tool-card {
  box-shadow: 0 18px 40px rgba(46, 78, 139, 0.08);
}

html[data-theme="light"] .tool-card:hover {
  box-shadow: 0 24px 44px rgba(46, 78, 139, 0.12);
}

html[data-theme="light"] .filter-tab.is-active,
html[data-theme="light"] .menu-link:hover,
html[data-theme="light"] .menu-link.is-active {
  background: linear-gradient(180deg, rgba(45,103,245,.13), rgba(123,82,255,.1));
}

.image-picker-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
}

.image-inspector-frame {
  position: relative;
  min-height: 320px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-inspector-canvas {
  width: 100%;
  display: block;
  cursor: crosshair;
}

.hover-color-preview {
  min-height: 132px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background-image:
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%),
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  margin-bottom: 14px;
}

.compact-palette-card .palette-swatch {
  min-height: 62px;
}

.syntax-tab-row,
.lh-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.syntax-tab,
.lh-tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
}

.syntax-tab.is-active,
.lh-tab.is-active {
  background: linear-gradient(180deg, rgba(110,168,254,.17), rgba(123,82,255,.12));
  border-color: rgba(110,168,254,.45);
}

.lighthouse-tool-shell,
.lighthouse-results-shell {
  display: grid;
  gap: 16px;
}

.lighthouse-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.lh-results-top-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1.2fr) repeat(4, minmax(170px, 1fr));
}

.lh-grade-card,
.lh-mini-score-card,
.lh-vital-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: 26px;
  padding: 24px;
}

.lh-grade-card {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.lh-grade-label,
.lh-mini-score-card span,
.lh-vital-card span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.lh-grade-ring {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  border: 12px solid currentColor;
  display: grid;
  place-items: center;
  margin-top: 12px;
}

.lh-grade-ring span {
  font-size: 3rem;
  font-weight: 900;
  color: inherit;
}

.tone-good { color: #06ae58; }
.tone-mid { color: #daa918; }
.tone-poor { color: #f1072e; }

.lh-mini-score-card {
  display: grid;
  gap: 18px;
  align-content: start;
}

.lh-mini-score-card strong {
  font-size: 2.4rem;
  line-height: 1;
}

.lh-score-bar,
.lh-inline-meter {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.lh-score-bar span,
.lh-inline-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: currentColor;
}

.lh-overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
}

.lh-preview-window {
  border-radius: 26px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.26);
  padding: 18px;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.lh-preview-window.is-mobile {
  align-items: start;
}

.lh-preview-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
}

.lh-preview-image.is-mobile {
  max-width: 360px;
}

.lh-vitals-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.lh-vital-card strong {
  display: block;
  font-size: 2.15rem;
  margin-top: 14px;
}

.lh-tab-panel { display: none; }
.lh-tab-panel.is-active { display: block; }
.lh-report-table-wrap { overflow: auto; }
.lh-report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.lh-report-table th,
.lh-report-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.lh-report-table th {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 800;
}
.lh-subtext {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: .95rem;
  line-height: 1.65;
}
.lh-filmstrip-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.lh-filmstrip-frame {
  flex: 0 0 auto;
  margin: 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  padding: 12px;
}
.lh-filmstrip-frame img {
  display: block;
  max-height: 220px;
  border-radius: 12px;
}
.lh-filmstrip-frame figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--text-soft);
  font-size: .92rem;
}
.lh-diag-card p {
  margin-bottom: 0;
}
.lighthouse-results-shell.hidden { display: none; }

@media (max-width: 1080px) {
  .lh-results-top-grid,
  .lh-vitals-grid,
  .lh-overview-grid,
  .image-picker-layout,
  .lighthouse-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* polish patch v4 */
.upload-zone-inner {
  display: grid;
  gap: 10px;
  justify-items: center;
}
.upload-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(110, 168, 254, 0.45);
  background: linear-gradient(180deg, rgba(110,168,254,.18), rgba(155,123,255,.13));
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(10, 20, 40, 0.14);
}
.drop-zone {
  min-height: 148px;
  display: grid;
  place-items: center;
}
.drop-zone strong {
  font-size: 1.02rem;
}
.drop-zone p {
  max-width: 420px;
  line-height: 1.6;
}
.compact-drop-zone {
  min-height: 126px;
}
.primary-btn,
.secondary-btn,
.small-btn,
.action-btn,
.copy-chip,
.syntax-tab,
.lh-tab,
.filter-tab {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.primary-btn,
.secondary-btn {
  box-shadow: 0 10px 24px rgba(10, 20, 40, 0.14);
}
.primary-btn:hover,
.secondary-btn:hover,
.action-btn:hover,
.copy-chip:hover {
  box-shadow: 0 16px 30px rgba(10, 20, 40, 0.18);
}
.action-row + .status-box,
.copy-row + .status-box,
.lighthouse-action-row + .lighthouse-status-box {
  margin-top: 14px;
}
.lh-run-btn {
  min-width: 220px;
}
.lh-tab-bar {
  margin-bottom: 18px;
}
.lh-tab {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}
.lh-tab.is-active {
  box-shadow: 0 14px 28px rgba(8, 18, 40, 0.14);
}
.lh-grade-label,
.lh-mini-score-card span,
.lh-vital-card span,
.lh-report-table th {
  letter-spacing: .02em;
  text-transform: none;
  font-style: normal;
}
.lh-value-note {
  margin-top: 8px;
  font-size: .94rem;
  color: var(--muted);
}
.lh-metric-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: .88rem;
  font-weight: 800;
}
.lh-diag-card {
  padding: 18px;
}
.lh-diag-card.tone-good { border-color: rgba(33,239,134,.28); }
.lh-diag-card.tone-mid { border-color: rgba(255,197,46,.28); }
.lh-diag-card.tone-poor { border-color: rgba(255,101,127,.28); }
.lh-report-table td.tone-good,
.lh-report-table small.tone-good,
.lh-filmstrip-frame figcaption.tone-good { color: #06ae58; font-weight: 800; }
.lh-report-table td.tone-mid,
.lh-report-table small.tone-mid,
.lh-filmstrip-frame figcaption.tone-mid { color: #daa918; font-weight: 800; }
.lh-report-table td.tone-poor,
.lh-report-table small.tone-poor,
.lh-filmstrip-frame figcaption.tone-poor { color: #ff657f; font-weight: 800; }
.lh-inline-meter + small {
  display: inline-block;
  margin-top: 8px;
}
html[data-theme="light"] .primary-btn,
html[data-theme="light"] .secondary-btn,
html[data-theme="light"] .syntax-tab,
html[data-theme="light"] .lh-tab,
html[data-theme="light"] .filter-tab,
html[data-theme="light"] .action-btn,
html[data-theme="light"] .copy-chip {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(237,243,255,.9));
  border-color: rgba(44,77,140,.14);
}
html[data-theme="light"] .primary-btn {
  background: linear-gradient(135deg, rgba(45,103,245,.12), rgba(123,82,255,.1));
}
html[data-theme="light"] .drop-zone {
  background: linear-gradient(180deg, rgba(45,103,245,.08), rgba(123,82,255,.06));
}
html[data-theme="light"] .upload-badge {
  background: linear-gradient(180deg, rgba(45,103,245,.16), rgba(123,82,255,.12));
  border-color: rgba(45,103,245,.28);
}
html[data-theme="light"] .lh-score-bar,
html[data-theme="light"] .lh-inline-meter {
  background: rgba(24, 35, 59, 0.08);
}
@media (max-width: 760px) {
  .lh-results-top-grid {
    grid-template-columns: 1fr;
  }
  .lh-grade-card {
    min-height: 220px;
    padding: 20px;
  }
  .lh-grade-ring {
    width: 140px;
    height: 140px;
    border-width: 10px;
  }
  .lh-grade-ring span {
    font-size: 2.3rem;
  }
  .lh-vitals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lh-mini-score-card strong,
  .lh-vital-card strong {
    font-size: 1.75rem;
  }
  .tool-app-shell,
  .section-card,
  .panel {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 520px) {
  .lh-vitals-grid {
    grid-template-columns: 1fr;
  }
  .lighthouse-form-grid {
    grid-template-columns: 1fr;
  }
  .lh-preview-window {
    min-height: 240px;
    padding: 12px;
  }
  .site-shell {
    width: min(100%, calc(100% - 16px));
  }
}

/* gradient maker patch v6 */
.is-hidden { display: none !important; }

.gradient-tool-root {
  color: #213041;
}

.gradient-stage-preview {
  min-height: 270px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(270deg, rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgba(237, 221, 83, 1) 100%);
}

.gradient-workbench {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: -78px auto 0;
  padding: 20px 20px 18px;
  border-radius: 14px;
  border: 1px solid #d8dade;
  background: #f5f5f7;
  box-shadow: 0 26px 48px rgba(9, 20, 38, 0.14);
}

.gradient-top-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid #d8dade;
}

.gradient-track-area {
  min-width: 0;
}

.gradient-track-shell {
  position: relative;
  height: 58px;
}

.gradient-stop-track {
  position: absolute;
  inset: 14px 10px auto 10px;
  height: 26px;
  border-radius: 18px;
  border: 1px solid rgba(25, 45, 65, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
  cursor: pointer;
}

.gradient-track-handles {
  position: absolute;
  inset: 0;
}

.gradient-stop-handle {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 30px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
}

.gradient-stop-handle::before,
.gradient-stop-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gradient-stop-handle::before {
  top: 6px;
  width: 18px;
  height: 46px;
  border-radius: 14px;
  background: var(--stop-color, #2A7B9B);
  border: 3px solid #28485c;
  box-shadow: 0 0 0 2px rgba(255,255,255,.82), 0 4px 10px rgba(9, 20, 38, 0.18);
}

.gradient-stop-handle::after {
  top: 16px;
  width: 4px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
}

.gradient-stop-handle.is-active::before {
  border-color: #163a55;
  box-shadow: 0 0 0 3px rgba(255,255,255,.92), 0 6px 16px rgba(9, 20, 38, 0.2);
}

.gradient-track-labels {
  display: flex;
  position: relative;
  height: 58px;
  margin-top: 8px;
}

.gradient-track-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  min-width: 56px;
  height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #cfd4da;
  background: #ffffff;
  color: #243748;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(9,20,38,.04);
}

.gradient-track-label.is-active {
  border-color: #8da3bb;
}

.segmented-control.gradient-mode-tabs {
  display: inline-flex;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #d0d5db;
  background: #ffffff;
  box-shadow: none;
}

.segment-btn {
  min-width: 122px;
  padding: 16px 20px;
  border: 0;
  border-right: 1px solid #d0d5db;
  border-radius: 0;
  background: transparent;
  color: #64707c;
  font-weight: 700;
  font-size: 18px;
  transition: background .16s ease, color .16s ease;
}

.segment-btn:last-child {
  border-right: 0;
}

.segment-btn.is-active {
  background: #e7e8ea;
  color: #243748;
  box-shadow: none;
}

.segment-btn:hover {
  transform: none;
  border-color: transparent;
}

.gradient-mode-angle-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.gradient-angle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gradient-angle-knob {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #213041;
  background: #fdfdfd;
  cursor: grab;
}

.gradient-angle-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #213041;
}

.gradient-plain-input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid #d0d5db;
  background: #ffffff;
  color: #243748;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  box-shadow: none;
}

.gradient-plain-input:focus {
  border-color: #7d95ad;
}

.angle-value-input {
  width: 88px;
  text-align: center;
}

.gradient-preset-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}

.gradient-preset-chip {
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.gradient-preset-swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
}

.gradient-main-row {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(250px, 320px) minmax(260px, 1fr) 284px;
  gap: 0;
  align-items: start;
}

.gradient-card {
  padding: 28px 22px;
  min-height: 370px;
}

.gradient-card + .gradient-card {
  border-left: 1px solid #d8dade;
}

.gradient-mini-title {
  margin-bottom: 14px;
  color: #8a949e;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gradient-picker-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  border-radius: 10px;
  cursor: crosshair;
}

.gradient-editor-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gradient-hex-main {
  font-size: 18px;
}

.gradient-rgba-head,
.gradient-rgba-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gradient-rgba-head {
  gap: 0;
  margin-top: 2px;
  color: #8a949e;
  font-size: 14px;
  font-weight: 800;
}

.gradient-rgba-head span {
  padding-left: 2px;
}

.gradient-rgba-grid .gradient-plain-input {
  border-radius: 0;
  padding: 0 0 0 14px;
}

.gradient-rgba-grid .gradient-plain-input:first-child {
  border-radius: 12px 0 0 12px;
}

.gradient-rgba-grid .gradient-plain-input:last-child {
  border-radius: 0 12px 12px 0;
}

.gradient-range-stack {
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.gradient-range-row {
  display: block;
}

.gradient-range-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  outline: none;
  border: 1px solid rgba(20,32,45,.08);
  background-size: 100% 100%;
}

.gradient-alpha-row input[type="range"] {
  background-image:
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%),
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

.gradient-range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 34px;
  border-radius: 12px;
  background: #ffffff;
  border: 3px solid #28485c;
  box-shadow: 0 0 0 2px rgba(255,255,255,.82), 0 4px 10px rgba(9,20,38,.18);
  cursor: grab;
}

.gradient-range-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 34px;
  border-radius: 12px;
  background: #ffffff;
  border: 3px solid #28485c;
  box-shadow: 0 0 0 2px rgba(255,255,255,.82), 0 4px 10px rgba(9,20,38,.18);
  cursor: grab;
}

.gradient-stops-card {
  display: flex;
  flex-direction: column;
}

.gradient-stops-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gradient-stop-actions {
  display: flex;
  gap: 8px;
}

.gradient-stops-list {
  display: grid;
  gap: 14px;
}

.gradient-stop-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 90px 28px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #e6e6e8;
}

.gradient-stop-row.is-active {
  background: #dcdcde;
}

button.gradient-stop-swatch {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}

.gradient-stop-text,
.gradient-stop-position-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #cfd4da;
  background: #ffffff;
  color: #243748;
  font-size: 17px;
  font-weight: 700;
}

.gradient-stop-remove {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8d949a;
  font-size: 34px;
  line-height: 1;
  padding: 0;
}

.gradient-stop-remove[disabled] {
  opacity: .35;
  cursor: not-allowed;
}

.gradient-ad-card {
  padding-left: 18px;
  padding-right: 18px;
}

.gradient-ad-slot {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 0;
  background: transparent;
}

.gradient-css-card {
  width: min(1120px, calc(100% - 40px));
  margin: 26px auto 0;
  border-radius: 12px;
  overflow: hidden;
  background: #233848;
  color: #ffffff;
}

.gradient-css-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 16px;
}

.gradient-css-output {
  min-height: 182px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eef4f8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gradient-css-card .uniform-action-row {
  padding: 0 22px 22px;
}

.gradient-css-card .secondary-btn {
  width: 100%;
  background: #ffffff;
  color: #1f3242;
  border: 0;
}

.gradient-tool-root input::-webkit-outer-spin-button,
.gradient-tool-root input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gradient-tool-root input[type=number] {
  -moz-appearance: textfield;
}

html[data-theme="dark"] .gradient-workbench,
html[data-theme="dark"] .gradient-card,
html[data-theme="dark"] .gradient-css-card {
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.32);
}

@media (max-width: 1280px) {
  .gradient-main-row {
    grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(260px, 1fr);
  }

  .gradient-ad-card {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #d8dade;
    min-height: 40px;
  }

  .gradient-ad-slot {
    min-height: 40px;
  }
}

@media (max-width: 1120px) {
  .gradient-top-row {
    grid-template-columns: 1fr;
  }

  .gradient-mode-angle-group,
  .gradient-preset-row {
    justify-content: flex-start;
  }
}

@media (max-width: 920px) {
  .gradient-workbench,
  .gradient-css-card {
    width: min(100%, calc(100% - 16px));
  }

  .gradient-main-row {
    grid-template-columns: 1fr;
  }

  .gradient-card + .gradient-card {
    border-left: 0;
    border-top: 1px solid #d8dade;
  }
}

@media (max-width: 680px) {
  .gradient-workbench {
    margin-top: -34px;
    padding: 14px 14px 16px;
  }

  .gradient-stage-preview {
    min-height: 150px;
  }

  .gradient-track-labels {
    height: 52px;
  }

  .gradient-track-label {
    min-width: 50px;
    height: 42px;
  }

  .gradient-mode-angle-group {
    flex-wrap: wrap;
  }

  .gradient-preset-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .gradient-stop-row {
    grid-template-columns: 44px minmax(0, 1fr) 74px 24px;
  }

  .gradient-card {
    padding: 18px 14px;
    min-height: auto;
  }

  .gradient-css-card .uniform-action-row {
    padding: 0 14px 14px;
  }
}

/* gradient + web tech analyzer polish v8 */
.gradient-workbench {
  width: min(1140px, calc(100% - 28px));
  margin-top: -72px;
  padding: 16px 18px 14px;
  overflow: hidden;
}

.gradient-top-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(290px, 332px);
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
}

.gradient-track-shell {
  height: 52px;
}

.gradient-stop-track {
  inset: 12px 14px auto 14px;
  height: 24px;
}

.gradient-stop-handle {
  width: 28px;
  height: 52px;
}

.gradient-stop-handle::before {
  top: 4px;
  width: 18px;
  height: 44px;
}

.gradient-stop-handle::after {
  top: 14px;
  height: 24px;
}

.gradient-track-labels {
  height: 52px;
  margin-top: 6px;
  padding: 0 14px;
  box-sizing: border-box;
}

.gradient-track-label {
  min-width: 54px;
  height: 46px;
  font-size: 14px;
}

.gradient-track-label.is-edge-left {
  left: 0 !important;
  transform: translateX(0);
}

.gradient-track-label.is-edge-right {
  left: 100% !important;
  transform: translateX(-100%);
}

.segment-btn {
  min-width: 108px;
  padding: 13px 16px;
  font-size: 17px;
}

.gradient-mode-angle-group {
  gap: 12px;
}

.gradient-angle-wrap {
  gap: 10px;
}

.gradient-angle-knob {
  width: 54px;
  height: 54px;
}

.gradient-angle-dot {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
}

.angle-value-input {
  width: 82px;
}

.gradient-plain-input {
  height: 54px;
  padding: 0 16px;
  font-size: 15px;
}

.gradient-preset-row {
  gap: 10px;
  justify-content: flex-end;
}

.gradient-preset-chip {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.gradient-preset-swatch {
  border-radius: 16px;
}

.gradient-main-row {
  grid-template-columns: minmax(210px, 0.92fr) minmax(230px, 0.9fr) minmax(260px, 1.02fr);
}

.gradient-card {
  padding: 22px 16px;
  min-height: 0;
}

.gradient-picker-canvas {
  border-radius: 14px;
}

.gradient-rgba-head {
  font-size: 13px;
}

.gradient-rgba-grid .gradient-plain-input {
  padding-left: 12px;
}

.gradient-range-stack {
  gap: 14px;
}

.gradient-range-row input[type="range"] {
  height: 16px;
}

.gradient-range-row input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 32px;
}

.gradient-range-row input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 32px;
}

.gradient-stops-top {
  align-items: center;
  gap: 10px;
}

.gradient-stop-actions {
  gap: 8px;
  margin-left: auto;
}

.gradient-stop-actions .small-btn {
  padding: 9px 14px;
  border-radius: 18px;
  min-width: 0;
}

.gradient-stops-list {
  gap: 12px;
}

.gradient-stop-row {
  grid-template-columns: 44px minmax(116px, 1fr) 78px 18px;
  gap: 10px;
  padding: 10px 10px 10px 10px;
  border-radius: 14px;
}

button.gradient-stop-swatch {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.gradient-stop-text,
.gradient-stop-position-input {
  margin: 0;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  box-shadow: none;
  font-size: 15px;
}

.gradient-stop-remove {
  width: 18px;
  height: 18px;
  font-size: 24px;
  justify-self: end;
}

.gradient-ad-card,
.gradient-ad-slot {
  display: none !important;
}

.gradient-css-card {
  width: min(1140px, calc(100% - 28px));
}

@media (max-width: 1180px) {
  .gradient-workbench,
  .gradient-css-card {
    width: min(100%, calc(100% - 18px));
  }

  .gradient-top-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(260px, 290px);
    gap: 10px;
  }

  .segment-btn {
    min-width: 96px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .gradient-angle-knob {
    width: 50px;
    height: 50px;
  }

  .angle-value-input {
    width: 74px;
  }

  .gradient-preset-chip {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 900px) {
  .gradient-workbench {
    padding: 14px 14px 12px;
  }

  .gradient-main-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.06fr);
  }
}

@media (max-width: 760px) {
  .gradient-top-row,
  .gradient-main-row {
    grid-template-columns: 1fr;
  }

  .gradient-preset-row,
  .gradient-mode-angle-group {
    justify-content: flex-start;
  }

  .gradient-card + .gradient-card {
    border-left: 0;
    border-top: 1px solid #d8dade;
  }
}

.tech-analyzer-root {
  display: grid;
  gap: 18px;
}

.tech-analyzer-form-panel {
  padding: 20px;
}

.tech-analyzer-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: end;
}

.tech-analyzer-form-grid > * {
  min-width: 0;
}

.tech-analyzer-url-field input {
  height: 58px;
  font-size: 1rem;
}

.tech-analyzer-run-btn,
button.tech-analyzer-run-btn,
.primary-btn.tech-analyzer-run-btn,
html[data-theme="light"] .primary-btn.tech-analyzer-run-btn,
html[data-theme="dark"] .primary-btn.tech-analyzer-run-btn {
  height: 58px;
  width: 100%;
  min-width: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: end;
  margin: 0;
  padding: 0 24px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(38, 102, 230, 0.32) !important;
  background-color: #1f79ff !important;
  background-image: linear-gradient(180deg, #2a82ff, #1468e8) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 1 !important;
  box-shadow: 0 16px 34px rgba(21, 95, 220, 0.2) !important;
}

.tech-analyzer-run-btn:hover,
button.tech-analyzer-run-btn:hover,
.primary-btn.tech-analyzer-run-btn:hover,
html[data-theme="light"] .primary-btn.tech-analyzer-run-btn:hover,
html[data-theme="dark"] .primary-btn.tech-analyzer-run-btn:hover {
  background-image: linear-gradient(180deg, #3a8cff, #1a72f2) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.tech-analyzer-results {
  display: grid;
  gap: 20px;
}

.tech-analyzer-results-head h2 {
  margin: 4px 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.tech-analyzer-head-underline {
  width: min(100%, 520px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2c7ef7, rgba(44,126,247,0));
}

.tech-analyzer-empty-state {
  padding: 22px;
  color: var(--text-soft);
}

.tech-analyzer-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tech-analyzer-meta-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.tech-analyzer-meta-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tech-analyzer-meta-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tech-analyzer-section {
  padding: 18px 18px 20px;
}

.tech-analyzer-section-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tech-analyzer-section-head h3 {
  margin: 0;
  font-size: 1.45rem;
}

.tech-analyzer-section-body {
  display: grid;
  gap: 12px;
}

.tech-analyzer-list-stack,
.tech-analyzer-data-grid {
  display: grid;
  gap: 12px;
}

.tech-analyzer-list-item,
.tech-analyzer-data-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(73, 131, 230, 0.16);
  background: linear-gradient(180deg, rgba(70, 128, 230, 0.09), rgba(70, 128, 230, 0.05));
}

.tech-analyzer-check {
  color: #1d9958;
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1.2;
}

.tech-analyzer-list-item span:last-child,
.tech-analyzer-data-row div {
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.tech-analyzer-data-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.tech-analyzer-data-row strong {
  color: var(--text);
}

.tech-analyzer-subhead {
  margin-top: 6px;
  margin-bottom: -2px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tech-analyzer-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-analyzer-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(73, 131, 230, 0.16);
  background: rgba(255,255,255,0.06);
  font-weight: 700;
}

html[data-theme="light"] .tech-analyzer-list-item,
html[data-theme="light"] .tech-analyzer-data-row,
html[data-theme="light"] .tech-analyzer-meta-card {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(233, 242, 255, 0.96));
  border-color: rgba(66, 119, 220, 0.16);
}

@media (max-width: 900px) {
  .tech-analyzer-form-grid {
    grid-template-columns: 1fr;
  }

  .tech-analyzer-run-btn {
    width: 100%;
    min-width: 0;
  }

  .tech-analyzer-data-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}


.mono-block {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.035);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow: auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.status-chip.pass {
  background: rgba(20,184,108,0.18);
  border-color: rgba(20,184,108,0.38);
  color: #bbf7d0;
}
.status-chip.warn {
  background: rgba(245,158,11,0.18);
  border-color: rgba(245,158,11,0.4);
  color: #fde68a;
}
.status-chip.fail {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.38);
  color: #fecaca;
}
html[data-theme="light"] .mono-block {
  background: #f7f9fc;
}
html[data-theme="light"] .status-chip.pass {
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.28);
  color: #166534;
}
html[data-theme="light"] .status-chip.warn {
  background: rgba(245,158,11,0.16);
  border-color: rgba(245,158,11,0.28);
  color: #92400e;
}
html[data-theme="light"] .status-chip.fail {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.26);
  color: #991b1b;
}


.compact-note {
  min-height: 140px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  background: var(--panel-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
}
