:root {
  --page: #f7fcf7;
  --surface: #ffffff;
  --surface-soft: #eef8ef;
  --forest: #1b5e20;
  --forest-deep: #0f3c18;
  --green: #4caf50;
  --green-bright: #66d36e;
  --green-dark: #2e7d32;
  --mint: #e8f5e9;
  --mint-strong: #c8e6c9;
  --sage: #a5d6a7;
  --ink: #22352b;
  --ink-soft: #627169;
  --line: #dce9dd;
  --cream: #fff9e6;
  --gold: #d4af37;
  --gold-dark: #8b6508;
  --danger: #d32f2f;
  --terminal: #07150b;
  --terminal-card: #0b2011;
  --terminal-green: #00e676;
  --shadow-sm: 0 8px 26px rgba(27, 94, 32, 0.08);
  --shadow-md: 0 22px 60px rgba(21, 78, 33, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #e8f3e9;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(76, 175, 80, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 78%, rgba(165, 214, 167, 0.32), transparent 30rem),
    #eaf4ea;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible,
dialog:focus-visible {
  outline: 3px solid rgba(76, 175, 80, 0.34);
  outline-offset: 3px;
}

.view h1[tabindex="-1"]:focus {
  outline: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 290px;
  height: 80px;
  border: 1px solid rgba(46, 125, 50, 0.08);
  border-radius: 999px;
  transform: rotate(-34deg);
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(46, 125, 50, 0.11);
  border-radius: 50%;
}

.ambient::before {
  top: 19px;
  left: 64px;
}

.ambient::after {
  right: 61px;
  bottom: 20px;
}

.ambient--one {
  top: 15%;
  left: -80px;
}

.ambient--two {
  right: -90px;
  bottom: 12%;
  transform: rotate(29deg) scale(1.15);
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page);
  box-shadow: 0 0 80px rgba(29, 83, 38, 0.16);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(68px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
  border-bottom: 1px solid rgba(27, 94, 32, 0.08);
  background: rgba(247, 252, 247, 0.9);
  backdrop-filter: blur(18px) saturate(1.25);
  transition: color 280ms ease, background 280ms ease, border-color 280ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px;
  border: 0;
  color: var(--forest);
  background: none;
  text-align: left;
  cursor: pointer;
}

.brand__mark {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(27, 94, 32, 0.12);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 13px rgba(27, 94, 32, 0.08);
}

.brand__mark svg {
  width: 25px;
  height: 25px;
  overflow: visible;
}

.brand__mark path:first-child {
  fill: none;
  stroke: var(--forest);
  stroke-linecap: round;
  stroke-width: 2;
}

.brand__mark path:nth-child(2) {
  fill: #5cbd65;
  stroke: var(--forest);
  stroke-width: 1.5;
}

.brand__mark circle {
  fill: #e5f5d4;
}

.brand__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.05;
}

.brand__copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__copy small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.privacy-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #d2e6d4;
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.privacy-button svg {
  width: 16px;
  height: 16px;
  fill: rgba(76, 175, 80, 0.1);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.topbar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.language-picker {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 4px;
  padding: 0 7px 0 8px;
  border: 1px solid #d2e6d4;
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.82);
}

.language-picker svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.language-picker select {
  min-height: 34px;
  max-width: 64px;
  padding: 0 16px 0 2px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  color: inherit;
  background: transparent;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.language-picker:focus-within {
  outline: 3px solid rgba(76, 175, 80, 0.34);
  outline-offset: 3px;
}

body[data-state="processing"] .language-picker {
  border-color: rgba(0, 230, 118, 0.18);
  color: var(--terminal-green);
  background: rgba(0, 230, 118, 0.06);
}

body[data-state="processing"] .language-picker option {
  color: #183720;
  background: white;
}

.view {
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  animation: view-in 500ms var(--ease) both;
}

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

.view--landing {
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  padding: 34px 22px 0;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #d4e9d6;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 18px rgba(27, 94, 32, 0.05);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12);
}

.hero h1 {
  max-width: 420px;
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(40px, 11vw, 53px);
  font-weight: 850;
  letter-spacing: -0.057em;
  line-height: 0.98;
}

.hero h1 span {
  display: block;
  margin-top: 5px;
  color: var(--forest);
}

.hero__lede {
  max-width: 375px;
  margin: 18px auto 0;
  color: #66756d;
  font-size: 15px;
  line-height: 1.62;
}

.hero-visual {
  position: relative;
  width: min(100%, 390px);
  height: 315px;
  margin: 3px auto 0;
  overflow: hidden;
}

.hero-visual__glow {
  position: absolute;
  top: 49%;
  left: 50%;
  width: 285px;
  height: 205px;
  border-radius: 50%;
  background: rgba(112, 198, 116, 0.22);
  filter: blur(28px);
  transform: translate(-50%, -50%);
}

.hero-character {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 50%;
  width: auto;
  height: 390px;
  filter: drop-shadow(0 17px 19px rgba(18, 63, 33, 0.18));
  transform: translateX(-50%);
}

.hero-visual__frame {
  position: absolute;
  z-index: 2;
  inset: 38px 38px 27px;
  border: 1px solid rgba(46, 125, 50, 0.2);
  border-radius: 28px;
  background:
    linear-gradient(var(--green-dark), var(--green-dark)) left top / 20px 2px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) left top / 2px 20px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) right top / 20px 2px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) right top / 2px 20px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) left bottom / 20px 2px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) left bottom / 2px 20px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) right bottom / 20px 2px no-repeat,
    linear-gradient(var(--green-dark), var(--green-dark)) right bottom / 2px 20px no-repeat;
  opacity: 0.48;
}

