@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/montserrat-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/montserrat-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/montserrat-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/montserrat-700.ttf') format('truetype');
}

:root {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #000;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-width: min(320px, 100%);
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}
:root {
  --blue: #2855af;
  --blue-dark: #1e438c;
  --ink: #000;
  --muted: #808080;
  --soft: #a3a3a8;
  --line: rgba(0, 0, 0, 0.14);
  --surface: #fff;
  --good: #29e276;
  --bad: #ef2929;
  --selected: #2855af;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.app,
.screen-transition,
.screen {
  width: 100%;
  min-height: 100svh;
}

.app {
  color: var(--ink);
  background: #fff;
}

.screen-transition {
  animation: screen-in 220ms ease-out;
}

.screen {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.button {
  display: inline-flex;
  width: min(940px, 100%);
  min-height: 80px;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
  border: 4px solid var(--blue);
  border-radius: 20px;
  color: #fff;
  background: var(--blue);
  font-size: clamp(22px, 2.4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  background: var(--blue-dark);
  box-shadow: 0 10px 28px rgba(40, 85, 175, 0.22);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.close-button:focus-visible,
.picker-close:focus-visible,
.picker-start:focus-visible,
.details-link:focus-visible,
.answer-buttons button:focus-visible,
.number-buttons button:focus-visible,
.result-heading:focus-visible,
.show-all:focus-visible,
.text-button:focus-visible,
.ring-wheel path:focus-visible {
  outline: 4px solid rgba(40, 85, 175, 0.3);
  outline-offset: 4px;
}

.button--outline,
.button--outline-dark {
  color: var(--blue);
  background: #fff;
}

.button--outline:hover,
.button--outline-dark:hover {
  color: #fff;
  background: var(--blue);
}

.top-title {
  position: absolute;
  z-index: 10;
  top: 26px;
  left: 50%;
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
  transform: translateX(-50%);
}

.close-button {
  position: absolute;
  z-index: 30;
  top: 70px;
  right: 64px;
  display: grid;
  width: 60px;
  height: 60px;
  padding: 0 0 5px;
  place-items: center;
  border: 3px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.close-button:hover {
  color: #fff;
  background: var(--blue);
  transform: rotate(4deg);
}

.progress-dots {
  position: absolute;
  z-index: 12;
  bottom: 18px;
  left: 50%;
  display: flex;
  gap: 18px;
  transform: translateX(-50%);
}

.progress-dots span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  transition: background 180ms ease, transform 180ms ease;
}

.progress-dots span.is-active {
  background: var(--blue);
  transform: scale(1.08);
}

/* Home */

.screen--home {
  display: grid;
  place-items: center;
  padding: 38px 24px;
}

.home-content {
  display: flex;
  width: min(940px, 100%);
  flex-direction: column;
  align-items: center;
}

.eye-logo {
  display: block;
  width: min(862px, 92vw);
  height: auto;
  margin: 0 auto clamp(22px, 3.5vh, 48px);
  object-fit: contain;
}

.home-content h1 {
  margin: 0 0 clamp(28px, 4.5vh, 54px);
  color: var(--blue);
  font-size: clamp(42px, 5.2vw, 80px);
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
}

.home-content .button + .button {
  margin-top: 24px;
}

/* Picker overlay */

.screen--picker {
  display: grid;
  place-items: center;
}

.picker-home {
  display: flex;
  width: min(780px, calc(100% - 80px));
  flex-direction: column;
  align-items: center;
  opacity: 0.22;
  filter: blur(2px);
}

.picker-home .eye-logo {
  margin-bottom: 30px;
}

.picker-home h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(38px, 5vw, 72px);
  text-align: center;
}

.picker-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 32px 20px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.picker-panel {
  position: relative;
  width: min(620px, 100%);
  padding: 40px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.picker-panel h1 {
  margin: 0 54px 30px;
  color: var(--blue);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}

.picker-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.picker-grid {
  display: grid;
  gap: 14px;
}

.picker-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.picker-start {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  border: 3px solid var(--blue);
  border-radius: 14px;
  color: var(--blue);
  background: #fff;
  font-size: 21px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.picker-start:hover {
  color: #fff;
  background: var(--blue);
}

.picker-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.picker-start:hover .picker-icon path {
  fill: currentColor;
}

.details-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* Detail pages */

.screen--details {
  overflow-y: auto;
  padding: 110px 24px 80px;
}

.detail-back {
  position: fixed;
  z-index: 30;
  top: 34px;
  left: 38px;
  width: 60px;
  height: 60px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.detail-panel {
  width: min(980px, 100%);
  margin: 0 auto;
}

.detail-intro,
.detail-section {
  padding: clamp(32px, 5vw, 64px);
  border: 3px solid rgba(40, 85, 175, 0.2);
  border-radius: 24px;
}

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

.detail-intro h1,
.detail-section h2 {
  margin: 0;
  color: var(--blue);
  font-weight: 600;
}

.detail-intro h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
}

.detail-intro p,
.detail-section > p {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.5;
}

.detail-intro .button {
  margin-top: 38px;
  font-size: clamp(18px, 2vw, 28px);
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  font-size: clamp(30px, 4vw, 52px);
}

.detail-comparison {
  display: grid;
  width: min(680px, 100%);
  margin: 40px auto 0;
  place-items: center;
}

.detail-comparison figcaption {
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.detail-illustration {
  display: grid;
  width: min(440px, 90%);
  min-height: 280px;
  place-items: center;
  border-radius: 22px;
  background: #f4faff;
}

.detail-illustration img {
  display: block;
  width: min(330px, 82%);
  max-height: 330px;
  object-fit: contain;
}

.detail-illustration .picker-icon {
  width: 190px;
  height: 190px;
}

/* Consent */

.screen--consent {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 70px 30px;
}

.screen--consent .top-title {
  display: none;
}

.consent-panel {
  width: min(1155px, 100%);
  text-align: center;
}

.consent-panel h1 {
  margin: 0 0 36px;
  color: var(--blue);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.2;
}

.consent-copy {
  display: grid;
  gap: 18px;
}

.consent-copy p {
  margin: 0;
  color: #000;
  font-size: clamp(16px, 1.65vw, 24px);
  font-weight: 500;
  line-height: 1.55;
}

.consent-panel .button {
  margin-top: 42px;
}

/* Guides */

.calibration-reset {
  margin-top: 16px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}

.picker-panel .picker-calibration {
  display: block;
  margin: -12px auto 24px;
  min-height: 44px;
  text-underline-offset: 4px;
}

.screen--guide {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 74px 30px 132px;
  text-align: center;
}

.screen--guide .top-title {
  display: none;
}

.screen--guide .guide-visual {
  position: relative;
  display: grid;
  width: min(880px, 100%);
  min-height: 300px;
  place-items: center;
}

.guide-copy {
  width: min(980px, 100%);
  margin: 30px auto 0;
  color: #000;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.25;
}

.guide-copy strong {
  color: var(--blue);
  font-weight: 700;
}

.screen--guide > .button {
  position: absolute;
  bottom: 52px;
  width: min(520px, calc(100% - 60px));
  min-height: 64px;
  border-width: 3px;
  border-radius: 16px;
  font-size: clamp(18px, 2vw, 26px);
}

.guide-asset {
  display: block;
  object-fit: contain;
}

.guide-asset--prepare {
  width: min(760px, 82vw);
  max-height: 330px;
}

.prepare-visual {
  position: relative;
  width: min(760px, 82vw);
  aspect-ratio: 720 / 260;
}

.prepare-visual .guide-asset--prepare {
  width: 100%;
  height: 100%;
  max-height: none;
}

.prepare-visual__contact-lens {
  position: absolute;
  top: 13.3%;
  right: 1.1%;
  width: 25%;
  aspect-ratio: 1;
  object-fit: contain;
}

.guide-asset--eyes {
  width: min(430px, 72vw);
  max-height: 320px;
}

.guide-asset--eyes.is-mirrored {
  transform: scaleX(-1);
}

.guide-asset--distance {
  width: min(760px, 84vw);
  max-height: 330px;
}

.eyes-visual {
  display: flex;
  align-items: center;
  gap: 30px;
}

.eyes-visual__eye {
  position: relative;
  width: min(230px, 30vw);
  flex: 0 1 auto;
}

.eyes-visual__eye > img:first-child {
  display: block;
  width: 100%;
  height: auto;
}

.eyes-visual__hand {
  position: absolute;
  z-index: 2;
  top: 42%;
  right: 16%;
  width: 50%;
  height: auto;
  animation: eyes-hand-cover 2.4s ease-in-out infinite;
}

.eyes-visual__eye--left .eyes-visual__hand {
  right: auto;
  left: 16%;
  animation-name: eyes-hand-cover-left;
}

.eyes-visual--covered {
  width: min(330px, 54vw);
  justify-content: center;
  gap: clamp(10px, 1.6vw, 18px);
}

.eyes-visual--covered .eyes-visual__eye {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
}

@keyframes eyes-hand-cover {
  0%,
  100% {
    transform: translateY(28%);
  }

  42%,
  68% {
    transform: translateY(-28%);
  }
}

@keyframes eyes-hand-cover-left {
  0%,
  100% {
    transform: translateY(28%) scaleX(-1);
  }

  42%,
  68% {
    transform: translateY(-28%) scaleX(-1);
  }
}

.eyes-visual i {
  display: block;
  width: 2px;
  height: 160px;
  background: rgba(0, 0, 0, 0.16);
}

/* Brightness guide */

.screen--guide-brightness .guide-visual {
  min-height: 270px;
}

.brightness-visual {
  --brightness-thumb: 64px;
  --brightness-track: 8px;
  display: grid;
  width: min(1100px, 74vw);
  grid-template-columns: 112px minmax(0, 1fr) 114px;
  align-items: center;
  gap: 35px;
}

.sun-icon {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  color: #000;
  background: rgba(0, 0, 0, 0.08);
  font-size: 67px;
  font-weight: 400;
  line-height: 1;
}

.brightness-visual output {
  display: grid;
  width: 100%;
  height: 58px;
  padding: 0;
  place-items: center;
  border-radius: 18px;
  color: #000;
  background: rgba(0, 0, 0, 0.1);
  font-size: 32px;
  font-weight: 400;
  text-align: center;
}

.brightness-slider {
  position: relative;
  width: 100%;
  height: 112px;
}

.brightness-slider input {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0;
  width: 100%;
  margin: 0;
  opacity: 1;
  background: transparent;
  appearance: none;
  accent-color: var(--blue);
  cursor: default;
  pointer-events: none;
  transform: translateY(-50%);
  -webkit-appearance: none;
}

.brightness-slider input::-webkit-slider-runnable-track {
  height: var(--brightness-track);
  border-radius: 10px;
  background: linear-gradient(to right, var(--blue) 0 var(--brightness-value), #ddd var(--brightness-value));
}

.brightness-slider input::-moz-range-track {
  height: var(--brightness-track);
  border: 0;
  border-radius: 10px;
  background: linear-gradient(to right, var(--blue) 0 var(--brightness-value), #ddd var(--brightness-value));
}

.brightness-slider input::-webkit-slider-thumb {
  width: var(--brightness-thumb);
  height: var(--brightness-thumb);
  margin-top: calc((var(--brightness-track) - var(--brightness-thumb)) / 2);
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  -webkit-appearance: none;
}

.brightness-slider input::-moz-range-thumb {
  width: var(--brightness-thumb);
  height: var(--brightness-thumb);
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.brightness-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: calc(var(--brightness-value) - 12px);
  width: 120px;
  height: 30px;
  background: var(--blue);
  clip-path: polygon(0 35%, 72% 35%, 72% 0, 100% 50%, 72% 100%, 72% 65%, 0 65%);
  transform: translateY(-50%);
  transform-origin: left center;
  animation: brightness-arrow-increase 1.35s ease-in-out infinite;
  pointer-events: none;
}

.brightness-hand {
  position: absolute;
  z-index: 4;
  top: 70px;
  left: calc(var(--brightness-value) - 12px);
  width: 105px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
}

.screen--guide-brightness .guide-copy {
  width: min(1600px, 86vw);
  font-weight: 600;
}

@keyframes brightness-arrow-increase {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(-50%) scaleX(0.82);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
}

/* Calibration guide */

.screen--guide-calibration {
  padding-top: 44px;
}

.screen--guide-calibration .guide-visual {
  width: 100%;
  min-height: min(620px, calc(100svh - 190px));
}

.calibrate-ground {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.card-animation-shadow {
  display: none;
}

.calibrate-ground-content,
.calibrate-screen {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
}

.calibrate-screen {
  justify-content: center;
}

.sliding-content {
  position: relative;
  display: flex;
  width: min(820px, 100%);
  min-height: 400px;
  align-items: center;
  justify-content: center;
  gap: 42px;
}

.credit-card-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(620px, calc(100% - 100px));
  min-width: 0;
  min-height: 400px;
  place-items: center;
}

.sliding-card {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border: 5px dashed var(--blue);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

.card-text .small {
  margin: 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.slider-container {
  position: relative;
  display: grid;
  width: 58px;
  height: 340px;
  place-items: center;
}

.slider {
  position: absolute;
  top: calc(50% - 5px);
  left: calc(50% - 150px);
  width: 300px;
  height: 10px;
  margin: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  transform: rotate(-90deg);
  transform-origin: center;
  -webkit-appearance: none;
}

.slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--blue) 0 var(--calibration-value), #d8d8d8 var(--calibration-value));
}

.slider::-moz-range-track {
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--blue) 0 var(--calibration-value), #d8d8d8 var(--calibration-value));
}

.slider::-webkit-slider-thumb {
  width: 38px;
  height: 38px;
  margin-top: calc((10px - 38px) / 2);
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  -webkit-appearance: none;
}

.slider::-moz-range-thumb {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
}

.info-text {
  width: min(880px, 100%);
  color: #000;
  font-size: clamp(22px, 2.7vw, 36px);
  line-height: 1.25;
  text-align: center;
}

.info-text strong {
  color: var(--blue);
}

/* Ring guide */

.screen--guide-ring-guide .guide-visual {
  min-height: 430px;
}

.lottie-guide-animation,
.ring-guide-visual {
  display: block;
  width: 420px;
  height: 430px;
}

.screen--guide-ring-guide .guide-copy {
  margin-top: 8px;
}

/* Test screens */

.screen--test {
  min-height: 100svh;
}

.screen--test .top-title {
  top: 66px;
  left: 70px;
  width: min(480px, 36vw);
  font-size: clamp(26px, 3.1vw, 40px);
  line-height: 1.08;
  text-align: left;
  transform: none;
}

.test-instruction {
  position: absolute;
  z-index: 8;
  top: 130px;
  left: 70px;
  width: min(540px, 38vw);
  color: #000;
  font-size: clamp(16px, 1.65vw, 24px);
  line-height: 1.45;
}

.test-instruction ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.test-instruction li + li {
  margin-top: 8px;
}

.instruction-number {
  margin-right: 6px;
  color: var(--blue);
  font-weight: 700;
}

.test-instruction strong {
  color: var(--blue);
  font-weight: 700;
}

.test-prompt {
  margin: 18px 0 0;
  color: var(--blue);
  font-weight: 600;
}

.test-card {
  position: absolute;
  top: 44px;
  left: 65%;
  width: 540px;
  height: 620px;
  background: transparent;
  transform: translateX(-50%);
}

.landolt-mark {
  display: block;
  overflow: visible;
  fill: #000;
  transform: rotate(var(--mark-rotation));
  transform-origin: center;
}

.test-card > .landolt-mark--small {
  position: absolute;
  top: 36px;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translateX(-50%) rotate(var(--mark-rotation));
}

.screen--test-contrast .test-card > .landolt-mark--contrast {
  width: 120px;
  height: 120px;
}

.ring-wheel-wrap {
  position: absolute;
  top: 132px;
  left: 50%;
  width: 500px;
  transform: translateX(-50%);
}

.screen--test-contrast .ring-wheel-wrap {
  top: max(190px, calc(36px + var(--test-mark-size, 120px) + 34px));
}

.ring-wheel {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ring-wheel path {
  fill: #000;
  cursor: pointer;
  outline: none;
  transition: fill 150ms ease, opacity 150ms ease;
}

.ring-wheel path:hover {
  fill: var(--blue);
}

.ring-wheel path.is-answer {
  fill: #fff;
}

.feedback-mark {
  position: absolute;
  z-index: 15;
  top: 50%;
  left: 50%;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 80px;
  font-weight: 500;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: feedback-in 180ms ease-out;
}

.feedback-mark.is-correct {
  background: var(--good);
}

.feedback-mark.is-incorrect {
  background: var(--bad);
}

.screen--test > .progress-dots {
  bottom: 30px;
}

.screen--test-color .test-card,
.screen--test-astigmatism .test-card,
.screen--test-field .test-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.color-plate {
  display: block;
  width: 450px;
  height: 450px;
  border-radius: 20px;
  object-fit: contain;
}

.number-buttons {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.number-buttons button,
.answer-buttons button {
  min-width: 100px;
  min-height: 76px;
  padding: 10px 20px;
  border: 4px solid var(--blue);
  border-radius: 18px;
  color: var(--blue);
  background: #fff;
  font-size: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.number-buttons button:hover,
.answer-buttons button:hover {
  color: #fff;
  background: var(--blue);
}

.number-buttons button:last-child {
  min-width: 150px;
}

.astigmatism-visual {
  display: block;
  width: 520px;
  max-height: 320px;
  object-fit: contain;
}

.answer-buttons {
  display: flex;
  justify-content: center;
  gap: 38px;
  margin-top: 42px;
}

.answer-buttons button {
  min-width: 210px;
  min-height: 92px;
  font-size: 34px;
}

.field-visual {
  position: relative;
  width: 450px;
  height: 450px;
}

.field-visual img {
  display: block;
  width: 100%;
  height: 100%;
}

.field-visual span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #000;
  transform: translate(-50%, -50%);
}

/* Per-test result */

.screen--result-step {
  display: grid;
  min-height: 100svh;
  overflow-y: auto;
  place-items: center;
  padding: 80px 24px;
}

.screen--result-step .top-title {
  display: none;
}

.step-result-card {
  width: min(940px, 100%);
  text-align: center;
}

.result-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.result-title h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 600;
}

.result-icon {
  display: block;
  width: 72px;
  height: 72px;
  border: 5px solid var(--blue);
  border-radius: 50%;
}

.result-icon--excellent {
  background: var(--good);
}

.result-icon--reduced {
  background: var(--bad);
}

.result-summary > p {
  margin: 30px auto;
  font-size: clamp(20px, 2.3vw, 32px);
  line-height: 1.35;
}

.eye-results {
  display: flex;
  justify-content: center;
  gap: 90px;
}

.eye-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.eye-result svg {
  display: block;
  width: 120px;
  height: 76px;
}

.eye-result__outline {
  fill: #fff;
  stroke: #000;
  stroke-width: 3;
}

.eye-result__face {
  stroke: #000;
  stroke-width: 2;
}

.eye-result.is-good .eye-result__face {
  fill: var(--good);
}

.eye-result.is-bad .eye-result__face {
  fill: var(--bad);
}

.eye-result__eye {
  fill: #000;
}

.eye-result__mouth {
  fill: none;
  stroke: #000;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.step-progress {
  display: grid;
  width: min(720px, 100%);
  grid-template-columns: 1fr 1fr;
  margin: 38px auto;
  border: 3px solid rgba(40, 85, 175, 0.28);
  border-radius: 18px;
}

.step-progress > div {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.step-progress > div + div {
  border-left: 2px solid rgba(40, 85, 175, 0.2);
}

.step-progress b {
  color: var(--blue);
  font-size: 28px;
}

.step-progress span {
  color: var(--muted);
  font-size: 16px;
}

.result-actions .text-button {
  display: block;
  margin: 24px auto 0;
  border: 0;
  color: var(--blue);
  background: none;
  font-size: 22px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}

/* Aggregate results */

.screen--results {
  overflow-y: auto;
  padding: 110px 24px 80px;
}

.results-panel {
  width: min(940px, 100%);
  margin: 0 auto;
}

.results-panel > h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(40px, 5vw, 70px);
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
}

.show-all {
  display: block;
  margin: 26px auto 34px;
  border: 0;
  color: var(--blue);
  background: none;
  font-size: 20px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}

.results-list {
  display: grid;
  gap: 14px;
}

.result-section {
  overflow: hidden;
  border: 3px solid var(--blue);
  border-radius: 18px;
  background: #fff;
}

.result-heading {
  display: grid;
  width: 100%;
  min-height: 84px;
  grid-template-columns: 54px 1fr 28px;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border: 0;
  color: #000;
  background: #fff;
  font-size: 23px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.result-heading .result-icon {
  width: 46px;
  height: 46px;
  border-width: 3px;
}

.result-heading b {
  color: var(--blue);
  font-size: 28px;
}

.result-body {
  padding: 4px 28px 30px;
  border-top: 2px solid rgba(40, 85, 175, 0.16);
}

.result-body p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
}

.optician-card {
  margin-top: 34px;
  padding: 42px;
  border-radius: 22px;
  color: #fff;
  background: var(--blue);
  text-align: center;
}

.optician-illustration {
  font-size: 52px;
}

.optician-card h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.4vw, 44px);
}

.optician-card p {
  margin: 18px auto 28px;
  font-size: 18px;
  line-height: 1.45;
}

.optician-card button {
  min-height: 58px;
  padding: 10px 24px;
  border: 3px solid #fff;
  border-radius: 14px;
  color: var(--blue);
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

/* Exit */

.screen--exit {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  text-align: center;
}

.screen--exit h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(42px, 6vw, 80px);
  font-weight: 600;
  line-height: 1.1;
}

.screen--exit > p {
  margin: 28px 0 48px;
  font-size: clamp(18px, 2.6vw, 36px);
  line-height: 1.4;
}

.exit-actions {
  display: flex;
  width: min(940px, 100%);
  flex-direction: column;
  gap: 24px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.36);
}

.info-modal {
  position: relative;
  width: min(620px, 100%);
  padding: 40px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.info-modal > button {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  color: var(--blue);
  background: none;
  font-size: 34px;
}

.info-modal h2 {
  margin: 0;
  color: var(--blue);
  font-size: 36px;
}

.info-modal p {
  margin: 22px 0 30px;
  font-size: 18px;
  line-height: 1.5;
}

.desktop-only {
  display: initial;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes feedback-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.75); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes hand-nudge {
  0%, 100% { transform: translateX(-6px); }
  50% { transform: translateX(8px); }
}

@media (max-width: 1080px) and (min-width: 701px) {
  .screen--test .top-title,
  .test-instruction {
    left: 34px;
    width: 38vw;
  }

  .test-card {
    left: 68%;
    width: 450px;
  }

  .ring-wheel-wrap {
    width: 420px;
  }

  .color-plate,
  .field-visual {
    width: 390px;
    height: 390px;
  }

  .astigmatism-visual {
    width: 430px;
  }

  .answer-buttons button {
    min-width: 160px;
  }
}

@media (max-width: 700px) {
  .button {
    min-height: 58px;
    padding: 10px 18px;
    border-width: 3px;
    border-radius: 12px;
    font-size: 20px;
  }

  .close-button {
    top: 22px;
    right: 22px;
    width: 42px;
    height: 42px;
    padding-bottom: 3px;
    border-width: 2px;
    font-size: 30px;
  }

  .top-title {
    top: 28px;
    font-size: 14px;
  }

  .progress-dots {
    bottom: 12px;
    gap: 10px;
  }

  .progress-dots span {
    width: 15px;
    height: 15px;
  }

  .screen--home {
    padding: 28px 30px;
  }

  .eye-logo {
    width: 100%;
    margin-bottom: 34px;
  }

  .home-content h1 {
    margin-bottom: 32px;
    font-size: 32px;
    line-height: 1.15;
  }

  .home-content .button + .button {
    margin-top: 18px;
  }

  .picker-backdrop {
    align-items: start;
    padding: 18px 14px;
  }

  .picker-panel {
    padding: 30px 18px 22px;
    border-radius: 18px;
  }

  .picker-panel h1 {
    margin: 6px 46px 22px;
    font-size: 28px;
  }

  .picker-card {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .picker-start {
    min-height: 58px;
    padding: 8px 14px;
    border-width: 2px;
    border-radius: 12px;
    font-size: 17px;
  }

  .picker-icon {
    width: 32px;
    height: 32px;
  }

  .details-link {
    min-height: 30px;
    justify-content: flex-end;
    padding-right: 4px;
    font-size: 13px;
  }

  .screen--details {
    padding: 88px 14px 44px;
  }

  .detail-back {
    top: 22px;
    left: 18px;
    width: 42px;
    height: 42px;
    border-width: 2px;
    font-size: 30px;
  }

  .detail-intro,
  .detail-section {
    padding: 26px 20px;
    border-width: 2px;
    border-radius: 16px;
  }

  .detail-intro h1 {
    font-size: 36px;
  }

  .detail-intro p,
  .detail-section > p {
    margin-top: 18px;
    font-size: 16px;
  }

  .detail-section h2 {
    font-size: 28px;
  }

  .detail-illustration {
    min-height: 220px;
  }

  .screen--consent {
    align-items: start;
    overflow-y: auto;
    padding: 70px 30px 38px;
  }

  .consent-panel h1 {
    margin-bottom: 24px;
    font-size: 28px;
  }

  .consent-copy {
    gap: 14px;
  }

  .consent-copy p {
    font-size: 13px;
    line-height: 1.5;
  }

  .consent-panel .button {
    margin-top: 26px;
  }

  .screen--guide {
    justify-content: flex-start;
    overflow-y: auto;
    padding: 80px 24px 112px;
  }

  .screen--guide .guide-visual {
    min-height: 270px;
  }

  .guide-copy {
    margin-top: 18px;
    font-size: 20px;
    line-height: 1.25;
  }

  .screen--guide > .button {
    position: fixed;
    bottom: 42px;
    width: calc(100% - 48px);
    min-height: 54px;
    font-size: 18px;
  }

  .guide-asset--prepare {
    width: min(420px, 94vw);
  }

  .prepare-visual {
    width: 100%;
    max-width: 100%;
  }

  .prepare-visual__contact-lens {
    top: 13.3%;
    right: 1.1%;
    width: 25%;
  }

  .guide-asset--eyes {
    width: min(290px, 74vw);
  }

  .guide-asset--distance {
    width: 96vw;
  }

  .eyes-visual {
    gap: 12px;
  }

  .eyes-visual__eye {
    width: min(140px, 38vw);
  }

  .eyes-visual--covered {
    width: min(270px, 72vw);
  }

  .eyes-visual i {
    height: 100px;
  }

  .brightness-visual {
    --brightness-thumb: 24px;
    --brightness-track: 5px;
    width: 100%;
    grid-template-columns: 40px minmax(0, 1fr) 45px;
    gap: 8px;
  }

  .sun-icon {
    width: 40px;
    height: 40px;
    font-size: 27px;
  }

  .brightness-visual output {
    height: 30px;
    padding: 5px;
    border-radius: 10px;
    font-size: 16px;
  }

  .brightness-slider {
    height: 80px;
  }

  .brightness-slider input::-webkit-slider-thumb {
    margin-top: -9px;
  }

  .brightness-arrow {
    left: calc(var(--brightness-value) + 2px);
    width: 34px;
    height: 14px;
  }

  .brightness-hand {
    top: 48px;
    left: calc(var(--brightness-value) - 6px);
    width: 34px;
  }

  .screen--guide-calibration {
    padding: 70px 0 104px;
  }

  .screen--guide-calibration .guide-visual {
    min-height: calc(100svh - 230px);
  }

  .screen--guide-calibration > .button {
    position: static;
    flex-shrink: 0;
    margin-top: 24px;
  }

  .sliding-content {
    width: 100%;
    min-height: 390px;
    flex-direction: column;
    gap: 20px;
    transform: none;
  }

  .credit-card-wrapper {
    width: calc(100% - 24px);
    min-width: 0;
    min-height: 0;
  }

  .sliding-card {
    max-width: 100%;
    border-width: 4px;
    border-radius: 16px;
  }

  .card-text .small {
    font-size: 11px;
  }

  .slider-container {
    position: relative;
    width: min(300px, calc(100% - 32px));
    height: 40px;
  }

  .slider {
    top: 15px;
    left: 0;
    width: 100%;
    transform: none;
  }

  .info-text {
    padding: 0 24px;
    font-size: 18px;
  }

  .screen--guide-ring-guide .guide-visual {
    min-height: 330px;
  }

  .lottie-guide-animation,
  .ring-guide-visual {
    width: 296px;
    height: 320px;
  }

  .screen--test {
    min-height: 100svh;
    overflow-y: auto;
    padding-bottom: 74px;
  }

  .screen--test .top-title {
    top: 28px;
    left: 30px;
    width: calc(100% - 96px);
    font-size: 20px;
  }

  .test-instruction {
    top: 76px;
    left: 30px;
    width: calc(100% - 60px);
    font-size: 14px;
    line-height: 1.35;
  }

  .test-instruction ol {
    padding-left: 22px;
  }

  .test-instruction li + li {
    margin-top: 3px;
  }

  .test-prompt {
    margin-top: 8px;
  }

  .test-card {
    position: relative;
    top: auto;
    left: auto;
    width: min(360px, calc(100% - 30px));
    height: 500px;
    margin: 220px auto 0;
    transform: none;
  }

  .test-card > .landolt-mark--small {
    top: 16px;
  }

  .screen--test-contrast .test-card > .landolt-mark--contrast {
    width: 82px;
    height: 82px;
  }

  .ring-wheel-wrap {
    top: 105px;
    width: 300px;
  }

  .screen--test-contrast .ring-wheel-wrap {
    top: max(115px, calc(16px + var(--test-mark-size, 82px) + 17px));
  }

  .screen--test-contrast .test-card {
    height: max(500px, calc(var(--test-mark-size, 82px) + 333px));
  }

  .feedback-mark {
    width: 88px;
    height: 88px;
    font-size: 60px;
  }

  .screen--test > .progress-dots {
    position: fixed;
    bottom: 14px;
  }

  .screen--test-color .test-card,
  .screen--test-astigmatism .test-card,
  .screen--test-field .test-card {
    height: auto;
    min-height: 490px;
    justify-content: flex-start;
  }

  .color-plate {
    width: min(330px, 88vw);
    height: min(330px, 88vw);
  }

  .number-buttons {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }

  .number-buttons button,
  .answer-buttons button {
    min-width: 72px;
    min-height: 58px;
    padding: 8px 14px;
    border-width: 3px;
    border-radius: 12px;
    font-size: 20px;
  }

  .number-buttons button:last-child {
    min-width: 104px;
  }

  .astigmatism-visual {
    width: min(340px, 90vw);
    max-height: 240px;
    margin-top: 30px;
  }

  .answer-buttons {
    width: 100%;
    gap: 12px;
    margin-top: 30px;
  }

  .answer-buttons button {
    min-width: 0;
    flex: 1;
  }

  .field-visual {
    width: min(330px, 86vw);
    height: min(330px, 86vw);
  }

  .screen--test-astigmatism .test-card {
    margin-top: 245px;
  }

  .screen--test-field .test-card {
    margin-top: 250px;
  }

  .screen--result-step {
    align-items: start;
    padding: 76px 24px 40px;
  }

  .result-title {
    gap: 12px;
  }

  .result-title h1 {
    font-size: 32px;
  }

  .result-icon {
    width: 54px;
    height: 54px;
    border-width: 4px;
  }

  .result-summary > p {
    margin: 24px auto;
    font-size: 18px;
  }

  .eye-results {
    gap: 42px;
  }

  .eye-result svg {
    width: 82px;
    height: 54px;
  }

  .step-progress {
    margin: 28px auto;
    border-width: 2px;
    border-radius: 12px;
  }

  .step-progress > div {
    min-height: 76px;
  }

  .step-progress b {
    font-size: 22px;
  }

  .step-progress span {
    font-size: 12px;
  }

  .result-actions .text-button {
    margin-top: 18px;
    font-size: 18px;
  }

  .screen--results {
    padding: 88px 14px 44px;
  }

  .results-panel > h1 {
    font-size: 36px;
  }

  .result-section {
    border-width: 2px;
    border-radius: 12px;
  }

  .result-heading {
    min-height: 68px;
    grid-template-columns: 42px 1fr 22px;
    gap: 10px;
    padding: 10px 14px;
    font-size: 16px;
  }

  .result-heading .result-icon {
    width: 38px;
    height: 38px;
  }

  .result-body {
    padding: 4px 16px 24px;
  }

  .result-body p {
    font-size: 16px;
  }

  .optician-card {
    padding: 30px 20px;
    border-radius: 16px;
  }

  .optician-card p {
    font-size: 15px;
  }

  .screen--exit h1 {
    font-size: 36px;
  }

  .screen--exit > p {
    margin: 22px 0 34px;
    font-size: 16px;
  }

  .exit-actions {
    gap: 18px;
  }

  .desktop-only {
    display: none;
  }
}

@media (min-width: 701px) and (max-height: 760px) {
  .eye-logo {
    width: min(640px, 78vw);
    margin-bottom: 18px;
  }

  .home-content h1 {
    margin-bottom: 24px;
    font-size: 48px;
  }

  .home-content .button {
    min-height: 64px;
    font-size: 26px;
  }

  .screen--guide {
    padding-top: 48px;
  }

  .screen--guide .guide-visual {
    min-height: 250px;
  }

  .guide-copy {
    margin-top: 14px;
    font-size: 26px;
  }

  .test-card {
    top: 22px;
    height: 600px;
  }

  .ring-wheel-wrap {
    width: 430px;
  }

  .color-plate,
  .field-visual {
    width: 390px;
    height: 390px;
  }

  .astigmatism-visual {
    width: 440px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.screen--test-ring {
  overflow: visible;
  padding: 64px clamp(24px, 5vw, 70px) 32px;
}

.ring-test-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(32px, 4vw, 64px);
  max-width: 1440px;
  margin: 0 auto;
}

.screen--test-ring .ring-test-copy,
.screen--test-ring .test-instruction {
  position: static;
  width: auto;
  min-width: 0;
}

.screen--test-ring .top-title,
.screen--test-ring .ring-test-copy h1 {
  position: static;
  width: auto;
  margin: 0 0 28px;
  transform: none;
}

.screen--test-ring .ring-test-card {
  position: static;
  display: flex;
  width: 100%;
  max-width: 540px;
  height: auto;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 80px;
  margin: 0;
  padding: 40px 0;
  transform: none;
}

.test-mark-stage {
  display: grid;
  width: 100%;
  height: max(120px, var(--test-mark-max-size));
  flex: 0 0 auto;
  place-items: center;
}

.screen--test-ring .landolt-mark--small {
  position: static;
  inset: auto;
  margin: 0;
  transform: rotate(var(--mark-rotation));
}

.screen--test-ring .ring-answer-stage {
  position: relative;
  inset: auto;
  width: min(500px, 100%);
  flex: 0 0 auto;
  transform: none;
}

.screen--test-ring > .progress-dots {
  position: static;
  width: max-content;
  max-width: 100%;
  margin: 32px auto 0;
  transform: none;
}

@media (max-width: 1080px) {
  .screen--test-ring .ring-answer-stage {
    width: min(420px, 100%);
  }
}

@media (max-width: 900px) {
  .screen--test-ring {
    padding: 28px 24px 32px;
  }

  .ring-test-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .screen--test-ring .top-title,
  .screen--test-ring .ring-test-copy h1 {
    margin-bottom: 24px;
    padding-right: 52px;
    font-size: clamp(20px, 3.8vw, 28px);
    line-height: 1.2;
  }

  .screen--test-ring .test-instruction,
  .screen--test-ring .ring-test-copy ol,
  .screen--test-ring .ring-test-copy p {
    font-size: clamp(14px, 2.5vw, 18px);
    line-height: 1.5;
  }

  .screen--test-ring .ring-test-card {
    padding: 24px 0 8px;
  }

  .screen--test-ring .close-button {
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 700px) {
  .screen--test-ring .ring-answer-stage {
    width: min(300px, 100%);
  }
}
