:root {
  --paper: #ffffff;
  --soft: #f7f7f8;
  --ink: #090909;
  --muted: #626267;
  --line: #d7d7db;
  --line-strong: #8f8f95;
  --accent: #ff4f00;
  --content: 1480px;
  --pad: clamp(18px, 3vw, 48px);
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(9, 9, 9, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(9, 9, 9, 0.025) 1px, transparent 1px);
  background-size: calc((100vw - (var(--pad) * 2)) / 12) 100%, 100% 24px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="checkbox"],
label[for] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-lockup img {
  display: block;
  width: 105px;
  height: auto;
  object-fit: contain;
}

.brand-rule {
  width: 1px;
  height: 28px;
  margin: 0 16px;
  background: var(--ink);
}

.brand-product {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
}

.text-button {
  padding: 0 18px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.text-button:hover {
  color: var(--paper);
  background: var(--ink);
}

main {
  max-width: var(--content);
  margin: 0 auto;
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(390px, 5fr);
  min-height: 430px;
  border-bottom: 1px solid var(--ink);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(48px, 7vw, 104px) var(--pad) 40px;
  border-right: 1px solid var(--ink);
}

.folio,
.eyebrow,
.result-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 870px;
  margin: 0;
  font-size: clamp(52px, 6.5vw, 112px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.hero-deck {
  max-width: 720px;
  margin: 26px 0 0;
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.35;
}

.quick-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 34px;
}

.quick-formats button {
  min-height: 42px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-right: 0;
  font-size: 13px;
  font-weight: 600;
}

.quick-formats button:last-child {
  border-right: 1px solid var(--ink);
}

.quick-formats button:hover,
.quick-formats button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
}

.production-ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 32px var(--pad) 40px;
  background: var(--soft);
}

.production-ticket::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  content: "";
  background: var(--accent);
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 240ms ease;
}

.production-ticket[data-status="ready"]::before {
  transform: scaleX(1);
}

.production-ticket[data-status="upscale"]::before,
.production-ticket[data-status="caution"]::before {
  transform: scaleX(0.66);
}

.production-ticket[data-status="replace"]::before {
  transform: scaleX(0.12);
}

.ticket-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-label {
  padding-bottom: 3px;
  color: var(--ink);
  border-bottom: 3px solid var(--accent);
}

.ticket-kicker {
  min-height: 34px;
  margin: 52px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-transform: uppercase;
}

