* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f6f6f6;
}

body {
  color: #111;
  font-family: Batang, AppleMyungjo, BatangChe, "함초롬바탕", "Noto Serif KR", serif;
  font-size: 12pt;
  line-height: 1.35;
  font-weight: 400;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

strong,
b {
  font-weight: 700;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid #1b5fbf;
  outline-offset: 3px;
}

.survey-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 10px;
}

.screen {
  display: flex;
  flex-direction: column;
  width: min(calc(100vw - 20px), 1384px);
  height: min(calc(100vh - 20px), 806px);
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 4px solid #202020;
}

.screen-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 36px 72px 16px;
  overflow: hidden;
}

.cover-body {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 78px;
  text-align: center;
}

.eq-logo {
  width: 286px;
  height: 55px;
  margin-bottom: 62px;
  object-fit: contain;
}

.cover-title {
  margin: 0 0 34px;
  font-size: 14pt;
  line-height: 1.2;
  text-align: center;
}

.cover-title-ko {
  font-weight: 700;
}

.cover-title-en {
  font-family: Arial, Helvetica, sans-serif;
  font-style: italic;
  font-weight: 700;
}

.screen-footer {
  flex: 0 0 auto;
  padding: 8px 34px 12px;
  border-top: 1px solid #ededed;
}

.copyright {
  margin: 0 0 20px;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  font-style: italic;
  line-height: 1.2;
  text-align: center;
}

.screen-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-button {
  min-width: 95px;
  min-height: 40px;
  padding: 6px 15px;
  color: #111;
  background: linear-gradient(#fff, #f6f6f6);
  border: 2px solid #a7afbd;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #d7dbe2;
  cursor: pointer;
}

.nav-button:disabled {
  color: #777;
  cursor: default;
  opacity: 0.55;
}

.nav-prev::before,
.nav-next::after {
  display: inline-block;
  width: 17px;
  height: 17px;
  margin: 0 8px;
  vertical-align: -3px;
  content: "";
  background: #44b62a;
  clip-path: polygon(0 50%, 55% 0, 55% 28%, 100% 28%, 100% 72%, 55% 72%, 55% 100%);
}

.nav-next::after {
  transform: rotate(180deg);
}

.dimension-body {
  padding-top: 28px;
}

.dimension-instruction {
  margin: 0 0 52px;
}

.dimension-title {
  margin: 0 0 26px;
  font-size: 12pt;
  line-height: 1.3;
  font-weight: 700;
}

.dimension-title em {
  font-style: italic;
  font-weight: 400;
}

.dimension-options {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  border: 0;
}

.dimension-option {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 18px;
  gap: 24px;
  min-height: 24px;
  cursor: pointer;
}

.dimension-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.dimension-option-text {
  font-weight: 400;
}

.checkbox-visual {
  display: inline-block;
  position: relative;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid #111;
}

.dimension-radio:checked ~ .checkbox-visual::after {
  position: absolute;
  top: 0;
  left: 4px;
  width: 4px;
  height: 9px;
  content: "";
  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dimension-radio:focus-visible ~ .checkbox-visual {
  outline: 2px solid #1b5fbf;
  outline-offset: 3px;
}

.vas-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 60px);
  height: 100%;
  padding-top: clamp(18px, 4vh, 50px);
  padding-right: clamp(20px, 3vw, 70px);
  padding-bottom: clamp(8px, 1.5vh, 16px);
}

.vas-instructions {
  align-self: start;
  max-width: 860px;
  margin-left: -24px;
  padding-top: 0;
  letter-spacing: 0;
}

.vas-line {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 22px;
  margin: 0 0 8px;
}

.vas-line strong {
  font-weight: 700;
}

.vas-line-3a {
  margin-bottom: 0;
}

.vas-continuation {
  grid-template-columns: 20px 1fr;
  margin-top: 0;
}

.vas-continuation::before {
  content: "";
}

.bullet-mark {
  font-size: 1.15em;
  line-height: 1.3;
}

.vas-line u {
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

.vas-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(100px, 8vw, 130px);
  height: 100%;
  min-height: 360px;
}

.healthbox {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 286px;
  height: 76px;
  min-height: 0;
  padding: 8px 10px;
  color: #fff;
  background: #000;
  text-align: center;
}

.healthbox-label {
  font-size: 11pt;
  font-weight: 700;
  line-height: 1.15;
  word-break: keep-all;
}

.healthbox-score {
  min-height: 0;
  margin-top: 1px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26pt;
  font-weight: 700;
  line-height: 1;
}

