:root {
  font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:#203a43;
  background:#f6f7f3;
  font-synthesis:none;
  --teal:#107c70;
  --muted:#73848a;
  --border:#e1e7e2;
  --ink:#203a43
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,input,select {
  font:inherit
}

button,select {
  cursor:pointer
}

button {
  touch-action:manipulation
}

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

[hidden] {
  display:none!important
}

.wrap {
  max-width:1220px;
  margin:0 auto;
  padding-left:38px;
  padding-right:38px
}

.site-header {
  height:96px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--border)
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  font-size:21px;
  font-weight:750;
  letter-spacing:-.7px
}

.brand-mark {
  display:grid;
  place-content:center;
  position:relative;
  width:32px;
  height:32px;
  border-radius:9px;
  background:var(--teal);
  font-size:21px;
  color:#fff;
  letter-spacing:-3px;
  padding-right:4px
}

.brand-mark span {
  position:absolute;
  right:5px;
  bottom:0;
  color:#a6dbc7;
  font-size:26px
}

.header-note {
  font-size:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:7px
}

.status-dot {
  display:inline-block;
  width:6px;
  height:6px;
  flex-shrink:0;
  background:#23a281;
  border-radius:50%
}

.intro {
  padding:45px 0 33px
}

.eyebrow {
  margin:0 0 10px;
  font-size:10px;
  font-weight:750;
  letter-spacing:1.7px;
  color:var(--teal)
}

h1 {
  margin:0;
  color:#173740;
  font-size:36px;
  font-weight:700;
  letter-spacing:-1.2px;
  line-height:1.4
}

.intro-copy {
  margin:13px 0 0;
  font-size:14px;
  color:var(--muted);
  line-height:1.8
}

.mobile-break {
  display:none
}

.workspace {
  display:grid;
  grid-template-columns:minmax(320px,.78fr) minmax(0,1.22fr);
  gap:22px;
  align-items:start
}

.card {
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 3px 10px #203a4303
}

h2 {
  margin:0;
  font-size:17px;
  font-weight:650;
  letter-spacing:-.2px
}

.input-card {
  padding:26px
}

.card-heading {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:27px
}

.card-heading .eyebrow {
  font-size:9px;
  letter-spacing:1.4px;
  margin-bottom:6px
}

.text-button {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px 0 8px 8px;
  font-size:12px
}

.text-button span {
  margin-left:5px;
  font-size:17px
}

.text-button:hover {
  color:var(--teal)
}

fieldset {
  border:0;
  padding:0;
  margin:0;
  min-width:0
}

fieldset+fieldset {
  margin-top:27px;
  padding-top:25px;
  border-top:1px solid var(--border)
}

legend {
  float:left;
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:650;
  margin:0 0 18px;
  padding:0
}

legend+* {
  clear:both
}

.step {
  width:21px;
  height:21px;
  display:inline-grid;
  place-content:center;
  background:#edf4ef;
  border-radius:6px;
  font-size:9px;
  letter-spacing:.3px;
  color:var(--teal)
}

.field {
  min-width:0;
  flex:1
}

label {
  display:block;
  color:#526972;
  font-size:12px;
  font-weight:500;
  margin-bottom:8px
}

input,select {
  width:100%;
  height:43px;
  border:1px solid #dce4df;
  border-radius:8px;
  color:var(--ink);
  background:#fbfcfa;
  padding:0 12px;
  outline:none;
  font-size:14px;
  transition:border-color .15s,box-shadow .15s
}

input {
  font-variant-numeric:tabular-nums
}

select {
  padding-right:23px
}

input:focus,select:focus {
  border-color:#4eac98;
  box-shadow:0 0 0 3px #107c7014
}

button:focus-visible,summary:focus-visible,a:focus-visible {
  outline:3px solid #5dc9b6;
  outline-offset:4px
}

input::-webkit-inner-spin-button {
  opacity:.5
}

.input-unit {
  position:relative
}

.input-unit input {
  padding-right:35px
}

.input-unit>span {
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:12px;
  color:#84938e;
  pointer-events:none
}

.field-row {
  display:flex;
  gap:12px;
  align-items:end
}

.fov-row .field:first-child {
  flex:1.3
}

.fov-row.both-fov {
  display:grid;
  grid-template-columns:1fr 1fr
}

.fov-row.both-fov .field:first-child {
  grid-column:1 / -1
}

