

* { box-sizing: border-box; }

html,
body.qc-body,
body.ffw-body {
  margin: 0;

  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--chalk-white, #FAFAFA);
  font-family: 'Oxygen', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--charcoal-grey, #3E3E3E);
  -webkit-text-size-adjust: 100%;
}

.qc,
.ffw {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--chalk-white, #FAFAFA);
}

@media (min-width: 720px) {
  body.qc-body,
  body.ffw-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--sea-mist, #F0F6FA);
  }
  .qc,
  .ffw {
    width: 100%;
    max-width: 520px;
    height: min(880px, calc(100dvh - 64px));
    border: 2px solid var(--heather-purple, #C6069F);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
@media (min-width: 1024px) {
  .qc,
  .ffw { max-width: 620px; height: min(920px, calc(100dvh - 72px)); }
}

.qc-top,
.ffw-top {
  flex: 0 0 auto;
}
.qc-header,
.ffw-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 10px 56px;
  background: var(--sea-mist, #F0F6FA);
}
.qc-back, .ffw-back,
.qc-exit, .ffw-exit {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;

  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
}
.qc-back, .ffw-back { left: 6px; }
.qc-exit, .ffw-exit {
  right: 10px;
  font-size: 28px; line-height: 1;
  color: var(--heather-purple, #C6069F);
}
.qc-back img, .ffw-back img { display: block; width: 24px; height: 24px; }
.qc-back:hover, .ffw-back:hover,
.qc-exit:hover, .ffw-exit:hover { opacity: 0.7; }
.qc-exit:hover, .ffw-exit:hover { color: var(--atlantic-blue, #03539D); opacity: 1; }
.qc-back[hidden], .ffw-back[hidden] { display: none; }
.qc-back:focus-visible, .ffw-back:focus-visible,
.qc-exit:focus-visible, .ffw-exit:focus-visible {
  outline: 3px solid var(--atlantic-blue, #03539D);
  outline-offset: 2px; border-radius: 8px;
}
.qc-logo, .ffw-logo {
  flex: 0 0 auto;
  height: 32px; width: auto;
  display: block; max-width: 100%;
}

.qc-progress,
.ffw-progress {
  flex: 0 0 auto;
  height: 6px;
  background: #dce8f2;
  overflow: hidden;
}
.qc-progress-fill,
.ffw-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--atlantic-blue, #03539D), var(--heather-purple, #C6069F));
  transition: width 0.35s ease;
}

.qc-main,
.ffw-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.qc-screen,
.ffw-screen {
  width: 100%;

  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  border: 4px solid var(--heather-purple, #C6069F);
  border-radius: 16px;
  background: var(--chalk-white, #FAFAFA);
}

.qc-screen > *,
.ffw-screen > * { flex: 0 0 auto; width: 100%; }

@media (min-width: 720px) {
  .qc-main, .ffw-main { padding: 16px; }
  .qc-screen, .ffw-screen { padding: 20px; border-radius: 18px; }
}

.qc-choice,
.ffw-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 56px;
  padding: 0.95rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, var(--atlantic-blue, #03539D), #025ba3);
  border: 3px solid var(--heather-purple, #C6069F);
  border-radius: 12px;
  color: var(--chalk-white, #FAFAFA);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(3, 83, 157, 0.18);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .qc-choice:hover,
  .ffw-choice:hover {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
      linear-gradient(180deg, var(--gorse-yellow, #FCC600), #e6c200);
    color: var(--atlantic-blue, #03539D);
    border-color: var(--atlantic-blue, #03539D);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 208, 0, 0.25);
  }

  .qc-choice.selected:hover,
  .ffw-choice.selected:hover {
    border-color: var(--heather-purple, #C6069F);
    box-shadow: 0 8px 24px rgba(255, 208, 0, 0.35);
  }
}
.qc-choice:active,
.ffw-choice:active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, var(--gorse-yellow, #FCC600), #e6c200);
  color: var(--atlantic-blue, #03539D);
  border-color: var(--atlantic-blue, #03539D);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 208, 0, 0.25);
}
.qc-choice.selected,
.ffw-choice.selected {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, var(--gorse-yellow, #FCC600), #e6c200);
  color: var(--atlantic-blue, #03539D);
  border-color: var(--heather-purple, #C6069F);
  box-shadow: 0 4px 16px rgba(255, 208, 0, 0.25);
}
.qc-choice:focus-visible,
.ffw-choice:focus-visible {
  outline: 3px solid var(--gorse-yellow, #FCC600);
  outline-offset: 2px;
}

.qc-choice .qc-tick,
.ffw-choice .ffw-tick {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: transparent;
  background: rgba(255, 255, 255, 0.12);
}
.qc-choice.selected .qc-tick,
.ffw-choice.selected .ffw-tick {
  background: var(--chalk-white, #FAFAFA);
  border-color: var(--atlantic-blue, #03539D);
  color: var(--atlantic-blue, #03539D);
}

.qc-btn,
.ffw-btn {
  min-height: 54px;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-family: 'Oxygen', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.qc-btn-primary,
.ffw-btn-primary {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, var(--heather-purple, #C6069F), var(--heather-purple, #C6069F));
  color: var(--chalk-white, #FAFAFA);
  border: 3px solid var(--gorse-yellow, #FCC600);
  box-shadow: 0 4px 10px rgba(198, 6, 159, 0.18);
}
.qc-btn-primary:active,
.ffw-btn-primary:active { transform: translateY(1px); }
.qc-btn-primary:disabled,
.ffw-btn-primary:disabled { opacity: 0.5; cursor: default; }

.ffw-btn-back {
  background: #e9eef5;
  color: var(--atlantic-blue, #03539D);
  border: none;
}
.ffw-btn-back:hover { background: #dde5ef; }

.ffw-slider {
  background: transparent !important;
}
.ffw-slider::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  height: 4px;
  background: linear-gradient(180deg, #2a74b8, #024a8a);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(3, 83, 157, 0.28);
}
.ffw-slider::-moz-range-track {
  height: 4px;
  background: linear-gradient(180deg, #2a74b8, #024a8a);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(3, 83, 157, 0.28);
}
.ffw-slider::-webkit-slider-thumb { margin-top: -13px; }

.qc-screen { animation: qcIn 0.28s ease; }
.ffw-screen { animation: ffwIn 0.28s ease; }
@keyframes qcIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ffwIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .qc-screen, .ffw-screen { animation: none; }
  .qc-progress-fill, .ffw-progress-fill { transition: none; }
  .qc-choice, .ffw-choice { transition: none; }
}

@media (max-height: 700px) {
  .qc-header, .ffw-header { min-height: 52px; padding-top: 4px; padding-bottom: 4px; }
  .qc-logo, .ffw-logo { height: 28px; }
  .qc-main, .ffw-main {
    padding-top: 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .qc-choice, .ffw-choice { min-height: 50px; padding: 0.75rem 1rem; }
  .qc-btn, .ffw-btn { min-height: 50px; }
}
