/*
  NINA TEST MOBILE V2
  Visual-only override for the existing test frontend.
  This file changes no text, HTML generation, API calls or event handlers.
  Load it after style.css.
*/

:root {
  --bg: #fff8f0;
  --card: #fffdf9;
  --text: #4a2932;
  --text2: #6e5354;
  --accent: #c46950;
  --accent2: #d58269;
  --border: #ead8c2;
  --green: #b78d54;
  --yellow: #d4a05d;
  --red: #b85f5f;
  --shadow: 0 16px 38px rgba(120, 70, 50, 0.12);
  --paper: #fffdf9;
  --chip: #f4e5d1;
  --ink: #4a2932;
  --gold: #d4a05d;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 90% 2%, rgba(244, 229, 209, 0.94), transparent 31%),
    radial-gradient(circle at 0% 44%, rgba(244, 229, 209, 0.52), transparent 29%),
    var(--bg);
  color: var(--text2);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#app {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.progress-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -2px -4px 18px;
  padding: 8px 4px 10px;
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.98) 72%, rgba(255, 248, 240, 0));
  backdrop-filter: blur(8px);
}

.progress-text {
  min-height: 16px;
  margin: 0 0 7px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border: 1px solid rgba(212, 160, 93, 0.2);
  border-radius: 999px;
  background: rgba(244, 229, 209, 0.9);
}

.progress-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  box-shadow: 0 0 10px rgba(196, 105, 80, 0.2);
}

.screen-number {
  top: max(7px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  color: rgba(74, 41, 50, 0.22);
  font-size: 10px;
}

.pause-btn {
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border: 1px solid rgba(212, 160, 93, 0.55);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.94);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(120, 70, 50, 0.14);
}

.screens-container {
  min-height: min(640px, calc(100svh - 88px));
}

.card,
.consent-item,
.modal-card {
  border: 1px solid rgba(212, 160, 93, 0.38);
  background: rgba(255, 253, 249, 0.97);
  box-shadow: var(--shadow);
}

.card {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 22px;
  border-radius: 26px;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.72;
}

h1,
h2,
.scene-title,
.v-line,
.v-author,
.consent-name,
.consent-role,
.consent-welcome,
.consent-item-text,
.consent-yn button,
.consent-btn {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  color: var(--ink);
  font-size: clamp(27px, 8vw, 38px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  color: var(--ink);
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 500;
  line-height: 1.12;
}

.q-text {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.52;
}

.q-symbol {
  width: 54px;
  height: 54px;
  min-width: 54px;
  margin-bottom: 17px;
  border: 1px solid rgba(212, 160, 93, 0.68);
  background: var(--chip);
  color: var(--accent);
  box-shadow: inset 0 0 0 5px rgba(255, 253, 249, 0.58);
}

.q-symbol svg {
  width: 30px;
  height: 30px;
}

.opt,
.skip-opt {
  position: relative;
  width: 100%;
  min-height: 54px;
  margin: 0 0 10px;
  padding: 14px 46px 14px 16px;
  border: 1.5px solid rgba(212, 160, 93, 0.48);
  border-radius: 17px;
  background: rgba(255, 253, 249, 0.94);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 6px 15px rgba(120, 70, 50, 0.06);
}

.opt::after,
.skip-opt::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(196, 105, 80, 0.52);
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--paper);
}

.opt:hover,
.skip-opt:hover {
  border-color: var(--accent);
  background: #fffaf5;
}

.opt.sel,
.skip-opt.sel {
  border-color: var(--accent);
  background: rgba(196, 105, 80, 0.1);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(196, 105, 80, 0.12);
}

.opt.sel::after,
.skip-opt.sel::after {
  border: 5px solid var(--accent);
  background: var(--paper);
}

.btn-primary,
.consent-btn {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 12px 24px rgba(196, 105, 80, 0.23);
}

.btn-primary:hover,
.consent-btn:not(:disabled):hover {
  box-shadow: 0 14px 28px rgba(196, 105, 80, 0.29);
  transform: translateY(-1px);
}

.btn-primary:active,
.consent-btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary:disabled,
.consent-btn:disabled {
  background: #eadfd4;
  color: #aa9792;
  box-shadow: none;
}

.btn-outline {
  min-height: 54px;
  border-color: var(--accent);
  border-radius: 18px;
  color: var(--accent);
  font-weight: 700;
}