.error-message>p {
  margin:0
}

.fov-corrections {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px
}

.fov-corrections button {
  border:1px solid #dca99e;
  border-radius:7px;
  background:#fffaf7;
  padding:8px 10px;
  color:#954d3e;
  font-size:11px
}

.fov-corrections button:hover {
  background:#ffede6
}

.field-hint {
  font-size:10px;
  line-height:1.8;
  color:#82918f;
  margin:9px 0 0
}

.preset-field {
  margin-top:20px
}

.resolution-row {
  margin-top:14px;
  gap:9px
}

.multiply {
  color:#a0aaa6;
  padding-bottom:13px;
  font-size:15px
}

.segmented {
  display:flex;
  gap:4px;
  padding:4px;
  background:#f1f4f0;
  border:1px solid #e8ede7;
  border-radius:9px;
  margin-bottom:18px
}

.segmented button {
  flex:1;
  border:0;
  border-radius:6px;
  background:transparent;
  padding:8px;
  font-size:12px;
  color:var(--muted)
}

.segmented .selected {
  background:#fff;
  box-shadow:0 1px 4px #1c3d3120;
  color:var(--teal);
  font-weight:650
}

.unit-field {
  flex:0 0 76px
}

.target-row:has(.target-height-field:not([hidden])) {
  gap:9px
}

.target-row:has(.target-height-field:not([hidden])) .unit-field {
  flex-basis:66px
}

.distance-row {
  margin-top:17px
}

.input-footer {
  font-size:11px;
  color:#84938e;
  margin:24px 0 0;
  padding-top:18px;
  border-top:1px solid var(--border)
}

.input-footer span {
  color:var(--teal);
  font-size:15px;
  margin-right:7px
}

.results-content {
  display:grid;
  gap:16px
}

.result-card {
  padding:25px 28px;
  background:linear-gradient(125deg,#fff 30%,#f7fbf7)
}

.result-card .card-heading {
  margin-bottom:20px
}

.live-badge {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  color:var(--teal);
  background:#eaf5ee;
  border:1px solid #d8ebdf;
  border-radius:20px;
  padding:5px 9px;
  white-space:nowrap
}

.live-badge .status-dot {
  width:5px;
  height:5px
}

.result-caption {
  font-size:12px;
  color:var(--muted);
  margin:0 0 9px
}

.pixel-result {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:baseline;
  margin:0;
  font-size:44px;
  line-height:1.25;
  font-weight:650;
  letter-spacing:-1.8px;
  color:#145648;
  font-variant-numeric:tabular-nums
}

.result-times {
  font-size:27px;
  font-weight:350;
  color:#94afa3;
  align-self:center
}

.result-unit {
  font-size:15px;
  letter-spacing:0;
  font-weight:400;
  color:#78968b;
  margin-left:1px
}

.metric-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  margin-top:24px;
  padding-top:19px;
  border-top:1px solid #e0eae1;
  gap:18px
}

.metric-grid>div+div {
  padding-left:24px;
  border-left:1px solid #e0eae1
}

.metric-grid p {
  font-size:11px;
  color:#7a8a82;
  margin:0 0 7px
}

.metric-grid strong {
  font-size:23px;
  letter-spacing:-.5px;
  font-weight:600;
  font-variant-numeric:tabular-nums
}

.metric-unit {
  margin-left:6px;
  font-size:11px;
  color:#83978b
}

.notice {
  font-size:11px;
  line-height:1.8;
  margin-top:17px;
  padding:10px 12px;
  border-radius:7px;
  background:#fff6df;
  color:#947222
}

.clipping-result {
  margin-top:14px;
  border-radius:8px;
  border:1px solid #ecdcb2;
  background:#fffcf3;
  padding:12px 14px
}

.clipping-result p {
  margin:0 0 8px;
  font-size:11px;
  color:#8e6b21
}

.clipping-result>div {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:11px;
  line-height:1.9;
  color:#7d7c69
}

.clipping-result strong {
  font-weight:550;
  color:#596b60
}

.preview-card {
  padding:22px 25px 17px
}

.preview-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:17px;
  gap:10px
}

.preview-heading h2,.detail-card h2 {
  font-size:13px
}

.image-resolution {
  font-size:10px;
  color:#8b9992;
  font-variant-numeric:tabular-nums;
  margin:-7px 0 14px
}