.cucumber-illustration {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cucumber-illustration text {
  fill: #7b927f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.measure-line,
.measure-tick {
  fill: none;
  stroke: #aac9ad;
  stroke-linecap: round;
  stroke-width: 1.4;
}

.measure-tick {
  stroke-width: 1;
}

.scan-corners path {
  fill: none;
  stroke: rgba(46, 125, 50, 0.48);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.scan-line {
  position: absolute;
  z-index: 2;
  top: 58px;
  left: 13%;
  width: 74%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 181, 75, 0.86), transparent);
  box-shadow: 0 0 11px rgba(76, 175, 80, 0.42);
  animation: hero-scan 3.8s ease-in-out infinite;
}

@keyframes hero-scan {
  0%, 100% { opacity: 0; transform: translateY(0); }
  15%, 85% { opacity: 1; }
  50% { transform: translateY(205px); }
}

.hero-visual__badge {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 19px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(27, 94, 32, 0.11);
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 22px rgba(27, 94, 32, 0.12);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual__badge svg {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.primary-button,
.secondary-button,
.text-button {
  position: relative;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:active,
.secondary-button:active,
.text-button:active {
  transform: scale(0.985);
}

.primary-button {
  width: 100%;
  gap: 10px;
  padding: 13px 20px;
  color: white;
  background: linear-gradient(135deg, #3da848, #1d6f2a);
  box-shadow: 0 14px 28px rgba(32, 119, 43, 0.22), inset 0 1px rgba(255, 255, 255, 0.24);
  font-size: 15px;
}

.hero > .primary-button {
  margin-top: -2px;
}

.primary-button:hover {
  box-shadow: 0 16px 34px rgba(32, 119, 43, 0.29), inset 0 1px rgba(255, 255, 255, 0.24);
}

.primary-button__icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
}

.primary-button__icon svg,
.primary-button__arrow,
.primary-button > svg,
.secondary-button > svg,
.text-button > svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.primary-button__icon svg {
  width: 18px;
  height: 18px;
}

.primary-button__arrow {
  position: absolute;
  right: 17px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  margin: 13px auto 0;
  color: #718079;
  font-size: 10px;
  line-height: 1.45;
}

.privacy-note svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  fill: rgba(76, 175, 80, 0.08);
  stroke: var(--green-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.proof-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 29px 22px 0;
  padding: 16px 10px;
  border: 1px solid #dfebe0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.proof-strip > div:not(.proof-strip__divider) {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.proof-strip strong {
  color: var(--forest);
  font-size: 18px;
  letter-spacing: -0.04em;
}

.proof-strip span {
  color: #728077;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proof-strip__divider {
  width: 1px;
  height: 23px;
  background: #dce8dd;
}

.science {
  padding: 62px 22px 10px;
}

.section-heading p,
.processing-kicker,
.result-intro__kicker,
.privacy-dialog__eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 10px 0 24px;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.044em;
  line-height: 1.08;
}

.science-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  margin-top: 12px;
  padding: 20px 18px;
  border: 1px solid #dfeae0;
  border-radius: 20px;
  background: white;
  box-shadow: 0 7px 24px rgba(27, 94, 32, 0.045);
}

.science-card--accent {
  border-color: #cde7cf;
  background: linear-gradient(145deg, #eff9f0, #e5f4e7);
}

.science-card__number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: var(--forest);
  background: #edf7ee;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.science-card--accent .science-card__number {
  color: white;
  background: var(--green-dark);
}

.science-card h3 {
  margin: 2px 0 7px;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.science-card p {
  margin: 0;
  color: #68776e;
  font-size: 13px;
  line-height: 1.55;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 33px 22px 0;
  color: #8a968f;
  text-align: center;
}

.landing-footer__mark {
  font-size: 18px;
}

.landing-footer p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.view--instructions {
  padding: 25px 20px calc(36px + env(safe-area-inset-bottom));
  background:
    linear-gradient(rgba(46, 125, 50, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 125, 50, 0.025) 1px, transparent 1px),
    var(--page);
  background-size: 18px 18px, 18px 18px, auto;
}

.instructions-content {
  width: 100%;
}

.guide-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 8px 11px 8px 8px;
  border: 1px solid #d7e7d8;
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.guide-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.guide-heading {
  margin-top: 22px;
  text-align: center;
}

.guide-heading > p:first-child {
  margin: 0;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.guide-heading h1 {
  margin: 9px auto 0;
  color: var(--ink);
  font-size: clamp(31px, 8vw, 39px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.guide-heading > p:last-child {
  max-width: 350px;
  margin: 12px auto 0;
  color: #6b7a71;
  font-size: 13px;
  line-height: 1.55;
}

.manual-art {
  width: min(100%, 350px);
  margin: 25px auto 0;
  overflow: hidden;
  border: 1px solid #bccfba;
  border-radius: 19px;
  background: #fbf5e7;
  box-shadow: 0 14px 36px rgba(27, 94, 32, 0.12);
}

.manual-art img {
  display: block;
  width: 100%;
  height: auto;
}

.instruction-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.instruction-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid #dbe9dc;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 22px rgba(27, 94, 32, 0.045);
}

.instruction-list__number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--green-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.instruction-list h2 {
  margin: 2px 0 5px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.015em;
}

.instruction-list p {
  margin: 0;
  color: #68776e;
  font-size: 12px;
  line-height: 1.52;
}

.instruction-list__orientation {
  border-color: #b9dabd !important;
  background: #f0f8f0 !important;
}

.guide-camera-button {
  margin-top: 18px;
}

.guide-local-note {
  margin: 10px auto 0;
  color: #7b8981;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

body[data-state="processing"] .app-shell {
  background: var(--terminal);
}

body[data-state="processing"] .topbar {
  border-color: rgba(0, 230, 118, 0.1);
  background: rgba(7, 21, 11, 0.89);
}

body[data-state="processing"] .brand,
body[data-state="processing"] .brand__copy small {
  color: #d3f9dc;
}

body[data-state="processing"] .brand__mark {
  border-color: rgba(0, 230, 118, 0.2);
  background: #0d2714;
  box-shadow: none;
}

body[data-state="processing"] .brand__mark path:first-child,
body[data-state="processing"] .brand__mark path:nth-child(2) {
  stroke: var(--terminal-green);
}

body[data-state="processing"] .brand__mark path:nth-child(2) {
  fill: rgba(0, 230, 118, 0.2);
}

body[data-state="processing"] .privacy-button {
  border-color: rgba(0, 230, 118, 0.18);
  color: var(--terminal-green);
  background: rgba(0, 230, 118, 0.06);
}

.view--processing {
  position: relative;
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  overflow: hidden;
  color: #defbe5;
  background:
    linear-gradient(rgba(0, 230, 118, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 118, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 24%, rgba(0, 230, 118, 0.1), transparent 40%),
    var(--terminal);
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.processing-orbit {
  position: absolute;
  top: 92px;
  left: 50%;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(0, 230, 118, 0.045);
  border-radius: 50%;
  transform: translateX(-50%);
}

.processing-orbit::before,
.processing-orbit::after {
  content: "";
  position: absolute;
  inset: 48px;
  border: 1px dashed rgba(0, 230, 118, 0.05);
  border-radius: 50%;
}

.processing-orbit::after {
  inset: 96px;
}

.processing-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}

.terminal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #80b98d;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.terminal-status > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terminal-green);
  box-shadow: 0 0 0 5px rgba(0, 230, 118, 0.08), 0 0 15px rgba(0, 230, 118, 0.5);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.45; transform: scale(0.83); }
}

.scanner-stage {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1.18;
  margin: 22px auto 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 18px;
  background: #08160c;
  box-shadow: inset 0 0 38px rgba(0, 230, 118, 0.045), 0 0 40px rgba(0, 230, 118, 0.07);
}

.scanner-stage__preview,
.scanner-stage__pixels,
.scanner-stage__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scanner-stage__preview {
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.6) brightness(0.58) contrast(1.18) sepia(0.1);
  transform: scale(1.035);
  transition: opacity 220ms ease;
}

.scanner-stage.is-ready .scanner-stage__preview {
  opacity: 0.72;
}

.scanner-stage__pixels {
  z-index: 2;
  opacity: 0;
  object-fit: cover;
  image-rendering: pixelated;
  mix-blend-mode: screen;
  filter: saturate(0.9) hue-rotate(58deg) contrast(1.45) brightness(0.78);
}

.scanner-stage.is-ready .scanner-stage__pixels {
  opacity: 0.68;
  animation: pixel-resolve 900ms steps(2, end) infinite alternate;
}

@keyframes pixel-resolve {
  from { opacity: 0.42; filter: saturate(0.6) hue-rotate(68deg) contrast(1.65) brightness(0.68); }
  to { opacity: 0.78; filter: saturate(1.05) hue-rotate(48deg) contrast(1.35) brightness(0.86); }
}

.scanner-stage__grid {
  z-index: 3;
  background:
    linear-gradient(rgba(0, 230, 118, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 118, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.08), transparent);
  background-size: 18px 18px, 18px 18px, auto;
  opacity: 0.5;
  pointer-events: none;
}

.scanner-stage__corner {
  position: absolute;
  z-index: 6;
  width: 29px;
  height: 29px;
  border-color: var(--terminal-green);
  filter: drop-shadow(0 0 4px rgba(0, 230, 118, 0.5));
}

.scanner-stage__corner--tl { top: 13px; left: 13px; border-top: 2px solid; border-left: 2px solid; }
.scanner-stage__corner--tr { top: 13px; right: 13px; border-top: 2px solid; border-right: 2px solid; }
.scanner-stage__corner--bl { bottom: 13px; left: 13px; border-bottom: 2px solid; border-left: 2px solid; }
.scanner-stage__corner--br { right: 13px; bottom: 13px; border-right: 2px solid; border-bottom: 2px solid; }

.scanner-stage__chip {
  position: absolute;
  z-index: 7;
  padding: 4px 6px;
  border: 1px solid rgba(0, 230, 118, 0.42);
  border-radius: 5px;
  color: var(--terminal-green);
  background: rgba(4, 22, 9, 0.78);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.scanner-stage__chip--one {
  top: 14px;
  left: 49px;
}

.scanner-stage__chip--two {
  right: 49px;
  bottom: 14px;
}

.scanner-stage__ring {
  position: absolute;
  border: 1px dashed rgba(0, 230, 118, 0.18);
  border-radius: 50%;
  animation: spin 13s linear infinite;
}

.scanner-stage__ring--outer {
  inset: 10px;
}

.scanner-stage__ring--inner {
  inset: 32px;
  border-style: solid;
  border-color: rgba(0, 230, 118, 0.08);
  animation-direction: reverse;
  animation-duration: 9s;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.scanner-stage__cucumber {
  position: absolute;
  z-index: 2;
  inset: 31px 12px;
  width: calc(100% - 24px);
  height: calc(100% - 62px);
  fill: rgba(0, 230, 118, 0.07);
  stroke: var(--terminal-green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  filter: drop-shadow(0 0 7px rgba(0, 230, 118, 0.2));
}

.scanner-stage__cucumber circle {
  fill: var(--terminal-green);
  stroke: none;
}

.scanner-stage__beam {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 13px;
  left: 13px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--terminal-green), transparent);
  box-shadow: 0 0 13px 3px rgba(0, 230, 118, 0.5);
  animation: terminal-scan 2.2s ease-in-out infinite;
}

@keyframes terminal-scan {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(214px); }
}

.scanner-stage__cross {
  position: absolute;
  z-index: 1;
  background: rgba(0, 230, 118, 0.08);
}

.scanner-stage__cross--x {
  top: 50%;
  right: 18px;
  left: 18px;
  height: 1px;
}

.scanner-stage__cross--y {
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
}

.processing-kicker {
  color: var(--terminal-green);
}

.processing-content h1 {
  margin: 8px 0 0;
  color: #f2fff5;
  font-size: 31px;
  letter-spacing: -0.045em;
}

.processing-status-copy {
  min-height: 22px;
  margin: 8px 0 0;
  color: #83a98b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.progress-block {
  margin: 27px 0 0;
  text-align: left;
}

.progress-block__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #61876a;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.progress-block__meta strong {
  color: var(--terminal-green);
  font-size: 11px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(0, 230, 118, 0.12);
  border-radius: 999px;
  background: #0b2612;
}

.progress-track span {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a854, var(--terminal-green));
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.35);
  transition: width 480ms var(--ease);
}

.terminal-list {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 13px;
  border: 1px solid rgba(0, 230, 118, 0.1);
  border-radius: 16px;
  background: rgba(8, 30, 14, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
  list-style: none;
  text-align: left;
}

.terminal-list li {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 7px;
  align-items: start;
  min-height: 18px;
  color: #45634c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  line-height: 1.45;
  transition: color 260ms ease, opacity 260ms ease;
}

.terminal-list li[data-step="active"] {
  color: #b8f6c6;
}

.terminal-list li[data-step="done"] {
  color: #6ba678;
}

.terminal-list li[data-step="active"] .terminal-list__mark {
  color: var(--terminal-green);
  animation: blink 750ms steps(1) infinite;
}

.terminal-list li[data-step="done"] .terminal-list__mark {
  color: var(--terminal-green);
}

@keyframes blink {
  50% { opacity: 0; }
}

.local-only-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  color: #56745e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.local-only-note svg {
  width: 14px;
  height: 14px;
  fill: rgba(0, 230, 118, 0.04);
  stroke: var(--terminal-green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.text-button {
  min-height: 46px;
  gap: 7px;
  padding: 10px 14px;
  color: var(--forest);
  background: transparent;
  font-size: 12px;
}

.text-button--dark {
  margin-top: 9px;
  color: #6b8c73;
}

.view--result {
  padding: 32px 18px calc(34px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 5%, rgba(165, 214, 167, 0.34), transparent 18rem),
    var(--page);
}

.result-intro {
  padding: 2px 8px 25px;
  text-align: center;
}

.result-intro__check {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid #bfe3c2;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #5ac663, #278335);
  box-shadow: 0 10px 24px rgba(46, 125, 50, 0.19), 0 0 0 7px rgba(76, 175, 80, 0.08);
}

.result-intro__check svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.result-intro h1 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 34px;
  letter-spacing: -0.05em;
}

.result-intro > p:last-child {
  max-width: 340px;
  margin: 9px auto 0;
  color: #6e7d74;
  font-size: 13px;
  line-height: 1.5;
}

.certificate {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  padding: 26px 21px 20px;
  border: 4px double var(--gold);
  color: #3d3522;
  background:
    linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.9), transparent 42%),
    var(--cream);
  background-size: 13px 13px, 13px 13px, auto, auto;
  box-shadow: 0 20px 48px rgba(78, 65, 22, 0.15);
}