.scene-title {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.scene-text {
  margin-bottom: 20px;
  color: var(--text2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
}

.guide-reply,
.event-text {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(212, 160, 93, 0.34);
  border-radius: 16px;
  background: var(--chip);
  color: var(--text2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.55;
}

.slider-wrap {
  margin: 4px 0 18px;
  padding: 22px 16px 16px;
  border: 1px solid rgba(212, 160, 93, 0.38);
  border-radius: 20px;
  background: rgba(244, 229, 209, 0.52);
}

.slider-labels {
  gap: 16px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.slider-labels span:last-child {
  text-align: right;
}

.slider-val {
  margin: 12px 0 4px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 600;
}

input[type="range"] {
  height: 8px;
  margin: 13px 0 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 160, 93, 0.24));
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  border: 7px solid var(--accent);
  background: #fff;
  box-shadow: 0 5px 12px rgba(120, 70, 50, 0.2);
}

.text-open,
.reflection-input,
#reg-screen input {
  width: 100%;
  min-height: 54px;
  border: 1.5px solid rgba(212, 160, 93, 0.5) !important;
  border-radius: 16px !important;
  background: rgba(255, 253, 249, 0.96) !important;
  color: var(--ink) !important;
  font-size: 16px !important;
  box-shadow: inset 0 1px 2px rgba(120, 70, 50, 0.04);
}

.text-open,
.reflection-input {
  min-height: 128px;
  padding: 15px;
  line-height: 1.5;
}

.text-open:focus,
.reflection-input:focus,
#reg-screen input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(196, 105, 80, 0.1);
}

::placeholder {
  color: rgba(110, 83, 84, 0.62);
}

.revelation-card {
  padding: 34px 22px 24px;
}

.revelation-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 160, 93, 0.62);
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
}

.revelation-text {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.58;
}

.reflection-label {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.5;
}

.verse {
  min-height: calc(100svh - 100px);
  padding: 40px 20px;
}

.v-line {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.58;
}

.v-author {
  color: var(--accent);
  font-size: 14px;
}

.transition-overlay {
  min-height: calc(100svh - 120px);
}

.transition-text {
  padding: 18px 22px;
  border: 1px solid rgba(212, 160, 93, 0.35);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.76);
  color: var(--text2);
  font-family: Georgia, "Times New Roman", serif;
}

.modal-overlay {
  padding: 18px;
  background: rgba(74, 41, 50, 0.28);
  backdrop-filter: blur(9px);
}

.modal-card {
  width: 100%;
  max-width: 360px;
  padding: 30px 22px 22px;
  border-radius: 26px;
}

.breath-circle {
  width: 112px;
  height: 112px;
  background: radial-gradient(circle at 35% 30%, #f2c7b7, var(--accent));
  box-shadow: 0 0 0 12px rgba(196, 105, 80, 0.08);
}

.breath-text {
  color: var(--accent);
  font-weight: 700;
}

.support-msg {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.55;
}

#reg-screen {
  min-height: calc(100svh - 52px);
  margin-top: -18px;
  padding-top: 20px;
}

#reg-screen .card {
  padding: 28px 20px 22px;
}

#reg-screen .card > p {
  color: var(--text2) !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

#reg-screen input {
  padding: 15px !important;
}

.consent-screen {
  max-width: 500px;
  min-height: 100vh;
  min-height: 100svh;
  margin: -14px -16px -28px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  background: transparent;
  color: var(--text2);
}

.consent-photo img {
  width: 92px;
  height: 92px;
  border: 7px solid var(--paper);
  outline: 1px solid rgba(212, 160, 93, 0.74);
  box-shadow: 0 14px 30px rgba(120, 70, 50, 0.18);
}

.consent-name {
  margin-top: 14px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 600;
}

.consent-role {
  margin-top: 4px;
  margin-bottom: 22px;
  color: var(--text2);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.consent-welcome {
  max-width: 420px;
  margin: 0 auto 22px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}

.consent-item {
  margin-bottom: 12px;
  padding: 17px 16px 15px;
  border-radius: 19px;
}

.consent-item-text {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.consent-yn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 9px;
}

.consent-yn button {
  width: 100%;
  min-width: 0;
  height: 52px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  text-shadow: none;
}

.consent-yn button::after {
  display: none;
}

.consent-yes {
  border: 1px solid var(--accent);
  background: rgba(196, 105, 80, 0.08);
  color: var(--accent);
}

.consent-no {
  border: 1px solid rgba(212, 160, 93, 0.62);
  background: var(--paper);
  color: var(--text2);
}

.consent-yes.sel,
.consent-no.sel {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  text-shadow: none;
  box-shadow: 0 8px 18px rgba(196, 105, 80, 0.2);
}

.consent-no-text {
  border-top-color: rgba(212, 160, 93, 0.35);
  color: var(--text2);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}

.consent-link {
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  text-underline-offset: 3px;
}

.consent-note,
.consent-footer {
  color: var(--text2);
  font-family: Arial, Helvetica, sans-serif;
  font-style: normal;
  line-height: 1.55;
}

.consent-btn {
  height: auto;
  margin-top: 4px;
  font-family: Arial, Helvetica, sans-serif;
}

.final-card {
  text-align: left;
}

#result-screen .card {
  margin-top: 14px;
}

#result-screen h1 {
  text-align: center;
}

@media (max-width: 380px) {
  #app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card {
    padding: 23px 16px 19px;
    border-radius: 23px;
  }

  .q-text {
    font-size: 17px;
  }

  .opt,
  .skip-opt {
    padding-left: 14px;
    font-size: 15px;
  }

  .consent-screen {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .consent-item {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (min-width: 700px) {
  #app {
    padding-top: 28px;
  }

  .card {
    padding: 32px 28px 28px;
  }
}

@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;
  }
}