.image-resolution>span {
  margin-left:7px;
  color:#61796c
}

.download-button {
  border:1px solid #cce3d6;
  border-radius:7px;
  background:#eef7f0;
  color:var(--teal);
  padding:7px 10px;
  font-size:11px;
  white-space:nowrap
}

.download-button:hover:not(:disabled) {
  background:#e0f0e5
}

.download-button:disabled {
  opacity:.45;
  cursor:not-allowed
}

.image-unavailable {
  font-size:12px;
  line-height:1.8;
  color:#819488;
  text-align:center;
  padding:15px
}

.image-status {
  margin:10px 0 0;
  font-size:11px;
  line-height:1.8;
  color:#8e6b21
}

.preview-stage {
  height:225px;
  background:#f7f9f6;
  padding:12px;
  border-radius:9px;
  border:1px solid #e4ebe4;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden
}

.preview-stage canvas {
  display:block;
  max-width:100%;
  max-height:100%;
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 2px 3px #183d2d10)
}

.preview-trigger {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:transparent;
  cursor:zoom-in;
  border-radius:4px;
}

.viewer-open {
  overflow:hidden;
}

.image-viewer {
  width:min(96vw, 1440px);
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px);
  padding:0;
  border:1px solid var(--border);
  border-radius:14px;
  color:var(--ink);
  background:#fff;
  box-shadow:0 20px 80px #102b4560;
}

.image-viewer::backdrop {
  background:#102b45b8;
}

.viewer-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
  padding:16px 20px;
}

.viewer-header p {
  margin:6px 0 0;
  font-size:12px;
  color:var(--muted);
}

.viewer-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.viewer-actions button {
  border:1px solid var(--border);
  border-radius:7px;
  padding:9px 12px;
  background:#f7f9f6;
  color:var(--ink);
  font-size:12px;
}

.viewer-actions button[aria-pressed=true] {
  color:#fff;
  background:var(--teal);
  border-color:var(--teal);
}

.viewer-viewport {
  height:min(72dvh, 900px);
  overflow:auto;
  background:#dce5df;
  overscroll-behavior:contain;
}

.viewer-viewport canvas {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.viewer-viewport.original-size canvas {
  width:auto;
  height:auto;
  max-width:none;
  max-height:none;
}

.viewer-hint {
  margin:0;
  padding:12px 20px;
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
}

.preview-legend {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:12px;
  gap:12px;
  font-size:10px;
  color:#7b8b83
}

.preview-legend>span:first-child {
  display:flex;
  align-items:center;
  gap:6px
}

.preview-legend i {
  width:8px;
  height:8px;
  background:#0c8c78;
  border-radius:2px
}

.preview-note {
  font-size:9px;
  margin-top:8px;
  color:#98a39d
}

.detail-card {
  padding:20px 25px
}

.detail-grid {
  margin:16px 0 0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px 16px
}

.detail-grid>div {
  min-width:0
}

dt {
  font-size:10px;
  color:#8b9992;
  margin-bottom:6px
}

dd {
  font-size:12px;
  line-height:1.6;
  margin:0;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere
}

.explanation {
  margin-top:28px;
  padding:0 3px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border)
}

summary {
  list-style:none;
  font-size:12px;
  color:#6a7e77;
  cursor:pointer;
  padding:20px 0;
  display:flex;
  justify-content:space-between;
  gap:20px
}

summary::-webkit-details-marker {
  display:none
}

summary>span {
  color:#96a39b
}

details[open] summary>span {
  transform:rotate(45deg)
}

.explanation-body {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:35px;
  padding:0 0 22px
}

.explanation-body h3 {
  font-size:12px;
  margin:0 0 10px;
  color:#536d61
}

.explanation-body p {
  font-size:11px;
  color:#7a8c81;
  line-height:1.9;
  margin:8px 0
}

.explanation-body code {
  font-size:11px;
  color:#476c5d;
  background:#eaf0e9;
  padding:2px 4px;
  border-radius:3px
}

.site-footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding-top:25px;
  padding-bottom:32px;
  font-size:10px;
  color:#9aa69c
}

.footer-separator {
  margin:0 10px;
  color:#c1c9bf
}

.error-message {
  font-size:13px;
  line-height:1.8;
  color:#a83f35;
  padding:14px 18px;
  border-radius:10px;
  border:1px solid #efcec7;
  background:#fff3ef;
  margin-bottom:16px
}

