:root {
  --navy: #071642;
  --navy-2: #123b73;
  --coral: #ff456d;
  --coral-dark: #e63158;
  --sky: #dff5ff;
  --paper: #ffffff;
  --line: #d8e8f5;
  --muted: #61718e;
  --shadow: 0 18px 40px rgba(19, 57, 99, 0.14);
  --soft-shadow: 0 10px 24px rgba(19, 57, 99, 0.1);
  --radius-lg: 28px;
  --radius-md: 20px;
}

body.img2grid-page {
  margin: 0;
  color: var(--navy);
  background:
    radial-gradient(circle at 8% 12%, rgba(100, 198, 250, 0.34), transparent 30%),
    linear-gradient(180deg, #aee9ff 0%, #effaff 26%, #fffaf0 100%);
  font-family: Inter, ui-rounded, "Nunito", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body.img2grid-page main,
body.img2grid-page a,
body.img2grid-page button,
body.img2grid-page input {
  color: inherit;
  font: inherit;
}

body.img2grid-page a {
  text-decoration: none;
}

body.img2grid-page h1,
body.img2grid-page h2,
body.img2grid-page h3,
body.img2grid-page p {
  margin-top: 0;
}

body.img2grid-page h1 {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--navy);
  font-size: clamp(58px, 6vw, 96px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
}

body.img2grid-page h1 span {
  display: block;
  color: var(--coral);
}

body.img2grid-page h2 {
  color: var(--navy);
  font-size: clamp(34px, 3vw, 54px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

body.img2grid-page h3 {
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.16;
}

body.img2grid-page p {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.7;
}

.page-shell {
  max-width: 1600px;
  margin: 0 auto;
  overflow-x: clip;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 26px 26px;
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) minmax(300px, auto);
  gap: 24px;
  align-items: center;
  width: min(96%, 1500px);
  min-height: 66px;
  margin: 10px auto 0;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(180, 216, 240, 0.85);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  color: var(--navy);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(7, 22, 66, 0.1));
}

.brand-text {
  display: inline-block;
  color: var(--navy);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.brand-text span {
  color: var(--coral);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.2vw, 42px);
  color: var(--navy);
  font-weight: 800;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--coral);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff !important;
  background: linear-gradient(180deg, #ff5981, var(--coral));
  box-shadow: 0 10px 0 var(--coral-dark), 0 18px 28px rgba(255, 69, 109, 0.24);
}

.btn-secondary {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.btn-small {
  justify-self: end;
  min-width: 174px;
  min-height: 54px;
  padding-inline: 24px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.language-switcher {
  position: relative;
  z-index: 30;
}

.language-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 10px 22px rgba(26, 35, 78, 0.08);
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher summary span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 0.75rem;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: 172px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.language-menu a {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
}

.language-menu a:hover,
.language-menu a[aria-current="page"] {
  background: var(--coral-soft);
  color: var(--coral);
}

.upload-icon,
.grid-icon,
.palette-icon,
.brush-icon,
.portrait-icon,
.number-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.upload-icon::before {
  content: "";
  position: absolute;
  inset: 7px 2px 4px;
  background: currentColor;
  border-radius: 12px;
  box-shadow: 8px -8px 0 -3px currentColor, 15px -2px 0 -4px currentColor;
}

.upload-icon::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 12px;
  width: 5px;
  height: 15px;
  background: currentColor;
  border-radius: 5px;
}

.grid-icon {
  background:
    linear-gradient(#2d8ce9 0 0) 0 0 / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 10px 0 / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 20px 0 / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 0 10px / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 10px 10px / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 20px 10px / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 0 20px / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 10px 20px / 8px 8px,
    linear-gradient(#2d8ce9 0 0) 20px 20px / 8px 8px;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 0 #0b559a);
}

.palette-icon {
  border-radius: 50%;
  background: #ffc067;
  box-shadow: inset 0 0 0 3px #c77520;
}

.palette-icon::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 26% 36%, #ff4f6e 0 4px, transparent 5px),
    radial-gradient(circle at 66% 30%, #2f8ee8 0 4px, transparent 5px),
    radial-gradient(circle at 60% 68%, #67b84b 0 4px, transparent 5px);
}

.brush-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  width: 8px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(#1f7fda 0 55%, #c26c29 56% 100%);
  transform: rotate(38deg);
}

.portrait-icon,
.number-icon {
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd88f, #f77878);
  box-shadow: inset 0 0 0 3px rgba(7, 22, 66, 0.15);
}

.number-icon::after {
  content: "12";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

.ui-icon {
  --icon-size: 28px;
  display: inline-block;
  flex: 0 0 var(--icon-size);
  width: var(--icon-size);
  height: var(--icon-size);
  vertical-align: middle;
  background: var(--icon-url) center / contain no-repeat;
}

.icon-upload-large {
  --icon-size: 96px;
  --icon-url: url("/static/images/img2grid/assets/generated/icons/upload-cloud.webp");
  filter: drop-shadow(0 10px 18px rgba(45, 140, 233, 0.22));
}

.icon-grid { --icon-url: url("/static/images/img2grid/assets/generated/icons/grid-size.webp"); }
.icon-colors { --icon-url: url("/static/images/img2grid/assets/generated/icons/colors-palette.webp"); }
.icon-preview { --icon-url: url("/static/images/img2grid/assets/generated/icons/preview-eye.webp"); }
.icon-folder { --icon-url: url("/static/images/img2grid/assets/generated/icons/choose-folder.webp"); }

.section-band,
.section-pad {
  width: min(92%, 1460px);
  margin: 0 auto;
}

.section-pad {
  padding: 86px 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(620px, 1.25fr);
  gap: 48px;
  min-height: 820px;
  align-items: center;
  padding: 84px 0 52px;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: min(112vw, 1660px);
  height: clamp(260px, 31vw, 430px);
  background: url("/static/images/img2grid/assets/generated/hero-island-background.webp") center bottom / cover no-repeat;
  mask-image: linear-gradient(180deg, transparent 0 50%, rgba(0, 0, 0, 0.35) 64%, #000 78%);
  pointer-events: none;
  transform: translateX(-50%);
}

.pixel-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pixel-sky span {
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(89, 190, 241, 0.25);
  box-shadow: 18px 18px 0 rgba(89, 190, 241, 0.18), -18px 36px 0 rgba(89, 190, 241, 0.14);
}

.pixel-sky span:nth-child(1) { top: 22%; left: 3%; }
.pixel-sky span:nth-child(2) { top: 10%; left: 52%; }
.pixel-sky span:nth-child(3) { top: 18%; right: 8%; }
.pixel-sky span:nth-child(4) { right: 3%; bottom: 24%; }

body.img2grid-page .eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy,
.hero-preview {
  position: relative;
  z-index: 1;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 10px;
  color: var(--navy) !important;
  font-size: 24px;
  line-height: 1.45;
}

.hero-support {
  max-width: 610px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 34px 0 28px;
}

.mini-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  padding: 16px;
  background: rgba(255, 250, 240, 0.9);
  border: 1px solid rgba(230, 214, 187, 0.8);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
}

.mini-features div {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 5px 12px;
  align-items: center;
  padding: 8px 14px;
}

.mini-features div + div {
  border-left: 1px solid #e9d8be;
}

.mini-features strong,
.mini-features small {
  display: block;
}

.mini-features strong {
  font-weight: 900;
}

.mini-features small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 750;
}

.preview-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.preview-card {
  min-width: 0;
}

body.img2grid-page .preview-card h2 {
  width: auto;
  max-width: 100%;
  margin: 0 auto 10px;
  padding: 9px 12px;
  color: #fff;
  background: linear-gradient(180deg, #2d79ca, #215fa6);
  border-radius: 10px;
  box-shadow: 0 6px 0 rgba(10, 56, 118, 0.25);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.art-card {
  aspect-ratio: 0.78;
  min-height: 320px;
  overflow: hidden;
  border: 12px solid #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.original-art {
  background: url("/static/images/img2grid/assets/generated/hero-original-pet.webp") center / cover no-repeat, linear-gradient(#61c5f6 0 48%, #7ac86c 49% 74%, #efbc62 75%);
}

.grid-art {
  background: url("/static/images/img2grid/assets/generated/hero-pixel-grid-pet.webp") center / cover no-repeat, #8fd6ff;
}

.number-art {
  background: url("/static/images/img2grid/assets/generated/hero-number-guide-pixel-dog.webp") center / cover no-repeat, #8fd6ff;
}

.step-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(180deg, #2d79ca, #215fa6);
  border-radius: 14px;
  box-shadow: 0 7px 0 rgba(10, 56, 118, 0.28);
  font-size: 26px;
  font-weight: 900;
}

.palette-card {
  margin: 26px auto 0;
  padding: 20px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.swatches span {
  display: block;
  width: 42px;
  height: 42px;
  background: var(--c);
  border-radius: 9px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 3px 8px rgba(7, 22, 66, 0.12);
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 38px;
  text-align: center;
}

.converter-panel,
.difference-panel,
.import-card,
.palette-tool {
  display: grid;
  gap: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.converter-panel {
  grid-template-columns: 0.9fr 1.1fr;
}

.drop-zone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 420px;
  text-align: center;
  background:
    linear-gradient(rgba(45, 140, 233, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 140, 233, 0.06) 1px, transparent 1px),
    #f5fcff;
  background-size: 22px 22px;
  border: 3px dashed #9bd6f4;
  border-radius: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.drop-zone:focus-visible {
  outline: 4px solid rgba(255, 69, 109, 0.28);
  outline-offset: 4px;
}

.drop-zone.is-dragging,
.drop-zone.has-file {
  background-color: #fff5f7;
  border-color: var(--coral);
  transform: translateY(-2px);
}

.tool-settings,
.converter-settings {
  display: grid;
  gap: 22px;
}

.setting-group,
.output-preview,
.feature-card,
.steps article,
.difference-cards article,
.usecase-grid article,
.example-card,
.faq-list details,
.palette-options article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--soft-shadow);
}

.setting-group,
.output-preview {
  padding: 22px;
}

.setting-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 900;
}

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

.segmented button {
  min-height: 48px;
  color: var(--navy);
  background: #f6fbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
}

.segmented button.active {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.preview-label strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-label span {
  color: var(--muted);
  font-weight: 750;
}

.results-stage {
  position: relative;
  min-height: 280px;
  margin-bottom: 22px;
  overflow: hidden;
}

.results-empty-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 280px;
  padding: 24px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  background:
    linear-gradient(rgba(45, 140, 233, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 140, 233, 0.07) 1px, transparent 1px),
    #f5fcff;
  background-size: 16px 16px;
  border: 1px dashed #98cfe9;
  border-radius: 16px;
}

.results-empty-placeholder .ui-icon {
  --icon-size: 48px;
  opacity: 0.72;
}

.results-empty-placeholder p {
  max-width: 28ch;
  margin: 0;
}

.results-stage[data-results-empty="false"] .results-empty-placeholder {
  display: none;
}

.results-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.results-grid[hidden],
.results-loading[hidden] {
  display: none;
}

.results-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.loading-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(45, 140, 233, 0.18);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: converter-spin 0.85s linear infinite;
}

@keyframes converter-spin {
  to { transform: rotate(360deg); }
}

.result-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-bottom: 8px;
}

.result-panel-title {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.result-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.preview-viewport,
.converter-preview-guide {
  position: relative;
  width: 100%;
  min-height: 220px;
  overflow: hidden;
  background:
    linear-gradient(rgba(45, 140, 233, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 140, 233, 0.07) 1px, transparent 1px),
    #f5fcff;
  background-size: 16px 16px;
  border: 1px solid #98cfe9;
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.converter-preview-guide {
  border-style: dashed;
}

.preview-viewport canvas,
.converter-preview-guide canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: transparent;
  border: 0;
  image-rendering: pixelated;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 58px;
}

.result-actions .btn {
  min-width: 132px;
  min-height: 50px;
  padding-inline: 20px;
  white-space: nowrap;
}

.result-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  margin: 4px 0 8px;
}

.result-palette span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: var(--c);
  border-radius: 9px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.13), 0 3px 8px rgba(7, 22, 66, 0.12);
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(7, 22, 66, 0.5);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
  transform: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-card,
.usecase-grid article,
.example-card {
  display: block;
  padding: 24px;
}

.example-card::before {
  content: none;
}

.feature-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
}

.feature-card .grid-icon,
.feature-card .portrait-icon,
.feature-card .number-icon,
.feature-card .palette-icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 10px;
  box-shadow: none;
  filter: none;
}

.feature-card .grid-icon { background-image: url("/static/images/img2grid/assets/generated/feature-icon-grid.webp"); }
.feature-card .portrait-icon { background-image: url("/static/images/img2grid/assets/generated/feature-icon-photo.webp"); }
.feature-card .number-icon { background-image: url("/static/images/img2grid/assets/generated/feature-icon-number.webp"); }
.feature-card .palette-icon { background-image: url("/static/images/img2grid/assets/generated/feature-icon-palette.webp"); }
.feature-card .number-icon::after,
.feature-card .palette-icon::before { content: none; }

.card-visual {
  height: 128px;
  margin-top: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 16px;
}

.grid-strip { background-image: url("/static/images/img2grid/assets/generated/feature-strip-grid.webp"); }
.portrait-strip { background-image: url("/static/images/img2grid/assets/generated/feature-strip-photo.webp"); background-position: center 44%; }
.number-strip { background-image: url("/static/images/img2grid/assets/generated/feature-strip-number.webp"); }
.swatch-strip { background-image: url("/static/images/img2grid/assets/generated/feature-strip-palette.webp"); }

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  padding: 0;
  background: transparent;
}

.steps article {
  position: relative;
  overflow: hidden;
  padding: 24px 18px 22px;
}

.step-card h3 {
  min-height: 48px;
  color: var(--navy);
}

.step-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  color: #fff;
  background: var(--coral);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
}

.step-visual {
  position: relative;
  min-height: 154px;
  margin: 4px 0 18px;
  background: #f5fcff center / contain no-repeat;
  border: 8px solid #f7fbff;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(136, 200, 237, 0.42), var(--soft-shadow);
}

.step-upload .step-visual { background-image: url("/static/images/img2grid/assets/generated/hero-original-pet.webp"); background-size: cover; }
.step-grid .step-visual { background-image: url("/static/images/img2grid/assets/generated/icons/grid-size.webp"); background-size: 84px 84px; }
.step-colors .step-visual { background-image: url("/static/images/img2grid/assets/generated/icons/colors-palette.webp"); background-size: 88px 88px; }
.step-guide .step-visual { background-image: url("/static/images/img2grid/assets/generated/hero-number-guide-pixel-dog.webp"); background-size: cover; }
.step-recreate .step-visual { background-image: url("/static/images/img2grid/assets/generated/section-paint-mode.webp"); background-size: cover; }

.step-grid .step-visual::before {
  content: "32x32";
  position: absolute;
  top: 18px;
  right: 14px;
  color: var(--navy);
  font-weight: 900;
}

.step-colors .step-visual::after,
.step-recreate .step-visual::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 22px;
  background: linear-gradient(90deg, #a66a2a 0 10%, #f5c983 10% 20%, #ff596d 20% 30%, #e85b35 30% 40%, #8abc35 40% 50%, #6bd0cf 50% 60%, #6652a8 60% 70%, #47433d 70% 80%, #d9d0c5 80%);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(7, 22, 66, 0.1);
}

.difference-panel,
.import-card,
.palette-tool {
  grid-template-columns: 0.88fr 1.12fr;
  align-items: center;
}

.difference-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.difference-cards article {
  padding: 22px;
}

.usecase-artwork {
  width: min(880px, 100%);
  min-height: 360px;
  margin: 0 auto 28px;
  background: url("/static/images/img2grid/assets/generated/usecase-collage-art.webp") center / contain no-repeat, #f5fcff;
  border: 10px solid #fff;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.usecase-grid,
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.case-art {
  display: block;
  height: 300px;
  margin-bottom: 18px;
  background-color: #f7fbff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(7, 22, 66, 0.08);
}

.album { background-image: url("/static/images/img2grid/assets/generated/usecases/album-cover.webp"); }
.face { background-image: url("/static/images/img2grid/assets/generated/usecases/portrait-icon.webp"); }
.shirt { background-image: url("/static/images/img2grid/assets/generated/usecases/shirt-pattern.webp"); }
.food { background-image: url("/static/images/img2grid/assets/generated/usecases/food-icon.webp"); }
.poster { background-image: url("/static/images/img2grid/assets/generated/usecases/room-poster.webp"); }
.item { background-image: url("/static/images/img2grid/assets/generated/usecases/custom-item.webp"); }

.import-logo-badge {
  display: block;
  width: min(280px, 52%);
  height: auto;
  margin: -4px 0 22px;
  filter: drop-shadow(0 8px 18px rgba(19, 57, 99, 0.08));
}

.compare-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.compare-table div {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.compare-table div:first-child {
  color: #fff;
  background: #2771bd;
}

.compare-table strong,
.compare-table span {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 850;
}

.compare-table span:nth-child(2),
.compare-table strong:nth-child(2) {
  border-left: 1px solid var(--line);
}

.palette-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.sample-thumb {
  width: min(100%, 520px);
  aspect-ratio: 1.62;
  background: url("/static/images/img2grid/assets/generated/palette-tool-art.webp") center / cover no-repeat, #9bd6ff;
  border: 10px solid #fff;
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.palette-options {
  display: grid;
  gap: 16px;
}

.palette-options article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
}

.palette-options article.active {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 69, 109, 0.14), var(--soft-shadow);
}

.palette-options strong {
  font-size: 22px;
}

.palette-options span {
  color: var(--muted);
  font-weight: 800;
}

.example-flow {
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

#examples,
.examples,
.how-section {
  background: transparent;
}

.example-flow span {
  aspect-ratio: 1;
  background-color: #8fd6ff;
  background-position: center;
  background-size: cover;
  border: 6px solid #fff;
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.example-card:nth-child(1) .example-flow span:nth-of-type(1) { background-image: url("/static/images/img2grid/assets/generated/hero-original-pet.webp"); }
.example-card:nth-child(1) .example-flow span:nth-of-type(2) { background-image: url("/static/images/img2grid/assets/generated/hero-pixel-grid-pet.webp"); }
.example-card:nth-child(1) .example-flow span:nth-of-type(3) { background-image: url("/static/images/img2grid/assets/generated/hero-number-guide-pet.webp"); }
.example-card:nth-child(2) .example-flow span { background-image: url("/static/images/img2grid/assets/generated/feature-grid-art.webp"); }
.example-card:nth-child(3) .example-flow span { background-image: url("/static/images/img2grid/assets/generated/palette-tool-art.webp"); }

.example-flow i {
  height: 12px;
  background: #2771bd;
  border-radius: 99px;
}

.faq-list {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.faq-list details {
  padding: 22px 26px;
}

.faq-list summary {
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.faq-list p {
  margin: 14px 0 0;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 24px 0 18px;
  color: var(--navy);
  background: #fffdf8 !important;
  border-top: 0;
  box-shadow: none;
}

.footer-wrap {
  width: min(95%, 1368px);
  margin: 0 auto;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand-block {
  max-width: 560px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  color: var(--navy);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(2px 2px 0 rgba(7, 22, 66, 0.16));
}

.footer-brand-block p {
  margin: 0;
  color: #796d78;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.62;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #827682;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.footer-email i {
  width: 15px;
  color: #827682;
  font-size: 14px;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer-email:hover {
  color: var(--navy);
}

.footer-email:hover i {
  color: var(--coral);
  transform: translateY(-1px);
}

.footer-link-columns {
  display: grid;
  grid-template-columns: 140px 150px;
  gap: 44px 58px;
  min-width: 330px;
  max-width: 360px;
  align-content: start;
  justify-items: start;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 900;
}

.footer-link-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-link-title {
  margin: 0 0 4px;
  color: #4c4350;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.footer-link-group a {
  color: #827682;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer-link-group a:hover {
  color: var(--coral);
  transform: translateY(-1px);
}

.footer-copyright {
  margin: 34px 0 0;
  color: #9b929a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.6;
}

.legal-page main {
  min-height: 70vh;
}

.legal-static-page {
  position: relative;
  width: min(92%, 1180px);
  margin: 0 auto;
  padding: 82px 0 96px;
}

.legal-static-page::before {
  content: "";
  position: absolute;
  inset: 30px 50% auto auto;
  z-index: 0;
  width: min(92vw, 980px);
  height: 320px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 24px 24px;
  pointer-events: none;
  transform: translateX(50%);
}

.legal-static-wrap {
  position: relative;
  z-index: 1;
}

.legal-static-header {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.legal-static-header h1 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: clamp(46px, 5vw, 76px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
}

.legal-static-header p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 auto;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.55;
}

.legal-static-panel {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px);
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(152, 207, 233, 0.75);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.legal-static-panel h2 {
  margin: 34px 0 12px;
  color: var(--navy);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 900;
  line-height: 1.12;
}

.legal-static-panel h2:first-child {
  margin-top: 0;
}

.legal-static-panel p,
.legal-static-panel li {
  color: #536985;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.78;
}

.legal-static-panel p {
  margin-bottom: 16px;
}

.legal-static-panel ul {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding-left: 1.2rem;
}

.legal-static-panel strong {
  color: var(--navy);
}

.legal-static-panel a {
  color: var(--coral);
  font-weight: 900;
  text-decoration: none;
}

.legal-static-panel a:hover {
  text-decoration: underline;
}

.legal-static-meta {
  display: inline-flex;
  margin-bottom: 20px !important;
  padding: 8px 12px;
  color: var(--coral) !important;
  background: #fff5f7;
  border: 1px solid rgba(255, 69, 109, 0.18);
  border-radius: 10px;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

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

  .nav-links {
    display: none;
  }

  .hero,
  .converter-panel,
  .difference-panel,
  .import-card,
  .palette-tool {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .feature-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    padding: 10px 12px;
  }

  .brand {
    gap: 6px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-text {
    font-size: 26px;
  }

  .site-header .header-cta {
    display: none;
  }

  .header-actions {
    justify-self: end;
  }

  .hero {
    padding-top: 56px;
  }

  body.img2grid-page h1 {
    font-size: 54px;
  }

  .hero-lede {
    font-size: 20px;
  }

  .mini-features,
  .preview-steps,
  .feature-grid,
  .steps,
  .difference-cards,
  .usecase-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .mini-features div + div {
    border-top: 1px solid #e9d8be;
    border-left: 0;
  }

  .step-arrow {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .art-card {
    aspect-ratio: 1;
    min-height: 260px;
  }

  .site-footer {
    padding: 32px 0 24px;
  }

  .footer-main {
    gap: 24px;
  }

  .footer-brand-block {
    max-width: 100%;
  }

  .footer-link-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 20px;
    font-size: 12px;
  }

  .footer-link-group {
    min-width: 0;
  }

  .footer-link-title {
    font-size: 11px;
  }

  .footer-copyright {
    margin-top: 20px;
    font-size: 11px;
  }

  .legal-static-page {
    padding: 58px 0 72px;
  }

  .legal-static-header {
    text-align: left;
  }

  .legal-static-header h1 {
    font-size: 44px;
  }

  .legal-static-header p:not(.eyebrow) {
    margin-left: 0;
    font-size: 18px;
  }

  .legal-static-panel {
    border-radius: 22px;
  }
}

@media (max-width: 520px) {
  .section-pad {
    padding: 62px 0;
  }

  body.img2grid-page h1 {
    font-size: 44px;
  }

  body.img2grid-page h2 {
    font-size: 34px;
  }

  .btn {
    width: 100%;
  }

  .converter-panel,
  .difference-panel,
  .import-card,
  .palette-tool {
    padding: 18px;
  }

  .segmented {
    grid-template-columns: 1fr;
  }

  .legal-static-header h1 {
    font-size: 38px;
  }

  .legal-static-panel p,
  .legal-static-panel li {
    font-size: 16px;
  }
}

/* Neat Download Manager download site */
body.ndm-page .brand-text {
  font-size: clamp(18px, 2vw, 26px);
}

body.ndm-page .site-header {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr) minmax(180px, auto);
}

.download-symbol,
.download-platform-icon,
.mini-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.download-symbol::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 3px;
  width: 6px;
  height: 15px;
  background: currentColor;
  border-radius: 4px;
}

.download-symbol::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border-right: 6px solid currentColor;
  border-bottom: 6px solid currentColor;
  transform: rotate(45deg);
  border-radius: 2px;
}

.ndm-shell {
  padding-bottom: 40px;
}

.ndm-hero,
.core-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(560px, 1.1fr);
  gap: 42px;
  align-items: center;
  min-height: 760px;
  padding: 84px 0 52px;
}

.ndm-hero h1,
.core-hero h1 {
  max-width: 780px;
}

.download-status {
  max-width: 720px;
  min-height: 28px;
  margin: 12px 0 0;
  color: var(--navy) !important;
  font-size: 15px;
}

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

.download-card,
.core-fact-card,
.core-section,
.related-pages article {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--soft-shadow);
}

.download-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px;
}

.download-card.requires-app {
  background: rgba(255, 250, 240, 0.93);
}

.download-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.download-card h2 {
  margin: 0 0 5px;
  font-size: 24px;
}

.download-card p,
.download-card dd,
.download-card dt {
  margin: 0;
}

.download-platform-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--sky);
  color: var(--navy);
  box-shadow: inset 0 0 0 2px rgba(7, 22, 66, 0.08);
}

.download-platform-icon::before,
.download-icon::before,
.desktop-icon::before,
.extension-icon::before,
.merge-icon::before,
.speed-icon::before,
.compare-icon::before {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  font-weight: 900;
}

.windows-icon::before { content: "Win"; font-size: 13px; }
.mac-icon::before { content: "Mac"; font-size: 13px; }
.chrome-icon::before { content: "Ch"; font-size: 13px; }
.firefox-icon::before { content: "Fx"; font-size: 13px; }
.download-icon::before { content: "↓"; font-size: 28px; }
.desktop-icon::before { content: "PC"; font-size: 13px; }
.extension-icon::before { content: "+"; font-size: 28px; }
.merge-icon::before { content: "M"; font-size: 18px; }
.speed-icon::before { content: ">>"; font-size: 16px; }
.compare-icon::before { content: "A/B"; font-size: 12px; }

.version-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.version-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  color: var(--navy);
  background: #f5fcff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.download-meta {
  display: grid;
  gap: 8px;
}

