:root {
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#273e36;
  background:#f5f3ed;
  font-synthesis:none;
  --ink:#273e36;
  --muted:#68736b;
  --accent:#dc6748;
  --line:#dcded3;
  --paper:#fcfbf7;
  --radius:22px;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select {
  font:inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:wait;
  opacity:.5;
}
[hidden] {
  display:none!important;
}
a {
  color:inherit;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #d77852;
  outline-offset:4px;
}
button {
  touch-action:manipulation;
}
.app-shell {
  max-width:1240px;
  margin:auto;
  padding:0 44px;
}
.site-header {
  min-height:108px;
  gap:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.brand {
  display:inline-flex;
  align-items:center;
  gap:11px;
  text-decoration:none;
  font-size:28px;
  font-weight:750;
  letter-spacing:-1.4px;
}
.brand img {
  flex:none;
  border-radius:11px;
}
.brand-copy {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.brand-name {
  line-height:1;
}
.brand-descriptor {
  display:block;
  font-size:12px;
  line-height:1.4;
  font-weight:500;
  letter-spacing:.1px;
  color:var(--ink);
}
.brand-dot {
  color:var(--accent);
  margin-left:0;
}
.privacy-note {
  margin-left:auto;
  display:flex;
  gap:8px;
  align-items:center;
  font-size:12px;
  color:var(--muted);
}
.status-dot {
  width:6px;
  height:6px;
  background:#768b68;
  border-radius:50%;
}
main {
  padding-top:54px;
}
.eyebrow {
  font-size:10px;
  font-weight:750;
  letter-spacing:1.9px;
  line-height:1.7;
  margin:0 0 20px;
  color:#7b8271;
}
h1,h2,p {
  margin-top:0;
}
h1 {
  font-size:clamp(48px,5.5vw,76px);
  line-height:1.06;
  letter-spacing:-3.8px;
  font-weight:550;
  margin-bottom:25px;
}
h1 em {
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
  color:#6b795f;
}
h2 {
  font-size:26px;
  letter-spacing:-.9px;
  line-height:1.22;
  font-weight:550;
  margin-bottom:16px;
}
.intro {
  color:var(--muted);
  font-size:17px;
  line-height:1.8;
}
.home-copy {
  padding-top:24px;
}
.view#home-view {
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:40px 76px;
}
.start-card {
  background:var(--paper);
  border:1px solid var(--line);
  padding:30px;
  border-radius:var(--radius);
  align-self:start;
  box-shadow:0 6px 18px #32483204;
}
.start-card p:not(.quiet) {
  line-height:1.7;
  font-size:14px;
  color:var(--muted);
  margin-bottom:25px;
}
.step-mark {
  color:var(--accent);
  font-size:12px;
  display:block;
  font-weight:700;
  letter-spacing:1px;
  margin-bottom:27px;
}
.step-mark span {
  font-size:9px;
  letter-spacing:1.3px;
  color:#788471;
  margin-left:12px;
}
.button {
  width:100%;
  min-height:49px;
  border:1px solid transparent;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  font-size:13px;
  font-weight:650;
  text-decoration:none;
  transition:background .15s,transform .15s;
}
.button:active {
  transform:translateY(1px);
}
.primary {
  background:var(--ink);
  color:#fff;
}
.primary:hover {
  background:#3b5347;
}
.secondary {
  background:transparent;
  border-color:var(--line);
  color:var(--ink);
}
.secondary:hover {
  background:#eceee5;
}
.button+.button {
  margin-top:10px;
}
.small {
  min-height:40px;
  width:auto;
  padding:0 17px;
  white-space:nowrap;
}
.quiet {
  font-size:11px;
  line-height:1.6;
  color:#788273;
  margin:17px 0 0;
}
.centered {
  text-align:center;
}
.example-card {
  grid-column:1/-1;
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:#e7e9dd;
}
.example-images {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:3px;
}
.example-images img {
  width:100%;
  display:block;
  aspect-ratio:1.5;
  object-fit:cover;
}
.example-caption {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 22px;
  font-size:12px;
  color:#62705f;
}
.text-button {
  background:transparent;
  border:0;
  padding:6px 0;
  font-size:12px;
  color:var(--ink);
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:4px;
}
.text-button:hover {
  color:var(--accent);
}
.how-it-works {
  display:flex;
  justify-content:space-around;
  align-items:center;
  gap:15px;
  grid-column:1/-1;
  font-size:11px;
  color:var(--muted);
  padding:3px 0 17px;
}
.how-it-works b {
  color:var(--accent);
  font-size:10px;
  margin-right:10px;
}
.how-it-works i {
  font-style:normal;
  color:#a8ae9d;
}
.section-top {
  display:flex;
  gap:20px;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
}
.section-top .eyebrow {
  margin-bottom:12px;
}
.section-title {
  font-size:clamp(29px,3.5vw,44px);
  letter-spacing:-1.7px;
  margin:0;
}
.section-description {
  font-size:14px;
  color:var(--muted);
  line-height:1.7;
  margin-bottom:30px;
}
.comparison-layout,.camera-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  gap:32px;
  align-items:start;
}
.comparison-stage {
  position:relative;
  overflow:hidden;
  border-radius:18px;
  background:#e6e7dd;
  line-height:0;
  min-width:0;
  border:1px solid var(--line);
}
canvas {
  display:block;
  width:100%;
  height:auto;
}
#compare-canvas {
  touch-action:pan-y;
}
.photo-tags {
  position:absolute;
  top:15px;
  left:15px;
  right:15px;
  display:flex;
  justify-content:space-between;
  pointer-events:none;
}
.photo-tags span {
  background:#fbfaf0d9;
  border:1px solid #ffffff5f;
  padding:10px 12px;
  border-radius:5px;
  font-size:8px;
  font-weight:750;
  letter-spacing:1.6px;
  line-height:1;
}
#wipe-line {
  position:absolute;
  top:0;
  bottom:0;
  width:2px;
  background:white;
  left:50%;
  box-shadow:0 0 10px #20362d26;
  pointer-events:none;
}
#wipe-line span {
  position:absolute;
  top:50%;
  left:1px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  background:var(--paper);
  color:var(--ink);
  font-size:18px;
  border:1px solid #d8ded4;
}
.comparison-controls,.camera-controls {
  padding:24px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:18px;
}
.comparison-controls h2,.camera-controls h2 {
  font-size:25px;
}
.comparison-controls p:not(.quiet),.camera-controls p:not(.quiet) {
  color:var(--muted);
  font-size:13px;
  line-height:1.75;
}
select {
  width:100%;
  padding:12px 10px;
  background:#f5f5ee;
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--ink);
  font-size:13px;
  min-height:44px;
  margin-bottom:16px;
}
.control-label {
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:600;
  margin-bottom:9px;
}
.range-label {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:11px;
  color:var(--muted);
  margin:8px 0 13px;
}
output {
  font-variant-numeric:tabular-nums;
  color:var(--ink);
  font-size:12px;
}
input[type=range] {
  width:100%;
  accent-color:var(--ink);
  height:22px;
  margin:0 0 20px;
  cursor:pointer;
}
.separator {
  height:1px;
  background:var(--line);
  margin:24px 0;
}
.original-actions {
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding-top:16px;
  flex-wrap:wrap;
}
.save-warning {
  color:#a14729;
}
.camera-stage {
  position:relative;
  aspect-ratio:var(--frame-ratio,4/3);
  background:#26342e;
  overflow:hidden;
  border-radius:18px;
  width:100%;
}
.camera-stage video,.camera-stage>img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.camera-stage>img {
  object-fit:contain;
  opacity:.4;
  pointer-events:none;
}
.camera-message {
  position:absolute;
  left:7%;
  right:7%;
  top:50%;
  transform:translateY(-50%);
  text-align:center;
  padding:24px;
  color:#fff;
  background:#26342ee8;
  border-radius:12px;
  line-height:1.7;
  font-size:14px;
}
.camera-grid {
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(to right,transparent 33.2%,#ffffff26 33.2%,#ffffff26 33.5%,transparent 33.5%,transparent 66.5%,#ffffff26 66.5%,#ffffff26 66.8%,transparent 66.8%),linear-gradient(to bottom,transparent 33.2%,#ffffff26 33.2%,#ffffff26 33.5%,transparent 33.5%,transparent 66.5%,#ffffff26 66.5%,#ffffff26 66.8%,transparent 66.8%);
}
.viewfinder-corner {
  position:absolute;
  width:24px;
  height:24px;
  border:2px solid #ffffffa1;
  pointer-events:none;
}
.tl {
  top:16px;
  left:16px;
  border-right:0;
  border-bottom:0;
}
.tr {
  top:16px;
  right:16px;
  border-left:0;
  border-bottom:0;
}
.bl {
  bottom:16px;
  left:16px;
  border-right:0;
  border-top:0;
}
.br {
  bottom:16px;
  right:16px;
  border-left:0;
  border-top:0;
}
#overlay-controls {
  margin:24px 0;
}
#overlay-controls input {
  margin-bottom:7px;
}
.camera-frame {
  min-width:0;
}
.camera-options {
  margin-bottom:16px;
}
.camera-options summary {
  cursor:pointer;
  font-size:12px;
  font-weight:600;
  min-height:44px;
  align-content:center;
}
.camera-options p {
  margin-top:12px;
}
.shutter span {
  font-size:24px;
  line-height:1;
}
.notice {
  position:fixed;
  bottom:max(24px,env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100vw - 32px);
  width:480px;
  box-shadow:0 8px 36px #19342726;
  padding:17px 20px;
  border-radius:12px;
  background:#273e36;
  color:white;
  font-size:13px;
  line-height:1.65;
  z-index:5;
}
.download-fallback {
  padding:20px;
  border:1px solid var(--line);
  background:var(--paper);
  border-radius:14px;
  margin-top:25px;
  font-size:13px;
}
.download-fallback .button {
  max-width:250px;
}
.device-details {
  font-size:11px;
  line-height:1.8;
  color:var(--muted);
  margin-top:40px;
  border-top:1px solid var(--line);
  padding-top:16px;
}
.device-details summary {
  cursor:pointer;
  width:fit-content;
}
.device-details p {
  margin-top:12px;
  max-width:650px;
}
footer {
  display:flex;
  justify-content:space-between;
  gap:15px;
  font-size:10px;
  color:#89917f;
  padding:30px 0 25px;
}
footer a {
  text-underline-offset:3px;
  padding:10px 0;
  margin:-10px 0;
}
dialog {
  border:1px solid var(--line);
  border-radius:20px;
  padding:30px;
  background:var(--paper);
  color:var(--ink);
  max-width:440px;
  width:calc(100% - 30px);
}
dialog::backdrop {
  background:#16271b66;
  backdrop-filter:blur(3px);
}
dialog p {
  font-size:14px;
  line-height:1.7;
  color:var(--muted);
}
.dialog-actions {
  display:flex;
  gap:12px;
  margin-top:25px;
}
.dialog-actions .button+.button {
  margin:0;
}
@media(min-width:1450px) {
  .app-shell {
    max-width:1340px;
  }
  main {
    padding-top:68px;
  }
  .view#home-view {
    gap:44px 110px;
  }
  .home-copy {
    padding-top:36px;
  }
}
@media(max-width:860px) {
  .app-shell {
    padding:0 26px;
  }
  .site-header {
    min-height:86px;
  }
  main {
    padding-top:30px;
  }
  .view#home-view {
    gap:30px;
    grid-template-columns:1.1fr 1fr;
  }
  h1 {
    font-size:50px;
    letter-spacing:-2.5px;
  }
  .start-card {
    padding:22px;
  }
  .intro {
    font-size:14px;
  }
  .comparison-layout,.camera-layout {
    grid-template-columns:minmax(0,1fr) 245px;
    gap:20px;
  }
  .comparison-controls,.camera-controls {
    padding:18px;
  }
  .section-title {
    font-size:32px;
  }
}
@media(max-width:620px) {
  .app-shell {
    padding:0 20px;
  }
  .site-header {
    min-height:102px;
    padding:14px 0;
    gap:12px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
  }
  .site-header .text-button {
    min-width:44px;
    grid-column:2;
    grid-row:1;
    min-height:44px;
  }
  .brand {
    font-size:25px;
  }
  .brand img {
    width:40px;
    height:40px;
  }
  .privacy-note {
    grid-column:1 / -1;
    grid-row:2;
    margin-left:0;
    width:100%;
    font-size:10px;
    gap:6px;
  }
  .view#home-view {
    display:flex;
    flex-direction:column;
    gap:25px;
  }
  .home-copy {
    padding-top:7px;
  }
  .eyebrow {
    font-size:8px;
    letter-spacing:1.5px;
    margin-bottom:16px;
  }
  h1 {
    font-size:clamp(38px,12vw,51px);
    letter-spacing:-2.7px;
    margin-bottom:18px;
  }
  .intro {
    font-size:14px;
    line-height:1.75;
    margin-bottom:0;
  }
  .desktop-only {
    display:none;
  }
  .start-card {
    width:100%;
    padding:24px;
  }
  .start-card h2 {
    font-size:23px;
  }
  .step-mark {
    margin-bottom:20px;
  }
  .example-caption {
    padding:13px;
    gap:8px;
    align-items:flex-start;
    flex-direction:column;
  }
  .example-images img {
    aspect-ratio:1.05;
  }
  .how-it-works {
    flex-wrap:wrap;
    justify-content:flex-start;
    font-size:10px;
    gap:9px;
    line-height:1.7;
  }
  .how-it-works b {
    margin-right:5px;
  }
  .section-top {
    align-items:flex-start;
    gap:14px;
  }
  .section-title {
    font-size:30px;
    letter-spacing:-1.2px;
  }
  .section-top .small {
    font-size:10px;
    padding:0 10px;
    min-height:36px;
  }
  .section-description {
    font-size:13px;
    margin-bottom:22px;
  }
  .comparison-layout,.camera-layout {
    grid-template-columns:1fr;
    gap:20px;
  }
  .comparison-controls,.camera-controls {
    padding:22px;
  }
  .camera-stage,.comparison-stage {
    border-radius:14px;
  }
  .camera-controls .step-mark {
    display:none;
  }
  .camera-controls h2 {
    font-size:22px;
  }
  .button {
    min-height:48px;
    font-size:13px;
  }
  .control-label,.range-label {
    font-size:12px;
  }
  .quiet {
    font-size:11px;
  }
  .device-details {
    margin-top:28px;
  }
  footer {
    flex-direction:column;
    gap:10px;
    padding-bottom:calc(22px + env(safe-area-inset-bottom));
  }
}
/* Every working step shares a stable viewport, independent of photo dimensions. */
body.workflow-open {
  overflow:hidden;
  overscroll-behavior:none;
  background:var(--paper);
}
.workflow-open .site-header,.workflow-open footer {
  display:none;
}
.workflow-open main {
  padding:0;
}
.workflow-view {
  position:fixed;
  inset:0;
  z-index:3;
  height:100vh;
  height:100svh;
  padding:max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
  background:var(--paper);
  display:flex;
  flex-direction:column;
  max-width:1440px;
  margin:0 auto;
  overflow:hidden;
}
.workflow-view .section-top {
  flex:0 0 auto;
  min-height:68px;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.workflow-heading {
  min-width:0;
}
.workflow-brand {
  gap:8px;
  font-size:21px;
  letter-spacing:-.8px;
}
.workflow-brand img {
  width:30px;
  height:30px;
  border-radius:8px;
}
.workflow-brand .brand-copy {
  gap:2px;
}
.workflow-brand .brand-descriptor {
  font-size:11px;
  letter-spacing:0;
}
.workflow-view .section-title {
  margin-top:6px;
  font-size:13px;
  line-height:1.3;
  letter-spacing:0;
  font-weight:500;
  color:var(--muted);
}
.workflow-view .eyebrow,.camera-controls .step-mark,.camera-controls h2 {
  display:none;
}
.workflow-nav {
  display:flex;
  gap:12px;
  align-items:center;
}
.workflow-nav .text-button,.workflow-view .section-top .button {
  min-height:44px;
}
.workflow-layout {
  flex:1;
  min-height:0;
  grid-template-columns:minmax(0,1fr) 300px;
  grid-template-rows:minmax(0,1fr);
  align-items:stretch;
  gap:24px;
}
.workflow-frame {
  min-height:0;
  min-width:0;
  container-type:size;
  display:grid;
  place-items:center;
}
.workflow-stage {
  /* Neither a decoded image nor a comparison-mode change can grow the page. */
  width:min(100cqw,calc(100cqh * var(--frame-ratio,1.3333333333)));
  aspect-ratio:var(--frame-ratio,4/3);
  border:0;
}
.workflow-controls {
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.workflow-settings {
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:4px;
  margin:0 -4px;
}
.workflow-options {
  margin:0;
}
.workflow-options summary {
  cursor:pointer;
  font-size:12px;
  font-weight:600;
  min-height:44px;
  align-content:center;
}
.workflow-options .button {
  margin-top:8px;
}
#export-settings {
  margin-top:16px;
}
.workflow-actions {
  flex:none;
  padding-top:8px;
}
.workflow-actions .button {
  min-height:52px;
}
#export-tools {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
#export-tools .button+.button {
  margin:0;
  padding:0 14px;
}
#save-status {
  height:3.2em;
  overflow:auto;
  margin:8px 0 0;
}
#project-description {
  margin:0 0 8px;
  line-height:1.5;
  font-size:13px;
}
#compare-tools select {
  margin-bottom:0;
}
#compare-tools .control-label {
  margin-bottom:5px;
}
#compare-slider-wrap {
  height:76px;
}
#compare-slider-wrap .range-label {
  margin:8px 0 0;
}
#compare-slider-wrap input {
  height:44px;
  margin:0;
}
#compare-slider-wrap[hidden] {
  /* Keep the controls still when switching between the six comparison modes. */
  display:block!important;
  visibility:hidden;
  pointer-events:none;
}
#overlay-controls {
  margin:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  column-gap:16px;
  align-items:center;
}
#overlay-controls .range-label {
  margin:0;
}
#overlay-controls input {
  grid-column:1;
  height:44px;
  margin:0;
}
#toggle-overlay {
  grid-column:2;
  grid-row:1 / 3;
  min-height:44px;
}
.camera-message {
  max-height:100%;
  overflow:auto;
  margin:0;
  padding:14px;
}
.workflow-open .notice {
  top:max(76px,env(safe-area-inset-top));
  bottom:auto;
}
dialog {
  max-height:calc(100vh - 32px);
  max-height:calc(100svh - 32px);
  overflow:auto;
}
.about-descriptor {
  color:var(--muted);
}
.app-details summary {
  cursor:pointer;
  font-size:14px;
  padding:12px 0;
}
.app-details p {
  margin-top:12px;
}
dialog form {
  margin-top:20px;
}
@media(max-width:620px) and (orientation:portrait) {
  .workflow-view {
    padding-right:max(16px,env(safe-area-inset-right));
    padding-left:max(16px,env(safe-area-inset-left));
  }
  .workflow-layout {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) auto;
    gap:12px;
  }
  .workflow-controls {
    max-height:46svh;
  }
  .workflow-nav {
    gap:8px;
  }
}
@media(max-width:1000px) and (orientation:landscape) {
  .workflow-layout {
    grid-template-columns:minmax(0,1fr) 230px;
    gap:16px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

.update-page {
  max-width:540px;
  margin:0 auto;
  padding-bottom:24px;
}
.update-page .section-title {
  margin-bottom:20px;
}
.update-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
}
@media(max-width:400px) {
  .update-actions { grid-template-columns:1fr; }
}

.footer-links { display:flex; gap:20px; flex-wrap:wrap; }