.empty-results {
  min-height:350px;
  padding:65px 25px;
  text-align:center
}

.empty-results>span {
  display:block;
  color:#b8cbc1;
  font-size:40px;
  font-weight:200;
  margin-bottom:25px
}

.empty-results h2 {
  color:#708779;
  font-size:18px
}

.empty-results p {
  color:#90a095;
  font-size:12px;
  line-height:1.8
}

input[aria-invalid=true],select[aria-invalid=true] {
  border-color:#cb8f81
}

@media(min-width:1400px) {
  .intro {
    padding-top:50px
  }
  .workspace {
    gap:25px
  }
  .preview-stage {
    height:240px
  }
}

@media(max-width:900px) {
  .wrap {
    padding-left:24px;
    padding-right:24px
  }
  .workspace {
    grid-template-columns:minmax(290px,.9fr) minmax(0,1.1fr);
    gap:16px
  }
  .input-card {
    padding:23px 20px
  }
  .result-card {
    padding:23px 22px
  }
  .pixel-result {
    font-size:35px;
    gap:7px
  }
  .metric-grid strong {
    font-size:20px
  }
  .metric-grid>div+div {
    padding-left:15px
  }
  .preview-card {
    padding:20px
  }
  .preview-stage {
    height:205px
  }
  .detail-card {
    padding:20px
  }
  .detail-grid {
    grid-template-columns:1fr;
    gap:14px
  }
  .detail-grid>div {
    display:flex;
    justify-content:space-between;
    gap:14px
  }
  dt {
    margin:0
  }
  dd {
    text-align:right
  }
  .target-row:has(.target-height-field:not([hidden])) {
    flex-wrap:wrap
  }
  .target-row:has(.target-height-field:not([hidden])) .field:not(.unit-field) {
    flex-basis:calc(50% - 5px)
  }
  .target-row:has(.target-height-field:not([hidden])) .unit-field {
    flex-basis:100%
  }
}

@media(max-width:680px) {
  .wrap {
    padding-left:20px;
    padding-right:20px
  }
  .site-header {
    height:74px
  }
  .brand {
    font-size:19px
  }
  .brand-mark {
    width:29px;
    height:29px;
    font-size:19px
  }
  .header-note {
    font-size:10px
  }
  .intro {
    padding-top:29px;
    padding-bottom:26px
  }
  .intro>.eyebrow {
    font-size:9px;
    letter-spacing:1.2px
  }
  h1 {
    font-size:29px;
    letter-spacing:-.7px
  }
  .intro-copy {
    font-size:12px;
    max-width:370px
  }
  .workspace {
    grid-template-columns:1fr;
    gap:20px
  }
  .input-card {
    padding:23px
  }
  .card-heading {
    margin-bottom:23px
  }
  .target-row:has(.target-height-field:not([hidden])) {
    flex-wrap:nowrap
  }
  .target-row:has(.target-height-field:not([hidden])) .field:not(.unit-field) {
    flex-basis:0
  }
  .target-row:has(.target-height-field:not([hidden])) .unit-field {
    flex-basis:66px
  }
  .result-card {
    padding:25px
  }
  .pixel-result {
    font-size:40px;
    gap:9px
  }
  .metric-grid strong {
    font-size:23px
  }
  .preview-stage {
    height:230px
  }
  .detail-grid {
    grid-template-columns:1fr 1fr;
    gap:19px
  }
  .detail-grid>div {
    display:block
  }
  dd {
    text-align:left;
    margin-top:5px
  }
  .explanation-body {
    grid-template-columns:1fr;
    gap:15px
  }
  .site-footer {
    font-size:9px;
    gap:12px;
    flex-wrap:wrap;
    padding-bottom:25px
  }
}

@media(max-width:360px) {
  .wrap {
    padding-left:14px;
    padding-right:14px
  }
  .header-note {
    display:none
  }
  h1 {
    font-size:27px
  }
  .mobile-break {
    display:block
  }
  .input-card,.result-card {
    padding:20px
  }
  .pixel-result {
    font-size:33px
  }
  .metric-grid strong {
    font-size:20px
  }
  .detail-grid {
    grid-template-columns:1fr
  }
  .preview-stage {
    height:190px
  }
  .live-badge {
    font-size:9px
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important
  }
}