.download-meta div,
.core-fact-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 232, 245, 0.8);
}

.download-meta dt,
.core-fact-card span {
  color: var(--muted);
  font-weight: 850;
}

.download-meta dd,
.core-fact-card strong {
  color: var(--navy);
  font-weight: 900;
  text-align: right;
}

.download-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding-top: 4px;
}

.download-card-actions .btn {
  min-height: 48px;
  padding-inline: 20px;
}

.text-link {
  color: var(--coral) !important;
  font-weight: 900;
}

.btn.is-counting {
  pointer-events: none;
  opacity: 0.82;
}

.ndm-facts-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 28px;
  align-items: start;
}

.ndm-screenshot {
  margin: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ndm-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.ndm-screenshot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.ndm-info-table.compare-table div,
.core-table.compare-table div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ndm-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ndm-steps article {
  min-height: 270px;
}

.ndm-panel {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.ndm-inline-actions {
  margin-bottom: 0;
}

.ndm-note-cards article {
  min-height: 180px;
}

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

.core-hero {
  min-height: 520px;
}

.core-fact-card {
  display: grid;
  align-self: center;
  padding: 28px;
}

.core-content {
  display: grid;
  gap: 22px;
  max-width: 1060px;
}

.core-section {
  padding: clamp(24px, 4vw, 38px);
}

.core-section h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 2.5vw, 42px);
}

