:root {
  --bg: #f5f2ec;
  --paper: #fffdf9;
  --paper-strong: #ffffff;
  --text: #24231f;
  --muted: #706c64;
  --soft: #aaa398;
  --line: #ddd6cc;
  --line-strong: #c6bbae;
  --accent: #8b674c;
  --accent-dark: #664832;
  --accent-soft: #eee2d7;
  --good: #2f7454;
  --warn: #a66b27;
  --danger: #a3473f;
  --shadow: 0 18px 52px rgba(58, 48, 38, .09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.95), rgba(255,255,255,0) 34rem),
    var(--bg);
  font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.small-screen-advisory-open {
  overflow: hidden;
}

.simulator-popup-mode body {
  min-height: 100%;
  background: var(--bg);
}

.simulator-popup-mode .topbar,
.simulator-popup-mode footer,
.simulator-popup-mode .small-screen-advisory {
  display: none !important;
}

.simulator-popup-mode .page-shell {
  width: min(1440px, calc(100% - 20px));
  padding: 10px 0 14px;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.small-screen-advisory {
  position: fixed;
  z-index: 10000;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(26, 24, 21, .82);
  backdrop-filter: blur(8px);
}

.small-screen-advisory-panel {
  width: min(100%, 470px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .3);
  text-align: center;
}

.small-screen-advisory-kicker {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.small-screen-advisory h2 {
  margin: 8px 0 14px;
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  line-height: 1.25;
  letter-spacing: -.03em;
}

.small-screen-advisory p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
  word-break: keep-all;
}

.small-screen-advisory p + p {
  margin-top: 7px;
}

.small-screen-continue {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  padding: 10px 16px;
  border: 1px solid var(--accent-dark);
  border-radius: 11px;
  color: #fff;
  background: var(--accent-dark);
  cursor: pointer;
  font-weight: 800;
}

.small-screen-continue:focus-visible {
  outline: 3px solid rgba(102, 72, 50, .28);
  outline-offset: 3px;
}

.topbar {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 15px 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(98, 82, 65, .18);
}

.topbar-copy h1 {
  margin: 0 0 3px;
  font-size: clamp(1.42rem, 2vw, 1.72rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.brand-home-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.brand-home-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.topbar-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.35;
}

.text-button,
.small-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  cursor: pointer;
}

.text-button {
  padding: 8px 14px;
  font-size: .86rem;
}

.small-button {
  padding: 6px 10px;
  color: var(--muted);
  font-size: .74rem;
}

.preview-heading-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.page-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 28px;
}

.intro-card {
  width: min(860px, 100%);
  margin: 42px auto 80px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,253,249,.92);
  box-shadow: var(--shadow);
}

.intro-copy {
  text-align: center;
}

.intro-copy h2,
.section-heading h2,
.panel-heading h2 {
  margin: 5px 0 8px;
  line-height: 1.22;
  letter-spacing: -.025em;
}

.intro-copy h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.intro-copy p,
.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.step-kicker {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .13em;
}

.upload-zone {
  min-height: 250px;
  margin-top: 30px;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 22px;
  color: var(--muted);
  background: #f9f6f0;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--accent);
  background: #f5ece3;
  transform: translateY(-1px);
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-zone strong {
  color: var(--text);
  font-size: 1.16rem;
}

.upload-zone small {
  text-align: center;
}

.upload-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  font-size: 1.8rem;
  font-weight: 300;
}

.message {
  min-height: 1.3em;
  margin: 7px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: .84rem;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--good);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.15fr) minmax(420px, .85fr);
  grid-template-areas: "editor controls";
  gap: 14px;
  align-items: start;
}

.editor-column {
  grid-area: editor;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.preview-panel {
  padding: 11px 13px 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,253,249,.96);
  box-shadow: var(--shadow);
}

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

.panel-heading h2 {
  font-size: 1rem;
}

.preview-title-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.preview-title-row h2 {
  flex: 0 0 auto;
  margin: 0;
}