.certificate::before,
.certificate::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.48);
  pointer-events: none;
}

.certificate::after {
  inset: 13px;
  border-color: rgba(212, 175, 55, 0.16);
}

.certificate__corner {
  position: absolute;
  z-index: 2;
  width: 25px;
  height: 25px;
  border-color: var(--gold);
  opacity: 0.65;
}

.certificate__corner--tl { top: 13px; left: 13px; border-top: 2px solid; border-left: 2px solid; }
.certificate__corner--tr { top: 13px; right: 13px; border-top: 2px solid; border-right: 2px solid; }
.certificate__corner--bl { bottom: 13px; left: 13px; border-bottom: 2px solid; border-left: 2px solid; }
.certificate__corner--br { right: 13px; bottom: 13px; border-right: 2px solid; border-bottom: 2px solid; }

.certificate__watermark {
  position: absolute;
  z-index: -1;
  top: 47%;
  left: 50%;
  color: rgba(212, 175, 55, 0.055);
  font-size: 180px;
  filter: grayscale(1);
  transform: translate(-50%, -50%) rotate(-17deg);
  pointer-events: none;
}

.certificate__header {
  position: relative;
  text-align: center;
}

.certificate__seal {
  width: 49px;
  height: 49px;
  margin: 0 auto 8px;
  color: var(--gold-dark);
}

