* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #172033;
  background: #f5f7fb;
  font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.site-header {
  height: 64px;
  min-height: 64px;
  background: #fff;
  border-bottom: 1px solid #e2e7f0;
}
.header-inner {
  max-width: 1104px;
  min-height: 64px;
  margin: auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #172033;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}
.brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1769e0;
  color: #fff;
}
.tool-nav {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tool-nav a {
  position: relative;
  color: #44506a;
  text-decoration: none;
  padding: 7px 8px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 13px;
}
.i-plan-nav {
  min-width: 72px;
  padding: 7px 14px !important;
  background: #1769e0;
  color: #fff !important;
  border-radius: 9px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.privacy-badge {
  font-size: 12px;
  color: #28734d;
  white-space: nowrap;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  background: #172033;
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
}
.i-plan-banner {
  max-width: 1104px;
  margin: 2rem auto;
  padding: 18px 22px;
  background: #fff6c9;
  border: 1px solid #ead67c;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.i-plan-banner div {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.i-plan-banner a {
  background: #172033;
  color: #fff;
  padding: 9px 15px;
  border-radius: 9px;
  text-decoration: none;
  white-space: nowrap;
}
.workspace {
  max-width: 880px;
  margin: auto;
  padding: 0 16px 48px;
}
.hero {
  text-align: center;
  margin: 34px 0;
}
.eyebrow {
  color: #1769e0;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.15;
  margin: 8px;
}
.panel {
  background: #fff;
  border: 1px solid #e1e6f0;
  border-radius: 16px;
  padding: 22px;
  margin: 16px 0;
  box-shadow: 0 5px 18px #16213b0a;
}
.panel h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
.panel h2 span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9f1ff;
  color: #1769e0;
  margin-right: 8px;
}
.drop {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 150px;
  border: 2px dashed #aab9cf;
  border-radius: 13px;
  background: #fafcff;
  cursor: pointer;
}
.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.drop strong {
  font-size: 18px;
  color: #1769e0;
}
.drop small {
  display: block;
}
.selection {
  margin-top: 12px;
}
.file-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid #edf0f5;
}
.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.options label {
  display: grid;
  gap: 7px;
  font-weight: 650;
}
.options select,
.options input[type='color'] {
  height: 42px;
  border: 1px solid #bdc8d8;
  border-radius: 8px;
  background: #fff;
}
.help {
  color: #66728a;
  margin: 9px 0;
}
.readiness {
  padding: 10px 12px;
  background: #eef5ff;
  border-radius: 9px;
}
.primary,
button {
  border: 1px solid #bcc7d8;
  background: #fff;
  border-radius: 9px;
  padding: 10px 15px;
  font-weight: 700;
  cursor: pointer;
}
.primary {
  min-width: 150px;
  background: #1769e0;
  color: #fff;
  border-color: #1769e0;
  font-size: 16px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.results {
  display: grid;
  gap: 14px;
}
.result {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #e3e8f0;
  border-radius: 12px;
  padding: 12px;
}
.result-preview {
  position: relative;
  width: 128px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  background: #eef2f8;
}
.result-preview img {
  display: block;
  width: 128px;
  height: 96px;
  object-fit: contain;
  background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 50%/16px 16px;
}
.result-preview-hint {
  position: absolute;
  inset: auto 0 0;
  padding: 5px;
  background: #101827d9;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.result-preview:hover .result-preview-hint,
.result-preview:focus-visible .result-preview-hint {
  opacity: 1;
}
.result-preview:focus-visible {
  border-color: #70a7f2;
  outline: 3px solid #1769e055;
  outline-offset: 2px;
}
.result h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.result-actions {
  display: grid;
  gap: 7px;
}
body.lightbox-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #090d16ed;
}
.lightbox[hidden] {
  display: none;
}
.lightbox-panel {
  width: min(1200px, 100%);
  height: min(900px, calc(100dvh - 40px));
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  box-shadow: 0 24px 80px #0009;
}
.lightbox-header,
.lightbox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lightbox-header h2,
.lightbox-header p {
  margin: 0;
  overflow-wrap: anywhere;
}
.lightbox-header p {
  color: #cbd5e1;
}
.lightbox-header button,
.lightbox-actions button,
.lightbox-actions a,
.lightbox-nav {
  min-width: 44px;
  min-height: 44px;
}
.lightbox-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.lightbox-image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}
.lightbox-nav {
  color: #fff;
  background: #273449;
  border-color: #52627b;
}
.lightbox-actions {
  justify-content: flex-end;
}
.lightbox-actions .download {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 9px;
  background: #1769e0;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.notice {
  max-width: 880px;
  margin: 0 auto 30px;
  padding: 0 16px;
  color: #68738a;
}
.footer-tagline {
  text-align: center;
  font-weight: 700;
}
.notice details {
  background: #fff;
  border: 1px solid #e1e6f0;
  border-radius: 12px;
  padding: 12px;
}
.notice a {
  color: #1769e0;
}
@media (max-width: 700px) {
  .site-header {
    height: auto;
  }
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding-block: 10px;
  }
  .brand {
    margin-right: auto;
  }
  .privacy-badge {
    margin-left: auto;
  }
  .tool-nav {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
  .i-plan-banner {
    margin: 16px;
    align-items: flex-start;
    flex-direction: column;
  }
  .options {
    grid-template-columns: 1fr;
  }
  .result {
    grid-template-columns: 1fr;
  }
  .result-preview {
    width: 100%;
  }
  .result-preview img {
    width: 100%;
    height: 180px;
  }
  .result-preview-hint {
    opacity: 1;
  }
  .lightbox {
    padding: 8px;
  }
  .lightbox-panel {
    height: calc(100dvh - 16px);
    padding: 10px;
  }
  .lightbox-header {
    align-items: flex-start;
  }
  .lightbox-stage {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 4px;
  }
  .lightbox-nav {
    padding: 8px 4px;
  }
  .lightbox-actions {
    flex-wrap: wrap;
  }
  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 420px) {
  .workspace {
    padding-inline: 10px;
  }
  .panel {
    padding: 15px;
  }
  .tool-nav a {
    font-size: 12px;
    padding: 5px;
  }
  .results-head div {
    display: flex;
    flex-wrap: wrap;
  }
  [data-tooltip]::after {
    position: fixed;
    width: auto;
    left: 10px;
    right: 10px;
    top: 66px;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .result-preview-hint {
    transition: none;
  }
}
