:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d4dbe7;
  --blue: #1774ff;
  --blue-soft: #e8f1ff;
  --accent: #ff8f5a;
  --shadow: 0 12px 35px rgba(16, 37, 66, 0.12);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --mobile-frame-width: 390px;
  --mobile-eye-preview-height: 232px;
  --mobile-photo-preview-height: 300px;
  --mobile-live-preview-height: 360px;
  --mobile-lens-card-width: 92px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "SUIT", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, #ffdce9 0%, transparent 38%),
    radial-gradient(circle at 84% 12%, #ffe7f0 0%, transparent 34%),
    radial-gradient(circle at 88% 84%, #ffe9cb 0%, transparent 30%),
    linear-gradient(160deg, #fff9fc 0%, #fff4fa 46%, #fff6fb 100%);
  overflow-x: hidden;
}

body.route-main {
  background:
    radial-gradient(circle at 12% 14%, #ffdce9 0%, transparent 38%),
    radial-gradient(circle at 84% 12%, #ffe7f0 0%, transparent 34%),
    radial-gradient(circle at 88% 84%, #ffe9cb 0%, transparent 30%),
    linear-gradient(160deg, #fff9fc 0%, #fff4fa 46%, #fff6fb 100%);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(0.5px);
  pointer-events: none;
  z-index: -1;
}

.orb-a {
  width: 340px;
  height: 340px;
  left: -90px;
  top: 64px;
  background: radial-gradient(circle, rgba(251, 111, 156, 0.24), rgba(251, 111, 156, 0.02));
}

.orb-b {
  width: 420px;
  height: 420px;
  right: -150px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(255, 204, 116, 0.24), rgba(255, 204, 116, 0.02));
}

body.route-main .orb-a {
  background: radial-gradient(circle, rgba(251, 111, 156, 0.24), rgba(251, 111, 156, 0.02));
}

body.route-main .orb-b {
  background: radial-gradient(circle, rgba(255, 204, 116, 0.24), rgba(255, 204, 116, 0.02));
}

.app-shell {
  width: min(430px, 100%);
  max-width: 100vw;
  min-height: 100svh;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(245, 187, 209, 0.52);
  box-shadow: 0 16px 38px rgba(174, 92, 132, 0.14);
  border-radius: 0;
  backdrop-filter: blur(6px);
  padding: 12px 12px 16px;
  overflow-x: hidden;
}

body.route-main .app-shell {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(245, 187, 209, 0.52);
  box-shadow: 0 16px 38px rgba(174, 92, 132, 0.14);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

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

.header-btn {
  border: 1px solid #cbd8ea;
  color: #27486f;
  background: #f8fbff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.header-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #eef5ff;
}

.header-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.app-body {
  margin-top: 10px;
  min-width: 0;
}

.screen {
  background: var(--card);
  border: 1px solid #f2d9e5;
  border-radius: 16px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #fffdfe 0%, #fff7fb 100%);
  min-width: 0;
  overflow-x: hidden;
}

body.route-main .screen {
  border-color: #f2d9e5;
  background: linear-gradient(180deg, #fffdfe 0%, #fff7fb 100%);
  padding-bottom: 12px;
}

.hero {
  display: grid;
  gap: 10px;
}

.hero h1,
.hero .hero-sub {
  text-align: center;
}

.hero h1,
.screen h1 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero p,
.screen .sub {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecf4ff;
  color: #1e5bb8;
  border: 1px solid #c9deff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.86rem;
}

.hero-pick {
  padding: 0;
  margin-bottom: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.hero-pick-image {
  display: block;
  width: min(76%, 300px);
  height: auto;
  object-fit: contain;
}

body.route-main .hero h1 {
  color: #3f2333;
  font-size: clamp(1.02rem, 4.05vw, 1.18rem);
  line-height: 1.2;
  white-space: nowrap;
}

body.route-main .hero-sub {
  color: #7e8592;
  font-size: 0.84rem;
}

body.route-main .mode-option-card {
  border-color: #edd4e1;
  background: #fffdfd;
}

body.route-main .mode-option-card:hover {
  border-color: #f18cb8;
  box-shadow: 0 12px 26px rgba(196, 78, 128, 0.16);
}

body.route-main .choice-emoji {
  width: 96px;
  height: 46px;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 3px;
}

body.route-main .choice-emoji img,
body.route-main .choice-emoji svg {
  width: 88px;
  height: 46px;
}

body.route-main .choice-icon-image-similar {
  width: 88px;
  height: 46px;
}

body.route-main .choice-icon-image-photo {
  width: 88px;
  height: 46px;
}

.hero-sub {
  margin-top: -2px;
  line-height: 1.35;
}

.option-grid {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.option-grid.cols-2 {
  grid-template-columns: 1fr;
}

.option-grid.cols-3 {
  grid-template-columns: 1fr;
}

.eye-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
}

.eye-choice-grid .option-card {
  width: 100%;
}

.option-card {
  border: 1px solid #d7e2f1;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 154px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.16s ease, box-shadow 0.2s ease;
}

.option-card:hover {
  border-color: #89b8ff;
  box-shadow: 0 10px 24px rgba(17, 88, 179, 0.12);
  transform: translateY(-2px);
}

.option-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.option-card span {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.mode-option-card {
  min-height: 132px;
  padding: 9px 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.mode-option-card strong {
  font-size: 1.02rem;
  line-height: 1.45;
  white-space: nowrap;
}

.mode-option-card > .choice-emoji {
  margin-top: 0;
}

.mode-option-card > span:not(.choice-emoji) {
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.choice-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 96px;
  height: 96px;
  margin-top: 0;
  margin-bottom: 12px;
  border-radius: 999px;
  color: #58606b;
  font-size: 2.4rem;
  line-height: 1;
  background: #ffffff;
  border: 1px solid #edf0f4;
  overflow: hidden;
}

.choice-emoji img,
.choice-emoji svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82px;
  height: 82px;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%);
}

.choice-icon {
  display: block;
  pointer-events: none;
}

.choice-icon svg * {
  fill: none;
  stroke: #58606b;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-icon .icon-line-soft {
  stroke: #7a828e;
}

.choice-icon .icon-line-main {
  stroke: #58606b;
}

.choice-icon .icon-dot {
  fill: #58606b;
  stroke: #58606b;
}

.choice-icon-similar svg * {
  stroke: #111827;
  stroke-width: 2.75;
}

.choice-icon-similar .eye-lid,
.choice-icon-similar .eye-lashes {
  stroke-width: 2.45;
}

.choice-icon-similar .eye-iris {
  stroke-width: 2.55;
}

.choice-icon-similar .eye-pupil {
  fill: #111827;
  stroke: #111827;
}

.choice-icon-similar .eye-highlight,
.choice-icon-similar .eye-highlight-small {
  fill: #ffffff;
  stroke: #ffffff;
}

.choice-icon-similar .eye-spark {
  fill: #ffffff;
  stroke: #111827;
  stroke-width: 2.35;
}

.eye-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid #d9e3f0;
}

.flow-note {
  margin-top: 12px;
  color: #58687d;
  font-size: 0.9rem;
}

.split {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

.screen-step4 .split,
.screen-photo .split {
  align-items: start;
}

.screen-step4 .preview-panel,
.screen-photo .preview-panel {
  position: static;
}

.screen-step4 .lens-panel,
.screen-photo .lens-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
}

.screen-step4 .lens-panel .lens-grid,
.screen-photo .lens-panel .lens-grid {
  flex: 1;
  min-height: 0;
  max-height: 56vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  align-content: start;
}

.panel {
  border: 1px solid #f1d6e4;
  border-radius: var(--radius-md);
  background: #fff8fb;
  padding: 14px;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
}

.preview-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #efd4e2;
  background: #fff3f8;
  max-width: 100%;
}

.preview-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}

.live-ar-wrap {
  position: relative;
  background: #05070d;
  aspect-ratio: 9 / 16;
}

.live-ar-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.screen-live-ar .photo-status {
  margin-top: 8px;
}

.live-ar-diagnostics {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.diagnostic-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #5b6c83;
  padding: 5px 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.diagnostic-chip strong {
  color: #334c70;
  font-style: normal;
}

.diagnostic-chip em {
  font-style: normal;
  font-weight: 700;
}

.diagnostic-chip.good {
  border-color: #b8dfc4;
  background: #f2fff5;
  color: #177245;
}

.diagnostic-chip.warn {
  border-color: #ffd0a8;
  background: #fff7ed;
  color: #b45309;
}

.diagnostic-chip.busy {
  border-color: #bed6ff;
  background: #f3f8ff;
  color: #1d5fbf;
}

.screen-live-ar {
  padding: 14px 10px 12px;
}

.screen-live-ar h1 {
  font-size: 1.14rem;
  line-height: 1.25;
  text-align: center;
}

.screen-live-ar .sub {
  display: none;
}

.screen-live-ar .split {
  gap: 10px;
}

.screen-live-ar .preview-panel {
  padding: 10px;
}

.screen-live-ar .preview-wrap {
  position: relative;
  width: 100%;
  height: var(--mobile-live-preview-height);
  aspect-ratio: auto;
  max-width: 100%;
}

.screen-live-ar .preview-wrap canvas {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: cover;
  object-position: center 42%;
}

.screen-live-ar .lens-panel {
  padding: 10px 0 4px;
  border: 0;
  background: transparent;
}

.screen-live-ar .lens-panel .lens-grid {
  display: flex;
  gap: 8px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 10px 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.screen-live-ar .lens-btn {
  flex: 0 0 92px;
  min-width: 92px;
  scroll-snap-align: start;
  padding: 7px 6px 8px;
}

.screen-live-ar .lens-btn .lens-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}

.screen-live-ar .lens-btn .lens-meta {
  font-size: 0.68rem;
}

.screen-step4 .lens-panel {
  padding: 10px 0 4px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.screen-step4 {
  padding: 12px 10px;
}

.screen-step4 h1 {
  font-size: 1.12rem;
  line-height: 1.25;
  text-align: center;
}

.screen-step4 .split {
  margin-top: 10px;
  gap: 8px;
}

.screen-step4 .preview-panel {
  padding: 10px;
}

.screen-step4 .preview-wrap {
  height: var(--mobile-eye-preview-height);
}

.screen-step4 .preview-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.screen-step4 .btn-row {
  margin-top: 8px;
}

.screen-step4 .lens-panel .lens-grid {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 10px 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.screen-step4 .lens-btn {
  flex: 0 0 92px;
  min-width: 92px;
  scroll-snap-align: start;
  padding: 7px 6px 8px;
}

.screen-step4 .lens-btn .lens-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}

.screen-step4 .lens-btn .lens-meta {
  font-size: 0.68rem;
}

.live-opacity-control {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  color: transparent;
  display: block;
}

.live-opacity-control label {
  display: none;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 3px rgba(18, 27, 42, 0.34);
}

.live-opacity-control input[type="range"] {
  appearance: none;
  width: 100%;
  height: 24px;
  border: 0;
  background: transparent;
  accent-color: #c7ced8;
  cursor: pointer;
}

.live-opacity-control input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.live-opacity-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7.5px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
}

.live-opacity-control input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.live-opacity-control input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.live-opacity-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
}

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

.lens-btn {
  border: 1px solid #d7e2f1;
  border-radius: 10px;
  background: #fff;
  padding: 7px 7px 9px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.14s ease;
}

.lens-btn:hover {
  border-color: #8ab9ff;
  transform: translateY(-1px);
}

.lens-btn.selected {
  border-color: #1c7cff;
  box-shadow: 0 0 0 2px rgba(28, 124, 255, 0.12);
}

.lens-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  padding: 2px 1px 1px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.lens-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.lens-btn .lens-name {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334c70;
  text-align: center;
}

.lens-btn .lens-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #5e6f88;
  text-align: center;
}

.summary {
  margin: 0 0 12px 0;
  color: #495a72;
  line-height: 1.45;
}

.btn-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  appearance: none;
  border-radius: 999px;
  border: 0;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(130deg, #1f84ff, #1160d8);
}

.secondary-btn {
  color: #254468;
  background: #e8eef8;
}

a.primary-btn,
a.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.lens-detail-btn.disabled {
  color: #6f7f95;
  background: #edf1f7;
  pointer-events: none;
}

.camera-panel {
  margin-top: 14px;
  border: 1px solid #d8e3f1;
  background: #f6faff;
  border-radius: 12px;
  padding: 12px;
}

.guide-sub {
  margin-top: -4px;
  margin-bottom: 10px;
  color: #65758f;
  font-size: 0.9rem;
}

.camera-preview {
  position: relative;
}

.camera-panel video {
  width: 100%;
  border-radius: 10px;
  background: #111;
  max-height: 360px;
  object-fit: cover;
}

.camera-guide-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.camera-guide-face {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(62%, 360px);
  aspect-ratio: 0.82 / 1;
  transform: translate(-50%, -50%);
  border-radius: 46% 46% 50% 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 999px rgba(9, 17, 31, 0.12);
}

.camera-guide-eye {
  position: absolute;
  top: 43%;
  width: min(12%, 74px);
  aspect-ratio: 1.55 / 1;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
}

.camera-guide-eye.left {
  left: calc(50% - min(14%, 86px));
  transform: translateX(-50%);
}

.camera-guide-eye.right {
  left: calc(50% + min(14%, 86px));
  transform: translateX(-50%);
}

.camera-guide-text {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #5d6f88;
}

.camera-capture-status {
  margin: 4px 0 0;
  min-height: 1.2em;
  font-size: 0.83rem;
  font-weight: 700;
  color: #5c6f89;
}

.camera-capture-status.busy {
  color: #1c66c9;
}

.camera-capture-status.warn {
  color: #a46309;
}

.camera-capture-status.good {
  color: #17694f;
}

.camera-panel[hidden] {
  display: none;
}

.photo-tip {
  margin-top: 8px;
  color: #5e6e84;
  font-size: 0.9rem;
}

.photo-status {
  margin-top: 4px;
  color: #4b5c77;
  font-size: 0.87rem;
  font-weight: 700;
  min-height: 1.3em;
}

.photo-status.busy {
  color: #1c66c9;
}

.photo-status.warn {
  color: #a46309;
}

.photo-status.good {
  color: #17694f;
}

.control-group {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.control-group label {
  font-size: 0.9rem;
  color: #324963;
  font-weight: 600;
}

.control-group input[type="range"] {
  width: 100%;
}

.eye-toggle {
  display: flex;
  gap: 8px;
}

.eye-toggle button {
  border: 1px solid #c6d6ec;
  background: #fff;
  color: #2f4665;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.eye-toggle button.selected {
  border-color: #1f7fff;
  background: #e9f3ff;
  color: #1658b2;
}

.empty {
  border: 1px dashed #c4d4ea;
  border-radius: 12px;
  padding: 18px;
  color: #5b6c83;
}

@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
  }

  .screen-step4 .preview-panel,
  .screen-photo .preview-panel {
    position: static;
  }

  .screen-step4 .lens-panel,
  .screen-photo .lens-panel {
    height: auto;
  }

  .screen-step4 .lens-panel .lens-grid,
  .screen-photo .lens-panel .lens-grid {
    max-height: 56vh;
  }

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

@media (max-width: 700px) {
  .app-shell {
    width: min(var(--mobile-frame-width), 100vw);
    max-width: min(var(--mobile-frame-width), 100vw);
    min-height: 100svh;
    margin: 0 auto;
    padding: 12px 10px 14px;
    border-radius: 0;
  }

  .screen {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .screen-step4,
  .screen-photo {
    padding: 12px 10px;
  }

  .screen-step4 h1,
  .screen-photo h1 {
    font-size: 1.12rem;
    line-height: 1.25;
    text-align: center;
  }

  .screen-live-ar .sub {
    display: none;
  }

  .screen-step4 .split,
  .screen-photo .split {
    margin-top: 10px;
    gap: 8px;
  }

  .screen-step4 .preview-panel,
  .screen-photo .preview-panel {
    padding: 10px;
  }

  .screen-step4 .preview-wrap,
  .screen-photo:not(.screen-live-ar) .preview-wrap {
    height: var(--mobile-eye-preview-height);
  }

  .screen-photo:not(.screen-live-ar) .preview-wrap {
    height: var(--mobile-photo-preview-height);
  }

  .screen-live-ar .preview-wrap {
    height: var(--mobile-live-preview-height);
    aspect-ratio: auto;
  }

  .screen-step4 .preview-wrap canvas,
  .screen-photo .preview-wrap canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .screen-live-ar .preview-wrap canvas {
    object-position: center 44%;
  }

  .screen-step4 .photo-status,
  .screen-photo .photo-status,
  .screen-photo .photo-tip {
    margin-top: 6px;
    margin-bottom: 0;
  }

  .live-ar-diagnostics {
    gap: 5px;
    margin-top: 6px;
  }

  .diagnostic-chip {
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .screen-step4 .btn-row,
  .screen-photo .btn-row {
    margin-top: 8px;
  }

  .screen-step4 .lens-panel,
  .screen-photo .lens-panel {
    padding: 8px 0 4px;
  }

  .screen-step4 .lens-panel {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .screen-step4 .lens-panel .lens-grid,
  .screen-photo .lens-panel .lens-grid {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 8px 9px;
    width: 100%;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .screen-step4 .lens-btn,
  .screen-photo .lens-btn {
    flex: 0 0 var(--mobile-lens-card-width);
    min-width: var(--mobile-lens-card-width);
    scroll-snap-align: start;
    padding: 7px 6px 8px;
  }

  .screen-step4 .lens-btn .lens-name,
  .screen-photo .lens-btn .lens-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem;
  }

  .screen-step4 .lens-btn .lens-meta,
  .screen-photo .lens-btn .lens-meta {
    font-size: 0.68rem;
  }

  .option-grid.cols-2,
  .option-grid.cols-3 {
    grid-template-columns: 1fr;
  }

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

  .header-btn {
    padding: 7px 11px;
    font-size: 0.84rem;
  }
}