.certificate__seal svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.certificate__seal path {
  fill: rgba(212, 175, 55, 0.09);
}

.certificate__seal circle:not(:first-child):not(:nth-child(2)) {
  fill: currentColor;
  stroke: none;
}

.certificate__header p {
  margin: 0;
  color: var(--gold-dark);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.certificate__header h2 {
  margin: 7px 0 0;
  color: var(--gold-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: uppercase;
}

.certificate__header h2 span {
  display: block;
  font-size: 27px;
  letter-spacing: 0.075em;
}

.certificate__header small {
  display: block;
  max-width: 285px;
  margin: 9px auto 0;
  color: #8c8067;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
  font-style: italic;
  line-height: 1.45;
}

.certificate__rule {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0;
  color: var(--gold);
  font-size: 7px;
}

.certificate__rule::before,
.certificate__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.certificate__rule::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.measurement-result {
  text-align: center;
}

.measurement-result > p {
  margin: 0;
  color: #776a50;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.measurement-result__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 5px;
}

.measurement-result__value > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.measurement-result__value strong {
  color: var(--danger);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 37px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.measurement-result__value small {
  color: var(--gold-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-style: italic;
}

.measurement-result__value i {
  color: rgba(139, 101, 8, 0.46);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: normal;
}

.class-badge {
  display: inline-flex;
  margin-top: -1px;
  padding: 5px 11px;
  border: 1px solid rgba(139, 101, 8, 0.28);
  border-radius: 999px;
  color: #76580c;
  background: rgba(212, 175, 55, 0.08);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.percentile-pyramid {
  margin-top: 17px;
  padding: 13px 12px 12px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  background: rgba(255, 255, 255, 0.38);
}

.percentile-pyramid__heading {
  text-align: center;
}

.percentile-pyramid__heading h3 {
  margin: 0;
  color: var(--gold-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
}

.percentile-pyramid__heading p {
  margin: 4px 0 0;
  color: #82765e;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.percentile-pyramid__heading strong {
  color: var(--danger);
}

.pyramid-graphic {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
}

.pyramid-tier {
  display: grid;
  height: 21px;
  place-items: center;
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  color: #fffdf4;
  background: #b28a1b;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25);
  font-size: 6.5px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: filter 180ms ease, transform 180ms ease;
}

.pyramid-tier:nth-child(1) { width: 32%; background: #8f6a0d; }
.pyramid-tier:nth-child(2) { width: 46%; background: #a77d13; }
.pyramid-tier:nth-child(3) { width: 61%; background: #bd9425; }
.pyramid-tier:nth-child(4) { width: 77%; background: #cbaa42; }
.pyramid-tier:nth-child(5) { width: 94%; background: #d8c06b; color: #5e4d20; }

.pyramid-tier.is-active {
  position: relative;
  z-index: 2;
  color: white;
  background: var(--danger);
  filter: drop-shadow(0 3px 4px rgba(211, 47, 47, 0.25));
  transform: scale(1.035);
}

.pyramid-tier.is-active span::after {
  content: " · YOU";
  font-size: 5.5px;
}

html[lang="ko"] .pyramid-tier.is-active span::after {
  content: " · 당신";
}

html[lang="hi"] .pyramid-tier.is-active span::after {
  content: " · आप";
}

.rankings {
  margin-top: 17px;
}

.rankings h3 {
  margin: 0 0 8px;
  color: var(--gold-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  text-align: center;
}

.ranking-row {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  min-height: 30px;
  border-right: 1px solid #e0dccb;
  border-bottom: 1px solid #e0dccb;
  border-left: 1px solid #e0dccb;
}

.ranking-row:first-of-type {
  border-top: 1px solid #e0dccb;
}

.ranking-row > * {
  display: flex;
  align-items: center;
  padding: 7px 9px;
  font-size: 8px;
}

.ranking-row > * + * {
  justify-content: center;
  border-left: 1px solid #e0dccb;
  text-align: center;
}

.ranking-row strong {
  color: var(--gold-dark);
}

.ranking-row--head {
  color: #5a694f;
  background: #f1f8e9;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ranking-row--head > * {
  font-size: 7px;
}

.certificate__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.35);
}

.certificate__meta > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.certificate__meta > div:last-child {
  text-align: right;
}

.certificate__meta span {
  color: #9a9078;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.certificate__meta strong {
  color: #5d523a;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
}

.certificate__footer {
  margin-top: 12px;
  color: #9b927f;
  text-align: center;
}

.certificate__footer p {
  margin: 0;
  font-size: 6.5px;
  font-style: italic;
}

.certificate__footer strong {
  display: block;
  margin-top: 5px;
  color: var(--gold-dark);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.primary-button--gold {
  background: linear-gradient(135deg, #b58b14, #8b6508);
  box-shadow: 0 13px 27px rgba(139, 101, 8, 0.2), inset 0 1px rgba(255, 255, 255, 0.25);
}

.secondary-button {
  width: 100%;
  gap: 9px;
  padding: 13px 20px;
  border: 1px solid #cfe2d0;
  color: var(--forest);
  background: white;
  box-shadow: 0 7px 20px rgba(27, 94, 32, 0.06);
  font-size: 14px;
}

.result-actions .text-button {
  width: 100%;
}

.result-disclaimer {
  max-width: 365px;
  margin: 13px auto 0;
  color: #8b978f;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.privacy-dialog {
  width: min(calc(100% - 36px), 410px);
  padding: 28px 24px 22px;
  border: 1px solid #d3e4d4;
  border-radius: 26px;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 100px rgba(11, 48, 17, 0.28);
  text-align: center;
}

.privacy-dialog::backdrop {
  background: rgba(8, 31, 13, 0.56);
  backdrop-filter: blur(6px);
}

.privacy-dialog__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 18px;
  color: var(--green-dark);
  background: var(--mint);
}

.privacy-dialog__icon svg {
  width: 35px;
  height: 35px;
  fill: rgba(76, 175, 80, 0.08);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.privacy-dialog h2 {
  margin: 8px 0 9px;
  font-size: 27px;
  letter-spacing: -0.045em;
}

.privacy-dialog > p:not(.privacy-dialog__eyebrow) {
  margin: 0;
  color: #68766e;
  font-size: 13px;
  line-height: 1.55;
}

.privacy-dialog ul {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4faf4;
  list-style: none;
  text-align: left;
}

.privacy-dialog li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #496052;
  font-size: 12px;
}

.privacy-dialog li > span:first-child {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.watermelon-dialog {
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin-inline: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #cce3cf;
  border-radius: 28px;
  color: var(--ink);
  background: #f8fcf8;
  box-shadow: 0 34px 110px rgba(11, 48, 17, 0.32);
}

.watermelon-dialog::backdrop {
  background: rgba(8, 31, 13, 0.6);
  backdrop-filter: blur(7px);
}

.watermelon-dialog__close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(27, 94, 32, 0.16);
  border-radius: 50%;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 16px rgba(27, 94, 32, 0.1);
  cursor: pointer;
}

.watermelon-dialog__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.watermelon-dialog__visual {
  position: relative;
  height: 285px;
  overflow: hidden;
  border-bottom: 1px solid #cfe4d1;
  background: #eaf6eb;
}

.watermelon-dialog__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
}

.watermelon-dialog__visual > span {
  position: absolute;
  bottom: 13px;
  left: 16px;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(27, 94, 32, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 7px 20px rgba(27, 94, 32, 0.12);
  font-size: 26px;
}

.watermelon-dialog__copy {
  padding: 23px 22px 22px;
  text-align: center;
}

.watermelon-dialog__eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.watermelon-dialog__copy h2 {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.watermelon-dialog__copy > p:not(.watermelon-dialog__eyebrow) {
  margin: 11px auto 0;
  color: #697970;
  font-size: 13px;
  line-height: 1.55;
}

.watermelon-dialog__dismiss {
  margin-top: 18px;
}

html[lang="ko"] body {
  word-break: keep-all;
}

html[lang="hi"] body {
  font-family: "Nirmala UI", "Noto Sans Devanagari", Mangal, Arial, sans-serif;
}

html[lang="ko"] .hero h1 {
  font-size: clamp(35px, 9.7vw, 47px);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

html[lang="ko"] .certificate__header h2,
html[lang="ko"] .percentile-pyramid__heading h3,
html[lang="ko"] .rankings h3,
html[lang="ko"] .measurement-result__value strong,
html[lang="ko"] .measurement-result__value small {
  font-family: "Batang", "AppleMyungjo", Georgia, serif;
}

html[lang="hi"] .certificate__header h2,
html[lang="hi"] .percentile-pyramid__heading h3,
html[lang="hi"] .rankings h3,
html[lang="hi"] .measurement-result__value strong,
html[lang="hi"] .measurement-result__value small {
  font-family: "Nirmala UI", "Noto Sans Devanagari", Mangal, Arial, sans-serif;
}

html[lang="hi"] .hero h1,
html[lang="hi"] .guide-heading h1,
html[lang="hi"] .watermelon-dialog__copy h2 {
  letter-spacing: -0.025em;
  line-height: 1.12;
}

html[lang="ko"] .certificate__header p,
html[lang="ko"] .certificate__meta span,
html[lang="ko"] .ranking-row--head,
html[lang="ko"] .percentile-pyramid__heading p {
  letter-spacing: 0.04em;
}

.toast {
  position: fixed;
  z-index: 100;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
  max-width: 410px;
  margin: 0 auto;
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  color: white;
  background: rgba(19, 53, 27, 0.95);
  box-shadow: 0 15px 40px rgba(8, 35, 15, 0.25);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  animation: toast-in 350ms var(--ease) both;
}

.toast[data-kind="error"] {
  background: rgba(120, 36, 36, 0.96);
}

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

@media (min-width: 521px) {
  .app-shell {
    margin-top: 22px;
    margin-bottom: 22px;
    border: 1px solid rgba(27, 94, 32, 0.11);
    border-radius: 30px;
  }

  .topbar {
    border-radius: 30px 30px 0 0;
  }
}

@media (max-width: 359px) {
  .topbar {
    padding-right: 15px;
    padding-left: 15px;
  }

  .brand__copy small {
    display: none;
  }

  .topbar__actions {
    gap: 5px;
  }

  .privacy-button {
    width: 36px;
    justify-content: center;
    padding: 7px;
  }

  .privacy-button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .language-picker {
    padding-right: 4px;
    padding-left: 6px;
  }

  .language-picker select {
    padding-right: 11px;
  }

  .hero,
  .science {
    padding-right: 17px;
    padding-left: 17px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-visual {
    height: 295px;
  }

  .proof-strip {
    margin-right: 17px;
    margin-left: 17px;
  }

  .certificate {
    padding-right: 17px;
    padding-left: 17px;
  }

  .certificate__header h2 span {
    font-size: 23px;
  }

  .processing-content {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