.core-section p,
.core-section li {
  color: #536985;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.78;
}

.core-section ul,
.core-section ol {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 1.4rem;
}

.core-table {
  margin-top: 20px;
}

.related-pages .usecase-grid article {
  min-height: 210px;
}

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

  .ndm-hero,
  .core-hero,
  .ndm-facts-grid,
  .ndm-panel {
    grid-template-columns: 1fr;
  }

  .download-center,
  .ndm-fix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ndm-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ndm-hero,
  .core-hero {
    min-height: auto;
    padding-top: 56px;
  }

  .download-center,
  .download-card-head,
  .download-card-actions,
  .ndm-fix-grid,
  .ndm-steps {
    grid-template-columns: 1fr;
  }

  .download-card-head {
    display: grid;
  }

  .download-meta div,
  .core-fact-card div {
    display: grid;
  }

  .download-meta dd,
  .core-fact-card strong {
    text-align: left;
  }
}

@media (max-width: 520px) {
  body.ndm-page .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  body.ndm-page .brand {
    min-width: 0;
  }

  body.ndm-page .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body.ndm-page .brand-text {
    max-width: 150px;
    font-size: 17px;
    line-height: 0.98;
    white-space: normal;
  }

  body.ndm-page .header-actions {
    min-width: 0;
    gap: 8px;
  }

  body.ndm-page .language-switcher summary {
    min-height: 40px;
    padding: 0 10px;
    gap: 6px;
    font-size: 0.8rem;
  }

  body.ndm-page .language-switcher summary span {
    width: 18px;
    height: 18px;
    font-size: 0.68rem;
  }
}