.ticket-dimensions {
  margin: auto 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(46px, 5.4vw, 82px);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.ticket-unit {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.ticket-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.ticket-meta span {
  padding: 12px 10px 12px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ticket-meta span + span {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

.ticket-verdict {
  min-height: 44px;
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(340px, 4fr);
  align-items: start;
  border-bottom: 1px solid var(--ink);
}

.control-stack {
  min-width: 0;
  border-right: 1px solid var(--ink);
}

.panel {
  padding: 44px var(--pad) 48px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.panel:last-child {
  border-bottom: 0;
}

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

.section-heading h2,
.preview-heading h2,
.dialog-header h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.outline-button,
.dialog-close {
  min-height: 42px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.outline-button:hover,
.dialog-close:hover {
  color: var(--paper);
  background: var(--ink);
}

.selected-format {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--ink);
}

.selected-format h3 {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.selected-format p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.selected-format a {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.mode-switch {
  display: inline-flex;
  margin: 22px 0 0;
}

.mode-switch button {
  min-height: 38px;
  padding: 0 13px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
}

.mode-switch button + button {
  border-left: 0;
}

.mode-switch button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.field-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.field-grid-five {
  grid-template-columns: repeat(2, minmax(110px, 1fr)) 0.8fr 1fr 1fr;
}

.field-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.field small {
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
}

.field input,
.field select,
.input-suffix {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.field input,
.field select {
  padding: 0 12px;
}

.field input::placeholder {
  color: #8f8f95;
}

.input-suffix {
  display: flex;
  align-items: center;
}

.input-suffix input {
  flex: 1;
  min-height: 42px;
  border: 0;
}

.input-suffix span {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 500;
}

.distance-fields {
  align-items: end;
}

.check-field {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.distance-slider-block {
  margin-top: 22px;
  padding: 18px 0 12px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.distance-slider-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.distance-slider-heading label {
  font-size: 12px;
  font-weight: 700;
}

.distance-slider-heading output {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.distance-slider-stage {
  position: relative;
  height: 116px;
  contain: layout paint;
}

.distance-viewer {
  --viewer-position: 39.6%;
  position: absolute;
  bottom: 28px;
  left: clamp(18px, var(--viewer-position), calc(100% - 18px));
  z-index: 1;
  width: 33px;
  height: 88px;
  pointer-events: none;
  transform: translateX(-50%);
}

.distance-viewer::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 14px;
  content: "";
  background: var(--accent);
  transform: translateX(-50%);
}

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

.distance-slider {
  --slider-progress: 39.6%;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
}

.distance-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--accent) 0,
    var(--accent) var(--slider-progress),
    var(--line-strong) var(--slider-progress),
    var(--line-strong) 100%
  );
  border-radius: 0;
}

.distance-slider::-webkit-slider-thumb {
  width: 18px;
  height: 26px;
  margin-top: -10px;
  appearance: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 0;
}

.distance-slider::-moz-range-track {
  width: 100%;
  height: 5px;
  background: var(--line-strong);
  border-radius: 0;
}

.distance-slider::-moz-range-progress {
  height: 5px;
  background: var(--accent);
}

.distance-slider::-moz-range-thumb {
  width: 14px;
  height: 22px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 0;
}

.distance-markers {
  position: relative;
  height: 54px;
  margin: 1px 9px 0;
}

.distance-marker {
  position: absolute;
  top: 0;
  left: var(--marker-position);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  padding: 10px 3px 0;
  background: transparent;
  border: 0;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  transform: translateX(-50%);
}

.distance-marker::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 7px;
  content: "";
  background: var(--line-strong);
}

.distance-marker:first-child {
  align-items: flex-start;
  transform: translateX(-9px);
}

.distance-marker:first-child::before {
  left: 9px;
}

.distance-marker:last-child {
  align-items: flex-end;
  transform: translateX(calc(-100% + 9px));
}

.distance-marker:last-child::before {
  right: 9px;
  left: auto;
}

.distance-marker span {
  font-weight: 700;
}

.distance-marker small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.distance-marker:hover span,
.distance-marker[aria-current="true"] span {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.distance-slider-block > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.calculation-note {
  margin-top: 16px;
  padding: 14px 16px;
  color: var(--muted);
  background: var(--soft);
  border-left: 4px solid var(--accent);
  font-size: 13px;
  line-height: 1.5;
}

.privacy-note,
.working-rule,
.library-count,
.section-heading > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  margin-bottom: 22px;
  padding: 22px;
  background: var(--soft);
  border: 1px dashed var(--ink);
  text-align: center;
}

.dropzone:hover,
.dropzone.is-dragging {
  color: var(--paper);
  background: var(--ink);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.dropzone-title {
  font-size: 18px;
  font-weight: 600;
}

.dropzone-detail {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.dropzone:hover .dropzone-detail,
.dropzone.is-dragging .dropzone-detail {
  color: var(--paper);
}

.artwork-result {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(0, 1.6fr);
  gap: 28px;
  margin-top: 24px;
  padding: 22px 0;
  border-top: 5px solid var(--line-strong);
  border-bottom: 1px solid var(--ink);
}

.artwork-result[data-status="ready"] {
  border-top-color: var(--ink);
}

.artwork-result[data-status="upscale"],
.artwork-result[data-status="caution"],
.artwork-result[data-status="replace"] {
  border-top-color: var(--accent);
}

.artwork-result h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.artwork-result > p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.brand-message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.guidance-block {
  padding: 24px 24px 26px 0;
}

.guidance-block + .guidance-block {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--ink);
}

.guidance-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.guidance-title h3 {
  margin: 0;
  font-size: 22px;
}

.guidance-title span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.metric-list,
.preview-summary {
  margin: 22px 0 0;
}

.metric-list > div,
.preview-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  min-height: 40px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.metric-list dt,
.preview-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.metric-list dd,
.preview-summary dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.guide-status {
  min-height: 38px;
  margin: 18px 0 0;
  padding-left: 12px;
  color: var(--muted);
  border-left: 3px solid var(--line-strong);
  font-size: 12px;
  line-height: 1.45;
}

.guide-status[data-status="pass"] {
  color: var(--ink);
  border-left-color: var(--ink);
}

.guide-status[data-status="check"] {
  color: var(--ink);
  border-left-color: var(--accent);
}

.preview-column {
  position: sticky;
  top: 72px;
  min-width: 0;
}

.preview-panel,
.method-panel {
  padding: 32px;
  background: var(--soft);
  border-bottom: 1px solid var(--ink);
}

.preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.preview-heading h2 {
  font-size: 28px;
}

.preview-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.preview-meta span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#previewDistanceScale {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.canvas-stage {
  display: grid;
  place-items: center;
  min-height: 470px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--ink);
}

.canvas-preview {
  position: relative;
  width: 260px;
  height: 400px;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--ink);
  transition: width 180ms ease, height 180ms ease;
}

.preview-reference {
  --distance-image-scale: 0.95;
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ececef;
}

.preview-reference::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

.preview-reference img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 45%;
  transform: scale(var(--distance-image-scale));
  transform-origin: center;
  transition: transform 140ms cubic-bezier(0.2, 0.72, 0.2, 1);
  will-change: transform;
}

.preview-safe {
  position: absolute;
  inset: 3%;
  z-index: 1;
  border: 1px solid var(--accent);
}

.preview-logo {
  position: absolute;
  top: 9%;
  right: 9%;
  z-index: 2;
  width: 24%;
}

.preview-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.preview-headline {
  position: absolute;
  right: 9%;
  bottom: 19%;
  left: 9%;
  z-index: 2;
  height: 10%;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.preview-headline span {
  display: block;
  width: 64%;
  height: 42%;
  margin-top: 7%;
  background: var(--accent);
}

.canvas-label {
  position: absolute;
  z-index: 3;
  padding: 3px 5px;
  color: var(--paper);
  background: var(--ink);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.canvas-label-live {
  bottom: 3%;
  left: 3%;
}

.canvas-label-logo {
  top: 4%;
  right: 4%;
}

.canvas-label-type {
  right: 4%;
  bottom: 12%;
}

.preview-simulation-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.method-panel {
  background: var(--paper);
  border-bottom: 0;
}

.method-panel ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.method-panel li {
  position: relative;
  padding: 13px 0 13px 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}

.method-panel li::before {
  position: absolute;
  top: 17px;
  left: 0;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--accent);
}

footer {
  display: flex;
  justify-content: space-between;
  max-width: var(--content);
  min-height: 88px;
  margin: 0 auto;
  padding: 28px var(--pad);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
}

dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(850px, calc(100vh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(9, 9, 9, 0.72);
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.dialog-header h2 {
  font-size: 36px;
}

.library-filters {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(150px, 1fr));
  gap: 12px;
  padding: 22px 0;
}

.library-count {
  margin: 0 0 12px;
}

.format-list {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.format-row {
  display: grid;
  grid-template-columns: 1.1fr 2.2fr 1.35fr 0.9fr;
  width: 100%;
  min-height: 76px;
  padding: 0;
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.format-row:last-child {
  border-bottom: 0;
}

.format-row:hover,
.format-row[aria-current="true"] {
  background: var(--soft);
}

.format-row[aria-current="true"] {
  border-left: 7px solid var(--accent);
}

.format-row > span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  font-size: 13px;
}

.format-row > span:last-child {
  border-right: 0;
}

.format-row .format-name {
  font-size: 15px;
  font-weight: 600;
}

.format-row .format-dimensions {
  font-variant-numeric: tabular-nums;
}

.format-badge {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-library {
  padding: 48px 20px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 36px));
  padding: 13px 16px;
  color: var(--paper);
  background: var(--ink);
  border-left: 7px solid var(--accent);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  }

  .hero-copy h1 {
    font-size: clamp(48px, 7vw, 78px);
  }

  .field-grid-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .library-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding: 0;
  }

  .brand-lockup {
    min-height: 64px;
    padding: 0 18px;
  }

  .top-actions {
    min-height: 48px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
  }

  .text-button {
    flex: 1 0 auto;
    padding: 0 14px;
  }

  .hero-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .control-stack {
    border-right: 0;
  }

  .hero-copy {
    min-height: 460px;
    border-bottom: 1px solid var(--ink);
  }

  .production-ticket {
    min-height: 390px;
  }

  .preview-column {
    position: static;
  }

  .preview-panel {
    border-top: 1px solid var(--ink);
  }

  .canvas-stage {
    min-height: 420px;
  }

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

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

  .check-field {
    grid-column: 1 / -1;
  }

  .format-row {
    grid-template-columns: 1fr 1.7fr 1.2fr;
  }

  .format-row > span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 18px;
  }

  body {
    background-image: linear-gradient(to bottom, rgba(9, 9, 9, 0.025) 1px, transparent 1px);
  }

  .brand-product {
    font-size: 11px;
  }

  .brand-rule {
    margin: 0 12px;
  }

  .hero-copy {
    min-height: 420px;
    padding-top: 58px;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 15vw, 70px);
  }

  .hero-deck {
    font-size: 17px;
  }

  .quick-formats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-formats button,
  .quick-formats button:last-child {
    border: 1px solid var(--ink);
    margin: -1px 0 0 -1px;
  }

  .production-ticket {
    min-height: 360px;
  }

  .ticket-kicker {
    margin-top: 36px;
  }

  .ticket-dimensions {
    font-size: clamp(42px, 14vw, 62px);
  }

  .ticket-meta {
    grid-template-columns: 1fr;
  }

  .ticket-meta span,
  .ticket-meta span + span {
    padding: 9px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .section-heading,
  .selected-format,
  .artwork-result {
    grid-template-columns: 1fr;
  }

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

  .outline-button {
    width: 100%;
  }

  .selected-format {
    align-items: start;
  }

  .field-grid-five,
  .field-grid-three,
  .field-grid-two,
  .brand-message-grid {
    grid-template-columns: 1fr;
  }

  .check-field {
    grid-column: auto;
  }

  .distance-marker:nth-child(2),
  .distance-marker:nth-child(4) {
    display: none;
  }

  .distance-marker small {
    display: none;
  }

  .distance-markers {
    height: 35px;
  }

  .distance-slider-stage {
    height: 98px;
  }

  .distance-viewer {
    bottom: 26px;
    left: clamp(14px, var(--viewer-position), calc(100% - 14px));
    width: 27px;
    height: 72px;
  }

  .distance-viewer::after {
    height: 12px;
  }

  .guidance-block,
  .guidance-block + .guidance-block {
    padding: 24px 0;
    border-left: 0;
  }

  .guidance-block + .guidance-block {
    border-top: 1px solid var(--ink);
  }

  .canvas-stage {
    min-height: 390px;
    padding: 20px;
  }

  .preview-panel,
  .method-panel,
  .dialog-shell {
    padding: 22px 18px;
  }

  .library-filters {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .format-row {
    grid-template-columns: 1fr;
    padding: 14px 0;
  }

  .format-row > span {
    min-height: 0;
    padding: 5px 14px;
    border-right: 0;
  }

  .format-row > span:nth-child(4) {
    display: flex;
  }

  .dialog-header h2 {
    font-size: 30px;
  }

  footer {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Apple-inspired Liquid Glass material layer, held to the MOMAX Swiss palette. */
:root {
  --paper: #ffffff;
  --soft: rgba(247, 247, 248, 0.82);
  --ink: #111113;
  --muted: #65656b;
  --line: rgba(17, 17, 19, 0.12);
  --line-strong: rgba(17, 17, 19, 0.34);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.76);
  --glass-shadow: 0 18px 60px rgba(17, 17, 19, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --material-shadow: 0 12px 38px rgba(17, 17, 19, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  --content: 1500px;
}

body {
  background-color: #f5f5f7;
  background-image:
    radial-gradient(circle at 12% 7%, rgba(255, 79, 0, 0.16), transparent 24%),
    radial-gradient(circle at 92% 28%, rgba(17, 17, 19, 0.07), transparent 25%),
    linear-gradient(145deg, #f7f7f8 0%, #eeeeF1 52%, #fafafa 100%);
  background-size: auto;
}

.topbar {
  top: 12px;
  width: min(calc(100% - 24px), var(--content));
  min-height: 64px;
  margin: 12px auto 0;
  padding: 7px 10px 7px 18px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
}

.top-actions {
  align-self: auto;
  gap: 5px;
}

.text-button {
  min-height: 46px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(17, 17, 19, 0.08);
  border-radius: 15px;
}

.text-button:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}

main {
  max-width: var(--content);
  padding: 12px 0 24px;
  background: transparent;
  border: 0;
}

.hero-grid {
  min-height: 450px;
  grid-template-columns: minmax(0, 7fr) minmax(390px, 5fr);
  gap: 18px;
  margin: 0 var(--pad) 18px;
  border: 0;
}

.hero-copy,
.production-ticket {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  box-shadow: var(--glass-shadow);
}

.hero-copy {
  padding: clamp(48px, 7vw, 96px) clamp(26px, 4vw, 58px) 42px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid var(--glass-border);
}

.hero-copy h1 {
  font-size: clamp(52px, 6.25vw, 104px);
  line-height: 0.92;
}

.production-ticket {
  background: var(--glass-strong);
}

.production-ticket::before {
  top: 0;
  right: 24px;
  left: 24px;
  height: 5px;
  border-radius: 0 0 999px 999px;
}

.ticket-unit {
  line-height: 1.4;
}

.ticket-meta {
  border-color: rgba(17, 17, 19, 0.24);
}

.quick-formats {
  gap: 8px;
}

.quick-formats button,
.quick-formats button:last-child,
.outline-button,
.dialog-close {
  min-height: 42px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(17, 17, 19, 0.17);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.quick-formats button:hover,
.quick-formats button[aria-pressed="true"],
.outline-button:hover,
.dialog-close:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.workspace-grid {
  grid-template-columns: minmax(0, 8fr) minmax(350px, 4fr);
  align-items: start;
  gap: 18px;
  margin: 0 var(--pad);
  border: 0;
}

.control-stack {
  display: grid;
  gap: 18px;
  border: 0;
}

.panel,
.preview-panel,
.method-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  box-shadow: var(--material-shadow);
}

.panel,
.panel:last-child,
.preview-panel,
.method-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.82);
}

.preview-column {
  top: 94px;
  display: grid;
  gap: 18px;
}

.selected-format {
  display: block;
  padding: 22px 24px;
  background: rgba(247, 247, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.mode-switch {
  gap: 4px;
  padding: 4px;
  background: rgba(235, 235, 239, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.mode-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
}

.mode-switch button + button {
  border-left: 0;
}

.mode-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(17, 17, 19, 0.09), inset 0 1px 0 #ffffff;
}

.screen-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.screen-presets > span {
  margin-right: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-presets button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.screen-presets button:hover,
.screen-presets button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
}

.field input,
.field select,
.input-suffix,
.check-field {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(17, 17, 19, 0.18);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.input-suffix input {
  background: transparent;
  border-radius: 14px 0 0 14px;
}

.field input:focus,
.field select:focus,
.input-suffix:focus-within {
  border-color: rgba(255, 79, 0, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 79, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.digital-pixel-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  background: rgba(247, 247, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.5;
}

.measurement-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.measurement-pair > div {
  display: grid;
  gap: 5px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 244, 247, 0.72));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.measurement-pair span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.measurement-pair strong,
.measurement-pair small {
  font-variant-numeric: tabular-nums;
}

.measurement-pair strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.measurement-pair small {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.distance-slider-block {
  padding: 18px 18px 14px;
  background: rgba(247, 247, 248, 0.58);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.distance-slider::-webkit-slider-runnable-track,
.distance-slider::-moz-range-track,
.distance-slider::-moz-range-progress {
  border-radius: 999px;
}

.distance-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(17, 17, 19, 0.16), inset 0 1px 0 #ffffff;
}

.distance-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(17, 17, 19, 0.16), inset 0 1px 0 #ffffff;
}

.calculation-note,
.guide-status {
  border-radius: 14px;
}

.calculation-note {
  background: rgba(247, 247, 248, 0.72);
}

.dropzone {
  background: rgba(247, 247, 248, 0.62);
  border: 1px dashed rgba(17, 17, 19, 0.42);
  border-radius: 20px;
}

.dropzone:hover,
.dropzone.is-dragging {
  color: var(--ink);
  background: rgba(255, 79, 0, 0.11);
  border-color: var(--accent);
}

.dropzone:hover .dropzone-detail,
.dropzone.is-dragging .dropzone-detail {
  color: var(--muted);
}

.artwork-result {
  padding: 22px;
  background: rgba(247, 247, 248, 0.58);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 18px;
}

.brand-message-grid {
  gap: 14px;
  border: 0;
}

.guidance-block,
.guidance-block + .guidance-block {
  padding: 22px;
  background: rgba(247, 247, 248, 0.58);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.screen-logo-guide {
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.screen-logo-guide > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.screen-logo-guide #screenLogoRows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.screen-logo-guide span,
.screen-logo-guide strong {
  font-size: 12px;
}

.screen-logo-guide span {
  display: grid;
  gap: 2px;
}

.screen-logo-guide small {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.screen-logo-guide strong {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.canvas-stage {
  max-width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.canvas-preview {
  max-width: calc(100% - 56px);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(17, 17, 19, 0.12);
}

footer {
  width: min(calc(100% - (var(--pad) * 2)), calc(var(--content) - (var(--pad) * 2)));
  min-height: 76px;
  margin: 0 auto 24px;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(17, 17, 19, 0.12);
}

dialog {
  background: rgba(249, 249, 251, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  box-shadow: 0 32px 100px rgba(17, 17, 19, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

dialog::backdrop {
  background: rgba(17, 17, 19, 0.38);
}

.format-list {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 7px;
  background: rgba(235, 235, 239, 0.56);
  border: 0;
  border-radius: 18px;
}

.format-row {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.format-row:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.86);
}

.format-row:hover,
.format-row[aria-current="true"] {
  background: rgba(255, 255, 255, 0.94);
}

.format-row[aria-current="true"] {
  border-left: 7px solid var(--accent);
}

.toast {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 6px solid var(--accent);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar,
  .production-ticket,
  dialog,
  .toast {
    -webkit-backdrop-filter: saturate(145%) blur(26px);
    backdrop-filter: saturate(145%) blur(26px);
  }

  .mode-switch {
    -webkit-backdrop-filter: saturate(130%) blur(16px);
    backdrop-filter: saturate(130%) blur(16px);
  }
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    width: calc(100% - 24px);
    padding: 8px 10px 0;
  }

  .brand-lockup {
    padding: 0 8px;
  }

  .top-actions {
    padding: 6px 0;
    border-top: 1px solid var(--line);
  }

  .hero-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    border-right: 1px solid var(--glass-border);
  }

  .preview-column {
    position: static;
  }

  .preview-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.82);
  }
}

@media (max-width: 640px) {
  .hero-grid,
  .workspace-grid {
    margin-right: 12px;
    margin-left: 12px;
  }

  .hero-copy,
  .production-ticket,
  .panel,
  .preview-panel,
  .method-panel {
    border-radius: 22px;
  }

  .quick-formats {
    gap: 7px;
  }

  .quick-formats button,
  .quick-formats button:last-child {
    margin: 0;
    border: 1px solid rgba(17, 17, 19, 0.17);
  }

  .screen-presets {
    align-items: stretch;
  }

  .screen-presets > span {
    width: 100%;
  }

  .screen-presets button {
    flex: 1 1 calc(50% - 7px);
  }

  .measurement-pair {
    grid-template-columns: 1fr;
  }

  .distance-slider-block {
    padding-right: 14px;
    padding-left: 14px;
  }

  .guidance-block,
  .guidance-block + .guidance-block {
    padding: 18px;
    border: 1px solid var(--line);
  }

  .guidance-block + .guidance-block {
    border-top: 1px solid var(--line);
  }

  .canvas-preview {
    max-width: calc(100% - 40px);
  }

  footer {
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .production-ticket,
  dialog,
  .toast,
  .mode-switch {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
