:root {
  color-scheme: light dark;
  --paper: #f7f8f5;
  --paper-soft: #eef1ed;
  --ink: #111417;
  --ink-soft: #4e5963;
  --muted: #7a858f;
  --line: rgba(17, 20, 23, 0.12);
  --line-dark: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --camera: #050708;
  --camera-panel: rgba(8, 11, 14, 0.74);
  --accent: #18c29c;
  --accent-dark: #07745f;
  --blue: #2f7df6;
  --warning: #b7791f;
  --danger: #d94f44;
  --shadow: 0 24px 70px rgba(20, 28, 36, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  overflow-x: hidden;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, #fbfbf8 0%, var(--paper) 44%, #eaeee9 100%);
}

.start-screen,
.complete-screen {
  min-height: 100vh;
  min-height: 100dvh;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-hero {
  min-height: clamp(420px, 66vh, 620px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.start-topbar,
.complete-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 20, 23, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 0 44%, rgba(24, 194, 156, 0.95) 44% 56%, transparent 56%),
    #111417;
  box-shadow: inset 0 0 0 7px #f7f8f5;
}

.eyebrow,
.label {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.8rem, 13vw, 6.8rem);
  font-weight: 760;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 3.2vw, 1.28rem);
  line-height: 1.45;
}

.hero-preview {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, #dce3e3 0 56%, #313a42 56% 57%, #1d2328 57% 100%);
  box-shadow: var(--shadow);
}

.preview-sky,
.preview-road,
.preview-car,
.preview-frame {
  position: absolute;
}

.preview-sky {
  inset: 0 0 42%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52), transparent 42%),
    linear-gradient(180deg, #d7e4e8, #bcc8c7);
}

.preview-road {
  inset: 56% 0 0;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.22) 18% 19%, transparent 19% 81%, rgba(255, 255, 255, 0.22) 81% 82%, transparent 82%),
    #1e252b;
}

.preview-car {
  left: 50%;
  bottom: 18%;
  width: min(82%, 680px);
  aspect-ratio: 2.7;
  transform: translateX(-50%);
  border-radius: 35% 40% 18% 18% / 48% 52% 20% 20%;
  background: linear-gradient(180deg, #fafafa 0 48%, #c9d1d7 49% 100%);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.34);
}

.preview-glass {
  position: absolute;
  left: 24%;
  top: 10%;
  width: 36%;
  height: 34%;
  border-radius: 8px 28px 6px 8px;
  background: linear-gradient(135deg, #1d3240, #5a7482);
}

.preview-light {
  position: absolute;
  right: 8%;
  top: 54%;
  width: 13%;
  height: 12%;
  border-radius: 999px;
  background: #eef3ec;
}

.preview-wheel {
  position: absolute;
  bottom: -14%;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: clamp(8px, 2vw, 14px) solid #111417;
  background: #77838e;
}

.preview-wheel-left {
  left: 15%;
}

.preview-wheel-right {
  right: 14%;
}

.preview-frame {
  inset: 12%;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.08);
}

.status-badge,
.quality-strip span,
.step-type,
.score-row span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  font-weight: 760;
  white-space: nowrap;
}

.status-badge.is-ready {
  border-color: rgba(24, 194, 156, 0.42);
  background: rgba(24, 194, 156, 0.14);
  color: var(--accent-dark);
}

.status-badge.is-warning {
  border-color: rgba(183, 121, 31, 0.38);
  background: rgba(183, 121, 31, 0.12);
  color: #7a4c0c;
}

.session-panel,
.workflow-strip,
.preflight,
.route-card,
.support-panel,
.production-console,
.handoff-panel,
.review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.session-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
}

.session-main strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.05;
}

.session-main p,
.complete-copy,
.review-copy {
  color: var(--ink-soft);
  line-height: 1.45;
}

.session-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
}

.session-stats div {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.session-stats strong {
  font-size: 1.22rem;
  line-height: 1;
}

.session-stats span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.workflow-strip div {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.workflow-strip div:last-child {
  border-right: 0;
}

.workflow-strip span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.workflow-strip strong {
  font-size: 0.9rem;
}

.preflight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
  gap: 14px;
}

.preflight,
.route-card,
.support-panel {
  padding: 16px;
}

.preflight ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  line-height: 1.45;
}

.preflight li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  margin-bottom: 9px;
}

.preflight li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 0.56em;
  border-radius: 50%;
  background: var(--accent);
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-card strong {
  display: block;
  font-size: 1.16rem;
}

.route-preview {
  display: grid;
  gap: 8px;
}