.vas-scale {
  position: relative;
  flex: 0 0 230px;
  display: grid;
  grid-template-columns: 64px 62px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: 27px;
  justify-content: center;
  justify-items: stretch;
  width: 230px;
  height: 100%;
  min-height: 360px;
}

.vas-anchor {
  grid-column: 1;
  justify-self: center;
  width: 190px;
  margin: 0;
  font-size: 10pt;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  transform: translateX(-25px);
  word-break: keep-all;
}

.vas-scale-row {
  position: relative;
  display: grid;
  grid-template-columns: 64px 62px;
  grid-column: 1 / -1;
  gap: 27px;
  width: auto;
  min-height: 0;
  margin: 10px 0 12px;
}

.vas-track-wrap {
  position: relative;
  width: 64px;
  height: 100%;
}

.vas-track-wrap:focus-within::after {
  position: absolute;
  inset: -10px -8px;
  z-index: 3;
  content: "";
  border: 3px solid #1b5fbf;
  border-radius: 6px;
  pointer-events: none;
}

.vas-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 64px;
  height: 100%;
  color: #111;
  overflow: visible;
}

.vas-axis,
.vas-tick {
  stroke: currentColor;
  shape-rendering: crispEdges;
  vector-effect: non-scaling-stroke;
}

.vas-axis {
  stroke-width: 2px;
}

.vas-tick-minor {
  stroke-width: 1px;
}

.vas-tick-major {
  stroke-width: 2.5px;
}

.vas-slider {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -4px;
  width: 72px;
  height: calc(100% + 16px);
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  direction: rtl;
  writing-mode: vertical-lr;
}

.vas-slider:focus-visible {
  outline: none;
}

.vas-slider::-webkit-slider-runnable-track {
  width: 72px;
  height: 100%;
  background: transparent;
}

.vas-slider::-moz-range-track {
  width: 72px;
  height: 100%;
  background: transparent;
}

.vas-slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  visibility: hidden;
  background: #d30000;
  border: 0;
  border-radius: 50%;
  opacity: 0;
}

.vas-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  visibility: hidden;
  background: #d30000;
  border: 0;
  border-radius: 50%;
  opacity: 0;
}

.vas-numbers {
  position: relative;
  height: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11pt;
}

.vas-selection {
  position: absolute;
  top: var(--vas-selection-top, 50%);
  left: -85px;
  z-index: 2;
  display: none;
  align-items: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.vas-slider[data-touched="true"] ~ .vas-selection {
  display: flex;
}

.vas-selection-score {
  min-width: 38px;
  margin-right: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16pt;
  font-weight: 700;
  line-height: 1;
  text-align: right;
}

.vas-selection-arrow {
  width: 66px;
  height: 30px;
  background: #4f89d8;
  clip-path: polygon(0 22%, 66% 22%, 66% 0, 100% 50%, 66% 100%, 66% 78%, 0 78%);
}

.vas-selection-dot {
  width: 20px;
  height: 20px;
  margin-left: -7px;
  background: #f12018;
  border-radius: 50%;
}

.vas-numbers span {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
}

.pos-0 {
  top: 0;
}

.pos-10 {
  top: 10%;
}

.pos-20 {
  top: 20%;
}

.pos-30 {
  top: 30%;
}

.pos-40 {
  top: 40%;
}

.pos-50 {
  top: 50%;
}

.pos-60 {
  top: 60%;
}

.pos-70 {
  top: 70%;
}

.pos-80 {
  top: 80%;
}

.pos-90 {
  top: 90%;
}

.pos-100 {
  top: 100%;
}

.vas-pda-instructions {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 58px;
}

.vas-pda-instructions .vas-instructions {
  max-width: 430px;
  margin-left: 0;
  transform: none;
}

.vas-pda-scale {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  justify-content: center;
  padding-top: clamp(6px, 2vh, 16px);
  height: 100%;
  min-height: 0;
}

.vas-pda-line4 {
  max-width: 360px;
  margin-bottom: 0;
}

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

.error-modal {
  width: min(600px, calc(100vw - 40px));
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 28%);
}

.error-modal::backdrop {
  background: rgb(0 0 0 / 35%);
}

.modal-box {
  position: relative;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.modal-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #aaa;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.modal-message {
  min-height: 112px;
  margin: 0;
  padding: 56px 18px 28px;
  font-family: Batang, AppleMyungjo, BatangChe, "함초롬바탕", "Noto Serif KR", serif;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px;
}

