:root {
  --teal: #006c6e;
  --orange: #ff9d00;
  --dark: #131f28;
  --bg: #131f28;
  --surface: #182630;
  --surface-2: #20313c;
  --field: #0f1a22;
  --line: #314650;
  --ink: #f4f7f8;
  --muted: #b8c4c9;
  --accent-ink: #101820;
  --canvas: #f7fbfb;
  --radius: 16px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #edf4f4;
  --field: #f3f7f7;
  --line: #cfdddd;
  --ink: #131f28;
  --muted: #52636b;
  --accent-ink: #ffffff;
  --canvas: #ffffff;
  color-scheme: light;
}

:root[data-theme="light"] .site-header {
  background: #dfe9e9;
}

:root[data-theme="light"] .header-nav a,
:root[data-theme="light"] .theme-toggle {
  background: #eef4f4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img,
canvas {
  max-width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

.site-header,
.site-footer,
.hero,
.workbench,
.favicon-hero,
.favicon-workbench {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 176px;
  height: auto;
}

.header-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-nav a,
.theme-toggle,
.secondary-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.header-nav a:hover,
.header-nav a:focus,
.tool-tab:hover,
.tool-tab:focus {
  border-color: var(--teal);
  color: var(--ink);
}

.theme-toggle {
  width: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  cursor: pointer;
}

.theme-toggle .fa-sun {
  color: var(--orange);
}

.theme-toggle .fa-moon {
  color: var(--teal);
}

:root[data-theme="dark"] .theme-toggle .fa-sun,
:root[data-theme="light"] .theme-toggle .fa-moon {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 34px;
  align-items: center;
  padding: 52px 0 42px;
}

.hero-copy {
  grid-column: 1 / -1;
  text-align: center;
  justify-self: center;
}

.favicon-hero .favicon-intro {
  text-align: left;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 auto;
  max-width: 860px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.subtitle {
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  max-width: 980px;
}

.intro {
  margin: 12px auto 0;
  color: var(--muted);
  max-width: 760px;
  font-size: 1.05rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.hero-points i {
  color: var(--orange);
}

.hero-art {
  align-self: stretch;
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--canvas);
}

.hero-art img {
  display: block;
  border-radius: 16px;
}

.upload-panel,
.tool-menu,
.tool-panel,
.file-card,
.builder-controls,
.favicon-preview-panel,
.package-results,
.result-block,
.implementation-guide {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.upload-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.hero-upload {
  align-self: stretch;
}

.upload-drop {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 256px;
  padding: 32px;
  background: var(--field);
  border: 2px dashed var(--teal);
  border-radius: 18px;
  cursor: pointer;
  text-align: center;
}

.upload-drop > i {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: var(--teal);
  color: #ffffff;
  font-size: 2rem;
}

.upload-drop strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
}

.upload-drop span:not(.upload-title):not(.upload-note) {
  color: var(--muted);
  font-weight: 800;
}

.upload-drop.is-dragging {
  border-color: var(--orange);
}

.upload-title,
.download-btn {
  background: var(--orange);
  color: #111820;
  font-weight: 900;
}

.upload-title {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 12px;
}

.upload-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.global-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-card {
  padding: 20px;
}

.file-card h2,
.suggestions h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-card h2 i,
.suggestions h3 i {
  color: var(--teal);
}

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

.details-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.suggestions {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.suggestions ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.upload-next {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
}

.upload-next[hidden] {
  display: none;
}

.upload-next a {
  color: var(--orange);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workbench {
  padding: 38px 0 68px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.tool-menu {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 20px;
  padding: 18px;
}

.tool-group {
  display: grid;
  gap: 8px;
}

.tool-group h3,
.tool-combos h3 {
  color: var(--orange);
  text-transform: uppercase;
  font-size: 0.76rem;
}

.tool-combos {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.combo-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
}

.combo-option:has(input:disabled) {
  color: var(--muted);
  cursor: not-allowed;
}

.combo-option input {
  width: 18px;
  min-height: 18px;
}

.combo-stack {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.combo-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: auto;
  color: var(--ink);
}

.combo-field {
  display: grid;
  gap: 6px;
  padding-left: 27px;
  color: var(--muted);
  font-size: 0.8rem;
}

.combo-field span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.combo-field input[type="number"] {
  width: 100%;
  min-height: 38px;
  appearance: textfield;
}

.combo-field input[type="number"]::-webkit-outer-spin-button,
.combo-field input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.tool-tab {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--muted);
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
}

.tool-tab.is-active {
  border-color: var(--orange);
  color: var(--ink);
  background: var(--surface-2);
}

.tool-link {
  display: flex;
  align-items: center;
}

.tool-panel {
  display: none;
  padding: 24px;
}

.tool-panel.is-active {
  display: grid;
  gap: 20px;
}

.tool-panel header p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
}

.range-number {
  gap: 9px;
}

.range-number input[type="range"] {
  min-height: 28px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 8px 10px;
}

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

input[type="range"] {
  padding: 0;
  accent-color: var(--orange);
}

.preview-wrap,
.audit-list {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  overflow: auto;
  color: var(--muted);
}

.checker {
  background-color: var(--field);
}

.small-preview {
  min-height: 180px;
}

.preview-wrap canvas {
  width: auto;
  max-height: 520px;
}

.preview-upload-label {
  position: absolute;
  inset: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 2px dashed var(--teal);
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.preview-upload-label i {
  color: var(--orange);
  font-size: 2.4rem;
}

.preview-upload-label strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.preview-upload-label span {
  color: var(--muted);
}

.preview-upload-label.is-dragging {
  border-color: var(--orange);
}

.has-image .preview-upload-label {
  display: none;
}

.result {
  margin: 0;
  color: var(--muted);
}

.download-btn {
  justify-self: start;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  cursor: pointer;
}

.new-image-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--teal);
  color: #ffffff;
}

.new-image-btn.is-dragging {
  background: var(--orange);
  color: #111820;
}

.download-btn:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.audit-list {
  place-items: stretch;
}

.audit-list ul {
  margin: 0;
  padding-left: 18px;
}

.audit-list li {
  margin-bottom: 10px;
}

.site-footer {
  padding: 28px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.favicon-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 42px;
  align-items: start;
  padding: 56px 0 42px;
}

.favicon-intro h1 {
  max-width: 760px;
  margin-left: 0;
}

.favicon-intro .subtitle,
.favicon-intro .intro {
  margin-left: 0;
}

.favicon-intro .hero-points {
  justify-content: flex-start;
}

.favicon-workbench {
  padding: 38px 0 68px;
}

.section-note {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.favicon-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 22px;
}

.builder-controls,
.favicon-preview-panel,
.package-results {
  padding: 24px;
}

.builder-controls,
.favicon-preview-panel {
  display: grid;
  gap: 20px;
  align-content: start;
}

.color-control {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
}

input[type="color"] {
  padding: 4px;
}

.favicon-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.favicon-previews figure {
  min-width: 0;
  margin: 0;
}

.favicon-previews figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.tab-preview,
.apple-preview,
.app-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
}

.tab-preview {
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.apple-preview {
  background: #263640;
  border-radius: 22%;
}

.app-preview {
  background: #0f1a22;
  border-radius: 50%;
}

.tab-preview canvas {
  width: 32%;
}

.apple-preview canvas,
.app-preview canvas {
  width: 100%;
}

.package-results {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.package-results[hidden] {
  display: none;
}

.package-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.package-summary p {
  margin: 8px 0 0;
  color: var(--muted);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 22px;
}

.result-block,
.implementation-guide {
  padding: 20px;
}

.result-block > p {
  color: var(--muted);
}

pre {
  max-width: 100%;
  max-height: 360px;
  overflow: auto;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.secondary-btn {
  padding: 0 14px;
  cursor: pointer;
  font-weight: 900;
}

.file-list,
.implementation-guide ol {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.file-list li,
.implementation-guide li {
  margin-bottom: 8px;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    order: 3;
  }

  .hero,
  .favicon-hero,
  .workbench-grid,
  .favicon-builder,
  .result-grid,
  .controls,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .tool-menu {
    position: static;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-note {
    text-align: left;
  }

  .package-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .workbench,
  .favicon-hero,
  .favicon-workbench,
  .site-footer {
    width: min(100% - 24px, 1220px);
  }

  h1 {
    font-size: 2.55rem;
  }

  .header-nav a {
    flex: 1 1 150px;
    justify-content: center;
  }

  .upload-panel,
  .tool-panel,
  .tool-menu,
  .file-card,
  .builder-controls,
  .favicon-preview-panel,
  .package-results {
    padding: 14px;
  }

  .upload-drop {
    min-height: 220px;
    padding: 22px;
  }

  .preview-wrap,
  .audit-list {
    min-height: 220px;
  }

  .favicon-previews {
    gap: 8px;
  }
}

/* Compact all-in-one homepage layout */
.app-stage {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 58px;
}

.site-header {
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}

.header-nav a,
.theme-toggle {
  background: var(--surface-2);
}

.theme-toggle {
  width: 46px;
  min-height: 46px;
  grid-template-columns: 1fr;
  border-radius: 10px;
  font-size: 1rem;
}

.theme-toggle i {
  color: var(--muted);
}

:root[data-theme="light"] .theme-toggle {
  background: var(--surface);
}

:root[data-theme="light"] .theme-toggle i {
  color: var(--teal);
}

.hero-copy {
  text-align: center;
}

.app-stage h1 {
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.app-stage .subtitle {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
}

.hero-points {
  margin-top: 24px;
}

.hero-points span {
  min-height: 34px;
  border: 0;
  background: transparent;
  padding: 0 10px;
}

.dashboard-shell {
  margin-top: 40px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.dashboard-shell .file-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 18px;
  background: var(--field);
}

.dashboard-shell .file-card h2 {
  align-self: center;
  font-size: 1rem;
}

.dashboard-shell .details-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.dashboard-shell .details-grid div {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.dashboard-shell .suggestions {
  grid-column: 1 / -1;
  padding-top: 10px;
}

.dashboard-shell .suggestions h3 {
  font-size: 0.9rem;
}

.dashboard-shell .suggestions ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-left: 18px;
}

.dashboard-shell .suggestions li {
  margin: 0;
}

.dashboard-shell .upload-next {
  grid-column: 1 / -1;
}

.dashboard-shell .workbench {
  width: 100%;
  padding: 12px 0 0;
}

.dashboard-shell .workbench-grid {
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 12px;
}

.dashboard-shell .tool-menu,
.dashboard-shell .tool-panel {
  background: var(--field);
}

.dashboard-shell .tool-menu {
  position: static;
  gap: 16px;
}

.dashboard-shell .tool-tab {
  min-height: 38px;
  border-radius: 8px;
}

.dashboard-shell .tool-panel.is-active {
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.62fr);
  gap: 18px;
  align-items: start;
}

.dashboard-shell .tool-panel header,
.dashboard-shell .tool-panel .controls,
.dashboard-shell .tool-panel .result,
.dashboard-shell .tool-panel .download-btn,
.dashboard-shell .tool-panel .new-image-btn {
  grid-column: 2;
}

.dashboard-shell .preview-wrap,
.dashboard-shell .audit-list {
  grid-column: 1;
  grid-row: 1 / span 5;
  min-height: 500px;
  border-style: dashed;
  border-color: var(--teal);
}

.dashboard-shell .controls {
  grid-template-columns: 1fr;
}

.dashboard-shell .download-btn {
  width: 100%;
}

.site-footer {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}

.love-footer {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-weight: 900;
  line-height: 1.1;
}

.love-footer span {
  display: inline-block;
  margin: 0 5px;
  color: #ff2f6d;
}

.love-footer a,
.content-page a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--orange);
}

.content-page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.content-page h1 {
  margin-left: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

.content-page .intro {
  margin-left: 0;
}

.content-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-panel h2 + p,
.content-panel p + h2 {
  margin-top: 18px;
}

.content-panel p {
  color: var(--muted);
}

.content-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 14px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 10px;
  resize: vertical;
  font: inherit;
}

.hide-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
}

.form-status.is-success {
  border-color: var(--teal);
  color: var(--ink);
}

.form-status.is-error {
  border-color: var(--orange);
  color: var(--ink);
}

.form-status.is-warning {
  border-color: var(--orange);
}

@media (max-width: 1080px) {
  .dashboard-shell .file-card,
  .dashboard-shell .workbench-grid,
  .dashboard-shell .tool-panel.is-active {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .tool-panel header,
  .dashboard-shell .tool-panel .controls,
  .dashboard-shell .tool-panel .result,
  .dashboard-shell .tool-panel .download-btn,
  .dashboard-shell .tool-panel .new-image-btn,
  .dashboard-shell .preview-wrap,
  .dashboard-shell .audit-list {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-shell .preview-wrap,
  .dashboard-shell .audit-list {
    min-height: 320px;
  }

  .dashboard-shell .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .brand img {
    width: 150px;
  }

  .app-stage {
    width: min(100% - 24px, 1220px);
    padding-top: 32px;
  }

  .dashboard-shell {
    padding: 12px;
  }

  .dashboard-shell .details-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .details-grid div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .content-page {
    width: min(100% - 24px, 980px);
    padding-top: 36px;
  }

  .content-split {
    grid-template-columns: 1fr;
  }
}