.route-preview div {
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.route-preview span:first-child {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 760;
}

.route-preview span:last-child {
  color: var(--muted);
  font-size: 0.75rem;
}

.support-panel {
  color: var(--ink-soft);
  line-height: 1.45;
}

.production-console {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.console-header,
.handoff-summary,
.queue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.console-header strong,
.handoff-summary strong {
  display: block;
  font-size: 1.05rem;
}

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

.console-grid div {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.48);
}

.console-grid span,
.queue-header span,
.queue-item span,
.final-checklist span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
}

.console-grid strong {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.queue-preview {
  display: grid;
  gap: 10px;
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-empty {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.54);
}

.queue-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.queue-status {
  min-width: 92px;
  text-align: right;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 760;
}

.queue-progress {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 20, 23, 0.08);
}

.queue-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 240ms ease;
}

.primary-action,
.secondary-action,
.icon-button {
  min-height: 48px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  background: #111417;
  color: #fff;
  box-shadow: 0 12px 34px rgba(17, 20, 23, 0.18);
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 0 14px;
}

.icon-button {
  width: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  backdrop-filter: blur(16px);
}

.icon-button span {
  display: block;
  transform: translateY(-1px);
  font-size: 1rem;
  font-weight: 820;
}

.camera-screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--camera);
  color: #fff;
}

.camera-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 25%, transparent 58%, rgba(0, 0, 0, 0.72)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.28));
}

.camera-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.capture-header,
.capture-timeline,
.quality-strip,
.capture-controls,
.guidance-panel {
  pointer-events: auto;
}

.capture-header {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.step-heading {
  min-width: 0;
  text-align: center;
}

.step-heading span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
  font-weight: 800;
}

.step-heading strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 1rem;
}

.progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.capture-timeline {
  min-height: 44px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 9px 0 2px;
  scrollbar-width: none;
}

.capture-timeline::-webkit-scrollbar {
  display: none;
}