.modal-close-button {
  min-width: 62px;
  min-height: 34px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #c6c6c6;
  border-radius: 4px;
  cursor: pointer;
}

@media (width <= 1024px), (height < 480px) {
  .survey-frame {
    padding: 6px;
  }

  .screen {
    width: 100%;
    height: calc(100vh - 12px);
    border-width: 3px;
  }

  .screen-body {
    padding: 16px 20px 8px;
  }

  .cover-body {
    padding-top: 58px;
  }

  .eq-logo {
    width: 210px;
    height: auto;
    margin-bottom: 44px;
  }

  .cover-title {
    margin-bottom: 28px;
  }

  .dimension-instruction {
    margin-bottom: 26px;
  }

  .dimension-title {
    margin-bottom: 18px;
  }

  .dimension-options {
    gap: 15px;
  }

  .screen-footer {
    padding: 6px 20px 9px;
  }

  .copyright {
    margin-bottom: 10px;
    font-size: 8.5pt;
  }

  .nav-button {
    min-width: 84px;
    min-height: 34px;
    padding: 4px 10px;
  }

  .vas-screen {
    display: none !important;
  }

  .vas-pda-scale .vas-panel {
    position: relative;
    display: grid;
    grid-template-columns: clamp(100px, 28vw, 132px) clamp(118px, 36vw, 150px);
    gap: clamp(86px, 18vw, 130px);
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 0;
    padding-bottom: 4px;
  }

  .vas-pda-scale .healthbox {
    position: static;
    width: 100%;
    height: clamp(60px, 14vh, 76px);
    transform: none;
    align-self: center;
  }

  .vas-pda-scale .vas-scale {
    position: static;
    grid-template-columns: 52px 44px;
    column-gap: 18px;
    width: 100%;
    height: 100%;
    min-height: 0;
    justify-content: start;
  }

  .vas-pda-scale .vas-anchor {
    width: 142px;
    transform: none;
    font-size: 9pt;
  }

  .vas-pda-scale .vas-scale-row {
    grid-template-columns: 52px 44px;
    gap: 18px;
    width: 114px;
    min-height: 0;
    margin: 14px 0 12px;
  }

  .vas-pda-scale .vas-track-wrap {
    width: 52px;
  }

  .vas-pda-scale .vas-track {
    left: 0;
    width: 52px;
  }

  .vas-pda-scale .vas-slider {
    left: -4px;
    width: 60px;
  }

  .vas-pda-scale .vas-slider::-webkit-slider-runnable-track {
    width: 60px;
  }

  .vas-pda-scale .vas-slider::-moz-range-track {
    width: 60px;
  }

  .vas-pda-scale .vas-selection {
    left: -86px;
  }

  .vas-pda-scale .vas-selection-score {
    min-width: 26px;
    margin-right: 4px;
    font-size: 13pt;
  }

  .vas-pda-scale .vas-selection-arrow {
    width: 48px;
    height: 30px;
  }

  .vas-pda-scale .vas-selection-dot {
    width: 20px;
    height: 20px;
    margin-left: -6px;
  }

  .optional-number {
    display: none;
  }
}

@media (width > 1024px) and (height >= 480px) {
  .pda-vas-screen {
    display: none !important;
  }
}

@media (height < 500px) {
  .screen-footer {
    padding-top: 5px;
    padding-bottom: 6px;
  }

  .copyright {
    display: none;
  }

  [data-screen="cover"] .copyright,
  [data-screen="vas"] .copyright,
  [data-screen="vas-scale-pda"] .copyright {
    display: block;
  }
}

@media (height < 350px) {
  [data-screen="cover"] .copyright {
    display: none;
  }
}

@media (height < 420px) {
  .screen-body {
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .dimension-instruction {
    margin-bottom: 10px;
    font-size: 11pt;
  }

  .dimension-title {
    margin-bottom: 8px;
    font-size: 11pt;
  }

  .dimension-options {
    gap: 8px;
  }

  .dimension-option-text {
    font-size: 10.5pt;
  }

  .vas-pda-scale .vas-scale-row {
    margin: 6px 0 4px;
  }

  .vas-pda-scale .vas-anchor {
    font-size: 8.5pt;
    line-height: 1.05;
  }

  .vas-pda-line4 {
    font-size: 11pt;
  }

  .pda-vas-screen .screen-footer,
  .screen-footer {
    padding: 4px 14px 6px;
  }
}