.preview-image-meta {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-stage {
  position: relative;
  min-height: 300px;
  height: clamp(300px, 42vh, 420px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #ddd9d2 25%, transparent 25%),
    linear-gradient(-45deg, #ddd9d2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd9d2 75%),
    linear-gradient(-45deg, transparent 75%, #ddd9d2 75%),
    #e7e3dc;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

#previewCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#previewCanvas.crop-active {
  cursor: grab;
}

#previewCanvas.crop-active:active {
  cursor: grabbing;
}

.preview-upload-prompt {
  position: absolute;
  z-index: 2;
  width: min(330px, calc(100% - 36px));
  margin: 0;
  padding: 16px 18px;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,253,249,.94);
  cursor: pointer;
  text-align: center;
  font-size: .84rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.preview-upload-prompt:hover,
.preview-upload-prompt.dragging {
  border-color: var(--accent);
  background: #fffaf5;
  transform: translateY(-1px);
}

.preview-upload-prompt input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.preview-upload-prompt strong {
  color: var(--text);
  font-size: .92rem;
}

.preview-upload-prompt small {
  line-height: 1.35;
}

.preview-message:empty {
  display: none;
}

.preview-help {
  min-height: 1.2em;
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.control-column {
  grid-area: controls;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.preview-outcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.control-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,249,.96);
  box-shadow: 0 10px 34px rgba(58,48,38,.055);
}

.section-heading {
  margin-bottom: 9px;
}

.method-card-section {
  padding: 10px 14px 8px;
}

.method-heading {
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.section-heading h2 {
  font-size: 1.18rem;
}

.section-heading p {
  font-size: .84rem;
}

.method-heading h2 {
  margin: 0;
  font-size: .96rem;
}

.method-heading p {
  flex: 0 0 auto;
  margin: 0;
  color: var(--accent-dark);
  font-size: .74rem;
  font-weight: 750;
}

.recommendation-intro {
  flex: 0 0 auto;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.42;
}

.frame-product-controls {
  flex: 0 0 auto;
  margin: 0 0 9px;
}

.custom-size-notice {
  margin: 0 0 8px;
  padding: 9px 11px;
  display: block;
  border: 1px solid #d8b382;
  border-radius: 9px;
  color: #774811;
  background: #fff4df;
  font-size: .88rem;
  font-weight: 850;
  text-align: center;
}

.frame-product-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.frame-product-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #504b45;
  background: #faf8f4;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.15;
  transition: opacity .14s ease, border-color .14s ease, background-color .14s ease;
}

.frame-product-button:hover {
  border-color: var(--accent);
}

.frame-product-button.selected {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.frame-product-button.unavailable {
  opacity: .3;
}

.frame-product-controls.custom-display-mode .frame-product-button {
  cursor: default;
}

.frame-product-controls.custom-display-mode .frame-product-button:hover {
  border-color: var(--line);
}

.frame-product-controls.custom-display-mode .frame-product-button.available {
  border-color: #709174;
  color: #285a31;
  background: #edf7ee;
}

.frame-product-toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 28px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 9px;
  color: #fff;
  background: rgba(27, 45, 77, .96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  font-size: .84rem;
  font-weight: 750;
  text-align: center;
  transform: translateX(-50%);
}

.recommendation-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.recommendation-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.ratio-groups {
  display: grid;
  gap: 7px;
}

.ratio-group {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-strong);
}

.ratio-group.best {
  border-color: #b99b83;
  box-shadow: inset 0 0 0 1px rgba(139,103,76,.12);
}

.ratio-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ratio-group-head strong {
  display: block;
  font-size: .86rem;
}

.ratio-group-head small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
}

.rank-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: .68rem;
  font-weight: 800;
}

.size-buttons {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.size-button {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #4b4741;
  background: #faf8f4;
  cursor: pointer;
  font-size: .76rem;
  line-height: 1.25;
  text-align: left;
}

.size-button:hover {
  border-color: var(--accent);
}

.size-button.active {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.all-sizes-toggle {
  width: 100%;
  min-height: 38px;
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  color: var(--accent-dark);
  background: var(--paper);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 750;
  text-align: center;
}

.ratio-groups.all {
  margin-top: 8px;
}

.method-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.method-card {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.method-card-composite {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
}

.method-select {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.method-select:disabled {
  cursor: not-allowed;
}

.white-margin-adjuster,
.custom-size-adjuster {
  min-width: 86px;
  padding: 4px;
  display: grid;
  grid-template-columns: 24px 30px 24px;
  align-items: center;
  justify-content: end;
  border-left: 1px solid var(--line);
}

.custom-size-adjuster {
  min-width: 132px;
  grid-template-columns: 24px minmax(72px, 1fr) 24px;
}

.white-margin-adjuster > span,
.custom-size-adjuster > span {
  color: var(--accent-dark);
  font-size: .72rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.white-margin-step,
.custom-size-step {
  width: 24px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: rgba(255,255,255,.82);
  cursor: pointer;
  font-size: .95rem;
  font-weight: 850;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.white-margin-step:hover:not(:disabled),
.custom-size-step:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(139,103,76,.18);
}

.white-margin-step:disabled,
.custom-size-step:disabled {
  color: #b8b0a6;
  cursor: not-allowed;
  opacity: .48;
}

.method-card strong {
  font-size: .81rem;
  line-height: 1.25;
}

.method-card.active {
  border-color: var(--accent);
  background: #f7efe7;
  box-shadow: inset 0 0 0 1px rgba(139,103,76,.12);
}

.method-card:disabled {
  color: var(--soft);
  background: #f4f1ec;
  cursor: not-allowed;
  opacity: .62;
}

.method-card.disabled {
  color: var(--soft);
  background: #f4f1ec;
  cursor: not-allowed;
  opacity: .62;
}

.method-card.active .white-margin-adjuster,
.method-card.active .custom-size-adjuster {
  border-left-color: rgba(139,103,76,.28);
}

.method-detail {
  color: #fff;
  font-size: .73rem;
  line-height: 1.3;
}

.preview-method-detail {
  width: 100%;
  margin: 8px 0 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #514a42;
  background: #f5f1eb;
  text-align: center;
  white-space: normal;
}

.preview-method-detail strong {
  color: var(--accent-dark);
}

.custom-contact,
.smaller-suggestion {
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #4f4a43;
  background: #f4f1eb;
  font-size: .8rem;
  line-height: 1.4;
}

.method-detail p,
.custom-contact p,
.smaller-suggestion p {
  margin: 0;
}

.custom-contact {
  margin: 4px 2px 0;
  padding: 0;
  background: transparent;
}

.secondary-link {
  margin-top: 3px;
  display: inline-flex;
  color: var(--accent-dark);
  font-weight: 800;
}

.quality-result {
  display: grid;
  gap: 7px;
}

.result-card,
.finish-card {
  min-width: 0;
  min-height: 98px;
  padding: 11px 12px;
}

.quality-copy > strong {
  display: block;
  margin-bottom: 2px;
  font-size: .94rem;
}

.quality-copy p {
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
}

.quality-meter {
  min-width: 0;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.quality-track {
  position: relative;
  height: 9px;
  margin: 4px 6px 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #b95650 0%,
    #c76850 14%,
    #d89442 24%,
    #dfa847 32%,
    #8ca35c 40%,
    #5d9d67 48%,
    #4a9b6e 60%,
    #38967a 72%,
    #2d9182 82%,
    #29898a 90%,
    #277f91 100%
  );
  box-shadow: inset 0 1px 2px rgba(0,0,0,.16);
}

.quality-marker {
  position: absolute;
  top: -2px;
  left: 2%;
  width: 2px;
  height: 13px;
  border: 0;
  border-radius: 1px;
  background: #24231f;
  box-shadow: 0 1px 2px rgba(255,255,255,.65);
  transform: translateX(-50%);
  transition: left .18s ease;
  pointer-events: none;
}

.quality-marker::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #24231f;
  transform: translateX(-50%);
}

.quality-scale {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 700;
}

.smaller-suggestion {
  border: 1px solid #e1c7a6;
  background: #fbf2e6;
}

.suggestion-button {
  margin-top: 6px;
  padding: 6px 9px;
  border: 1px solid #b98a54;
  border-radius: 9px;
  color: #6b421d;
  background: #fffaf3;
  cursor: pointer;
  font-weight: 750;
}

.finish-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.finish-description {
  min-height: 0;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.35;
}

.final-frame-selection {
  margin: 0 0 8px;
  padding: 8px 9px;
  border: 1px solid #ddcfbf;
  border-radius: 10px;
  background: #faf6f0;
}

.final-frame-selection > p:first-child {
  margin: 0 0 6px;
  color: var(--text);
  font-size: .73rem;
  font-weight: 800;
}

.final-frame-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.final-frame-button {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #504b45;
  background: #fff;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 750;
}

.final-frame-button:hover {
  border-color: var(--accent);
}

.final-frame-button.selected {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.final-frame-help {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.35;
}

.final-frame-help.error {
  color: var(--danger);
}

.redline-word {
  color: #d90000;
  font-weight: 850;
}

.primary-button,
.secondary-button {
  min-height: 38px;
  padding: 7px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-size: .74rem;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.secondary-button {
  border: 1px solid var(--text);
  color: var(--text);
  background: #fff;
}

.secondary-button.is-busy {
  pointer-events: none;
  opacity: .62;
}

.secondary-button[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--soft);
  background: #f2efea;
  cursor: not-allowed;
}

.simulator-popup-mode .finish-actions {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
}

.handoff-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.35;
}

footer {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 10px 0 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(98,82,65,.18);
  color: var(--soft);
  font-size: .7rem;
}

@media (min-width: 1051px) {
  .topbar-copy {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 14px;
  }

  .topbar-copy h1 {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .topbar-copy > p:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .recommendation-card {
    height: var(--recommendation-panel-height, auto);
    min-height: 320px;
  }

  .size-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .size-button {
    width: 100%;
  }

  .preview-help,
  .handoff-note {
    display: none;
  }

  .finish-card .message:empty {
    display: none;
  }
}

@media (max-width: 1050px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "editor";
  }

  .recommendation-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 700px) {
  .small-screen-advisory {
    padding: 18px;
  }

  .small-screen-advisory-panel {
    padding: 25px 20px 22px;
    border-radius: 18px;
  }

  .topbar,
  .page-shell,
  footer {
    width: min(100% - 28px, 1440px);
  }

  .simulator-popup-mode .page-shell {
    width: min(100% - 14px, 1440px);
  }

  .topbar {
    padding-top: 15px;
    align-items: flex-start;
  }

  .topbar-copy > p:last-child {
    display: none;
  }

  .page-shell {
    padding-top: 12px;
  }

  .intro-card {
    margin-top: 10px;
    padding: 24px 18px;
    border-radius: 20px;
  }

  .upload-zone {
    min-height: 210px;
  }

  .preview-panel,
  .control-card {
    padding: 16px;
  }

  .method-options,
  .preview-outcome-grid {
    grid-template-columns: 1fr;
  }

  .method-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .method-detail {
    white-space: normal;
  }

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

  #previewCanvas {
    height: 420px;
  }

  footer {
    flex-direction: column;
  }
}