.timeline-dot {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.timeline-dot.is-complete {
  border-color: rgba(24, 194, 156, 0.45);
  background: rgba(24, 194, 156, 0.24);
  color: #fff;
}

.timeline-dot.is-active {
  min-width: 92px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.mask-layer {
  position: relative;
  min-height: 0;
}

.mask-layer svg {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(90vw, 880px);
  height: auto;
  max-height: 57vh;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 18px rgba(0, 0, 0, 0.48));
}

.mask-line {
  fill: rgba(0, 0, 0, 0.02);
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mask-accent {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.grid-overlay {
  position: absolute;
  inset: 122px 12px 148px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(90deg, transparent 33%, rgba(255, 255, 255, 0.16) 33% 34%, transparent 34% 66%, rgba(255, 255, 255, 0.16) 66% 67%, transparent 67%),
    linear-gradient(0deg, transparent 33%, rgba(255, 255, 255, 0.16) 33% 34%, transparent 34% 66%, rgba(255, 255, 255, 0.16) 66% 67%, transparent 67%);
}

.guidance-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 126px;
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 11px;
  background: var(--camera-panel);
  backdrop-filter: blur(18px);
}

.guidance-panel > div {
  display: grid;
  gap: 5px;
}

.guidance-panel p {
  color: #fff;
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1.25;
}

.step-type {
  width: max-content;
  border-color: rgba(24, 194, 156, 0.42);
  background: rgba(24, 194, 156, 0.18);
  color: #fff;
}

.quality-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quality-strip span {
  justify-content: center;
  min-width: 0;
  border-color: var(--line-dark);
  background: rgba(0, 0, 0, 0.26);
  color: #fff;
  padding: 0 8px;
}

.quality-strip .is-good {
  border-color: rgba(24, 194, 156, 0.52);
  background: rgba(24, 194, 156, 0.22);
}

.quality-strip .is-warning {
  border-color: rgba(242, 184, 75, 0.58);
  background: rgba(183, 121, 31, 0.22);
}

.capture-controls {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.camera-screen .secondary-action {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(16px);
}

.shutter-button {
  justify-self: center;
  width: 84px;
  height: 84px;
  border: 5px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.95),
    0 10px 28px rgba(0, 0, 0, 0.32);
}

.shutter-button.is-recording {
  border-color: var(--danger);
  box-shadow:
    inset 0 0 0 24px var(--danger),
    0 10px 28px rgba(0, 0, 0, 0.32);
}

.review-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #111417;
  color: #fff;
}

.review-media {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px 0;
}

.review-media img,
.review-media video {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.review-panel {
  margin: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.review-panel .label,
.review-copy {
  color: rgba(255, 255, 255, 0.66);
}

.review-copy {
  margin-top: 8px;
  font-size: 0.92rem;
}

.score-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.score-row span {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.score-row span:first-child {
  border-color: rgba(24, 194, 156, 0.5);
  background: rgba(24, 194, 156, 0.2);
}

.quality-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.quality-metric {
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.quality-metric span,
.quality-metric strong {
  display: block;
}

.quality-metric span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 760;
}

.quality-metric strong {
  margin-top: 6px;
  color: #fff;
  font-size: 1.08rem;
}

.review-actions {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 10px;
}

.review-screen .primary-action {
  background: #fff;
  color: var(--ink);
}

.review-screen .secondary-action {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.complete-header h1 {
  max-width: 680px;
}

.handoff-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.final-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.final-checklist div {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.final-checklist strong {
  margin-top: 6px;
  font-size: 1rem;
}

.final-checklist .is-ready strong {
  color: var(--accent-dark);
}

.final-checklist .is-pending strong {
  color: #7a4c0c;
}

/* Production camera experience */
.camera-overlay {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
}

.capture-header {
  min-height: 116px;
  grid-template-columns: 58px minmax(0, 1fr) 78px;
  align-items: start;
  gap: 10px;
}

.capture-header .icon-button {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.step-heading {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.step-heading span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.step-heading strong {
  color: #fff;
  font-size: clamp(1.38rem, 5.5vw, 2rem);
  font-weight: 840;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step-heading em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #68c91f;
  font-size: clamp(1.02rem, 4.6vw, 1.4rem);
  font-style: normal;
  font-weight: 820;
  line-height: 1.08;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.quality-meter {
  --quality: 96;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(5, 7, 8, 0.9) 0 56%, transparent 57%),
    conic-gradient(#68c91f calc(var(--quality) * 1%), rgba(255, 255, 255, 0.22) 0);
  box-shadow: 0 0 22px rgba(104, 201, 31, 0.2);
}

.quality-meter span {
  margin-top: 7px;
  font-size: 1.22rem;
  font-weight: 860;
}

.quality-meter small {
  margin-top: -14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.58rem;
  font-weight: 820;
  text-transform: uppercase;
}

.progress-track {
  display: none;
}

.capture-timeline {
  width: min(100%, 360px);
  min-height: 16px;
  justify-content: center;
  gap: 8px;
  overflow: visible;
  padding: 4px 0 0;
}

.timeline-dot {
  min-width: 35px;
  width: 35px;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: transparent;
  backdrop-filter: none;
}

.timeline-dot.is-active,
.timeline-dot.is-complete {
  min-width: 35px;
  background: #68c91f;
  color: transparent;
}

.viewfinder-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.viewfinder-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 33%, rgba(255, 255, 255, 0.2) 33% 33.2%, transparent 33.2% 66.6%, rgba(255, 255, 255, 0.2) 66.6% 66.8%, transparent 66.8%),
    linear-gradient(0deg, transparent 49.8%, rgba(255, 255, 255, 0.2) 49.8% 50%, transparent 50%);
  pointer-events: none;
}

.segmentation-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.segmentation-canvas.has-mask {
  opacity: 1;
}

.vision-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.vision-box {
  position: absolute;
  min-width: 36px;
  min-height: 36px;
  border: 2px solid #68c91f;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(5, 7, 8, 0.56),
    0 0 22px rgba(104, 201, 31, 0.28);
}

.vision-box span {
  position: absolute;
  left: 5px;
  top: 5px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  border: 1px solid rgba(104, 201, 31, 0.42);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(5, 7, 8, 0.82);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.vision-signal {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
  max-width: min(72%, 320px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(5, 7, 8, 0.72);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}

.vision-signal.is-good {
  border-color: rgba(104, 201, 31, 0.5);
  background: rgba(13, 46, 32, 0.74);
  color: #fff;
}

.vision-signal.is-warning {
  border-color: rgba(242, 184, 75, 0.58);
  background: rgba(64, 42, 11, 0.74);
  color: #fff;
}

.vision-signal.is-muted {
  color: rgba(255, 255, 255, 0.66);
}

.mask-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.mask-layer svg {
  width: min(92vw, 760px);
  max-height: 62vh;
}

.mask-line {
  stroke: rgba(104, 201, 31, 0.96);
  stroke-width: 3.5;
}

.mask-accent {
  stroke: rgba(104, 201, 31, 0.92);
  stroke-width: 3;
}

.viewfinder-corners {
  position: absolute;
  inset: 26px;
  z-index: 5;
  pointer-events: none;
}

.viewfinder-corners span {
  position: absolute;
  width: 42px;
  height: 42px;
  border-color: #68c91f;
  border-style: solid;
}

.viewfinder-corners span:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 5px 0 0 5px;
  border-radius: 12px 0 0;
}

.viewfinder-corners span:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 5px 5px 0 0;
  border-radius: 0 12px 0 0;
}

.viewfinder-corners span:nth-child(3) {
  bottom: 0;
  right: 0;
  border-width: 0 5px 5px 0;
  border-radius: 0 0 12px;
}

.viewfinder-corners span:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 5px 5px;
  border-radius: 0 0 0 12px;
}

.focus-cross {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 5;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.focus-cross::before,
.focus-cross::after {
  content: "";
  position: absolute;
  background: #fff;
}

.focus-cross::before {
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  transform: translateX(-50%);
}

.focus-cross::after {
  left: 0;
  top: 50%;
  width: 100%;
  height: 3px;
  transform: translateY(-50%);
}

.zoom-control {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 6;
  width: 68px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(9, 12, 15, 0.72);
  color: #68c91f;
  font-weight: 840;
  font-size: 0.72rem;
  backdrop-filter: blur(16px);
}

.grid-overlay {
  inset: 0;
  border: 0;
}

.guidance-panel {
  position: static;
  width: min(100%, 560px);
  justify-self: center;
  grid-template-columns: auto 1fr;
  margin-top: -76px;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(14, 18, 22, 0.82);
}

.guidance-panel .step-type {
  width: 12px;
  min-width: 12px;
  min-height: 12px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #68c91f;
  color: transparent;
}

.guidance-panel p {
  font-size: clamp(0.96rem, 3.6vw, 1.14rem);
  font-weight: 780;
}

.position-panel {
  width: min(100%, 620px);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(10, 14, 18, 0.78);
  backdrop-filter: blur(18px);
}

.position-panel > strong {
  grid-column: 1 / -1;
  padding: 12px 14px 4px;
  color: #68c91f;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.position-panel div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 12px 14px;
  text-align: center;
}

.position-panel div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.position-panel span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
}

.position-panel p {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.25;
}

.quality-strip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.capture-controls {
  grid-template-columns: 82px minmax(96px, 1fr) 82px;
  padding-top: 0;
}

.last-capture-button,
.tips-button {
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 820;
  backdrop-filter: blur(16px);
}

.last-capture-button {
  overflow: hidden;
  padding: 5px;
}

.last-capture-button span {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)),
    rgba(0, 0, 0, 0.22);
  background-position: center;
  background-size: cover;
}

.tips-button {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.shutter-button {
  width: 88px;
  height: 88px;
  background: #fff;
  box-shadow:
    inset 0 0 0 7px #fff,
    inset 0 0 0 12px rgba(0, 0, 0, 0.72),
    0 12px 34px rgba(0, 0, 0, 0.38);
}

.professional-tip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px 18px;
  background: rgba(8, 12, 16, 0.82);
  backdrop-filter: blur(18px);
}

.professional-tip span {
  display: block;
  color: #68c91f;
  font-size: 0.78rem;
  font-weight: 840;
  text-transform: uppercase;
}

.professional-tip p {
  margin-top: 4px;
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.35;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: 0 12px 34px rgba(20, 28, 36, 0.08);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #000;
}

.gallery-caption {
  min-height: 58px;
  padding: 10px;
}

.gallery-caption strong,
.gallery-caption span {
  display: block;
}

.gallery-caption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.gallery-caption span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 720px) {
  .studio-hero {
    min-height: 620px;
  }

  .session-panel,
  .preflight-grid {
    grid-template-columns: 1fr;
  }

  .console-grid,
  .final-checklist {
    grid-template-columns: 1fr;
  }

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

  .session-stats div {
    min-height: 64px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
  }
}

@media (max-width: 560px) {
  .start-screen,
  .complete-screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  .studio-hero {
    min-height: 600px;
  }

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

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

  .workflow-strip div:nth-child(2) {
    border-right: 0;
  }

  .workflow-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .capture-controls {
    grid-template-columns: 76px 1fr 76px;
  }

  .camera-screen .secondary-action {
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .guidance-panel {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .guidance-panel > div {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .session-stats strong {
    font-size: 1rem;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .capture-timeline {
    display: none;
  }

  .mask-layer svg {
    max-height: 54vh;
  }

  .guidance-panel {
    left: 96px;
    right: 96px;
    bottom: 84px;
  }

  .capture-controls {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .quality-strip {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    transform: translateY(-86px);
  }
}

.camera-screen .quality-strip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (orientation: landscape) and (max-height: 540px) {
  .camera-overlay {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .position-panel,
  .professional-tip {
    display: none;
  }

  .capture-header {
    min-height: 64px;
  }

  .viewfinder-stage {
    min-height: 0;
  }

  .guidance-panel,
  .capture-controls {
    position: static;
  }
}
