/* Heavenly Touch Day Spa — iPad intake. Earthy, calm, big touch targets. */
:root {
  --cream: #f5efe6;
  --paper: #fffdf9;
  --sand: #ebe1d1;
  --sand-d: #d9cab2;
  --sage: #5f6f52;
  --sage-d: #48553d;
  --sage-l: #e3e8da;
  --sage-xl: #f0f3ea;
  --clay: #a8694a;
  --plum: #5e2d4f;
  --ink: #2f2a26;
  --muted: #776c61;
  --line: #e2d6c4;
  --error: #a3392a;
  --error-bg: #fbeeea;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --navbar-h: 92px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.ribbon, .topbar, .stepper, .progress, .navbar { flex: none; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(168,105,74,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(95,111,82,.14), transparent 60%),
    var(--cream);
  font-size: 19px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  overscroll-behavior: none;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--sage-d); margin: 0; letter-spacing: .2px; }

.ribbon {
  position: relative; z-index: 50;
  background: repeating-linear-gradient(135deg, #f3e3b4, #f3e3b4 14px, #efd99e 14px, #efd99e 28px);
  color: #5a4613; text-align: center; font-size: 14px; font-weight: 600; padding: 6px 12px; letter-spacing: .3px;
}

/* ---------- top bar & progress ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px 10px; padding-top: max(14px, env(safe-area-inset-top));
}
.topbar-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 10px rgba(60,45,30,.18); }
.topbar-spa { font-family: var(--serif); color: var(--plum); font-size: 22px; line-height: 1.1; }
.topbar-form { color: var(--muted); font-size: 16px; }
.topbar-titles { flex: 1; }
.topbar-step { color: var(--muted); font-size: 16px; white-space: nowrap; }

.stepper { display: flex; gap: 8px; padding: 2px 28px 10px; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step-chip {
  flex: 1 1 0; min-width: 96px; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.55);
  border: 1px solid var(--line); font-size: 14px; color: var(--muted); white-space: nowrap;
}
.step-chip .num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sand); color: var(--muted); font-size: 13px; font-weight: 700;
}
.step-chip.current { background: var(--paper); color: var(--sage-d); border-color: var(--sage); font-weight: 600; box-shadow: 0 2px 10px rgba(95,111,82,.15); }
.step-chip.current .num { background: var(--sage); color: #fff; }
.step-chip.done { color: var(--sage-d); }
.step-chip.done .num { background: var(--sage-l); color: var(--sage-d); }
.step-chip .lbl { overflow: hidden; text-overflow: ellipsis; }
.progress { height: 4px; margin: 0 28px; background: var(--sand); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--sage), #8a9b72); transition: width .35s ease; }

/* ---------- screens ---------- */
.screen { flex: 1 0 auto; width: 100%; padding: 20px 28px 28px; max-width: 1180px; margin: 0 auto; outline: none; }
.screen.full { padding-bottom: 40px; display: flex; flex-direction: column; justify-content: center; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(70,55,40,.07); padding: 28px 32px; margin-bottom: 22px;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 6px 4px 16px; }
.section-head h1 { font-size: 34px; }
.section-head .paper-note { color: var(--muted); font-size: 15px; font-style: italic; }
.lead { color: var(--muted); margin: 4px 4px 18px; font-size: 18px; }

/* ---------- fields ---------- */
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 22px; }
.span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
@media (max-width: 760px) { .span-4, .span-3, .span-2 { grid-column: span 6; } }
.field { min-width: 0; }
.field > .label, .q {
  display: block; font-weight: 600; font-size: 19px; margin: 0 0 8px; color: var(--ink);
}
.q { font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); font-size: 15px; margin-left: 6px; }
.req { color: var(--clay); margin-left: 4px; }
.sub-labels { display: grid; gap: 12px; }
.sub-labels.two { grid-template-columns: 1fr 1fr; }
.sub-labels.csz { grid-template-columns: 3fr 1fr 1.4fr; }
.sub-labels .mini { display: block; font-size: 14px; color: var(--muted); margin: 0 0 4px 4px; }
.input, textarea.input {
  width: 100%; min-height: 58px; padding: 14px 16px; font-size: 20px; font-family: var(--sans);
  color: var(--ink); background: #fff; border: 1.5px solid var(--sand-d); border-radius: 14px;
  outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
textarea.input { resize: none; line-height: 1.4; }
.input:focus { border-color: var(--sage); box-shadow: 0 0 0 4px rgba(95,111,82,.16); }
.input::placeholder { color: #b5a996; }
.field.has-error .input, .input.has-error { border-color: var(--error); background: var(--error-bg); }
.err { color: var(--error); font-size: 16px; margin: 6px 4px 0; min-height: 0; }
.err:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.chip {
  border: 1px solid var(--line); background: var(--sage-xl); color: var(--sage-d); border-radius: 999px;
  padding: 10px 16px; font-size: 16px; min-height: 44px; cursor: pointer;
}
.chip:active { transform: scale(.97); }

/* yes / no */
.yesno-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.yesno-row .q { flex: 1 1 380px; margin: 0; }
.seg { display: inline-flex; gap: 10px; flex: none; }
.seg button {
  min-width: 112px; min-height: 58px; border-radius: 14px; border: 1.5px solid var(--sand-d); background: #fff;
  font-size: 19px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s;
}
.seg button[aria-pressed="true"] { background: var(--sage); border-color: var(--sage); color: #fff; box-shadow: 0 4px 12px rgba(95,111,82,.25); }
.followups { margin: 14px 0 0 0; padding: 16px 18px 6px 22px; border-left: 4px solid var(--sage-l); display: grid; gap: 14px; }
.followups[hidden] { display: none; }
.followups .label { font-weight: 500; font-size: 18px; }
.qblock { padding: 20px 0; border-bottom: 1px solid var(--line); }
.qblock:first-child { padding-top: 4px; }
.qblock:last-child { border-bottom: 0; padding-bottom: 4px; }

/* checkbox / radio tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tiles.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
  display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 12px 16px; text-align: left;
  background: #fff; border: 1.5px solid var(--sand-d); border-radius: 14px; cursor: pointer; font-size: 18px; transition: all .15s;
}
.tile .box {
  flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--sand-d); background: #fff;
  display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 800; transition: all .15s;
}
.tile.radio .box { border-radius: 50%; }
.tile > span:last-child { overflow-wrap: anywhere; }
.tile[aria-checked="true"] { border-color: var(--sage); background: var(--sage-xl); color: var(--sage-d); font-weight: 600; }
.tile[aria-checked="true"] .box { background: var(--sage); border-color: var(--sage); }
.tile[aria-checked="true"] .box::after { content: "✓"; }
.tile.radio[aria-checked="true"] .box::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.tile.long { grid-column: 1 / -1; }

/* drawing surfaces */
.diagram-frame { position: relative; width: min(100%, calc((100vh - 560px) * 968 / 619)); margin: 0 auto; background: #fff; border: 1.5px solid var(--sand-d); border-radius: 16px; overflow: hidden; }
.diagram-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; padding: 0; }
.diagram-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.diagram-views { width: min(100%, calc((100vh - 560px) * 968 / 619)); margin: 6px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; font-size: 13px; color: #a3988a; pointer-events: none; }
.pad-tools { display: flex; gap: 12px; justify-content: flex-end; margin-top: 12px; }
.sig-wrap { position: relative; }
.sig-frame { position: relative; width: 100%; aspect-ratio: 3.2 / 1; max-height: 300px; background: #fff; border: 1.5px dashed var(--sage); border-radius: 16px; overflow: hidden; }
.sig-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.sig-frame .sig-line { position: absolute; left: 6%; right: 6%; bottom: 26%; border-bottom: 1.5px solid #cdbfa8; pointer-events: none; }
.sig-frame .sig-x { position: absolute; left: 3%; bottom: 25%; font-size: 30px; color: #c2b39b; pointer-events: none; font-family: var(--serif); }
.sig-frame .sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #bfb2a0; font-size: 22px; pointer-events: none; font-family: var(--serif); font-style: italic; }
.sig-frame.has-ink .sig-hint { display: none; }
.sig-frame.has-error { border-color: var(--error); background: var(--error-bg); }
.sig-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); font-size: 17px; gap: 12px; flex-wrap: wrap; }

/* waiver */
.waiver { font-family: var(--serif); font-size: 21px; line-height: 1.6; color: #3a332d; background: #fffaf2; border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; }
.waiver .lead-in { font-style: italic; margin-bottom: 10px; color: var(--sage-d); }
.consent-tile { margin-top: 18px; }
.consent-tile .tile { align-items: flex-start; font-weight: 500; line-height: 1.4; }
.consent-tile .tile .box { margin-top: 2px; }

/* buttons */
.btn {
  min-height: 60px; padding: 0 28px; border-radius: 16px; border: 1.5px solid transparent; font-size: 20px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--sage); color: #fff; box-shadow: 0 6px 16px rgba(95,111,82,.28); }
.btn.primary:disabled { background: #a9b39e; box-shadow: none; }
.btn.ghost { background: rgba(255,255,255,.7); border-color: var(--sand-d); color: var(--ink); }
.btn.small { min-height: 46px; font-size: 16px; padding: 0 16px; border-radius: 12px; }
.btn.link { background: none; border: 0; color: var(--sage-d); text-decoration: underline; font-weight: 500; min-height: 44px; }
.navbar {
  position: sticky; left: 0; right: 0; bottom: 0; z-index: 30; flex: none; height: calc(var(--navbar-h) + var(--safe-b));
  padding: 14px 28px calc(14px + var(--safe-b)); display: flex; align-items: center; gap: 18px;
  background: rgba(250,246,239,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.navbar .btn { min-width: 170px; }
.navbar-hint { flex: 1; text-align: center; color: var(--muted); font-size: 16px; }

/* start screen */
.welcome { text-align: center; }
.welcome-logo { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 40px rgba(70,55,40,.22); margin: 0 auto 22px; display: block; }
.welcome h1 { font-size: 46px; color: var(--plum); font-weight: 500; }
.welcome .sub { color: var(--muted); font-size: 21px; margin: 10px 0 36px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 900px; margin: 0 auto; }
.choices.one { grid-template-columns: minmax(0, 520px); justify-content: center; }
@media (max-width: 760px) { .choices { grid-template-columns: 1fr; } }
.choice {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 26px; padding: 34px 28px; cursor: pointer; text-align: center;
  box-shadow: 0 10px 30px rgba(70,55,40,.09); transition: transform .12s, box-shadow .12s, border-color .12s; min-height: 250px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.choice:active { transform: scale(.985); border-color: var(--sage); }
.choice .icon { width: 84px; height: 84px; border-radius: 50%; background: var(--sage-xl); display: grid; place-items: center; font-size: 42px; margin-bottom: 6px; }
.choice .t { font-family: var(--serif); font-size: 32px; color: var(--sage-d); font-weight: 600; }
.choice .d { color: var(--muted); font-size: 18px; }
.choice .go { margin-top: 10px; color: #fff; background: var(--sage); border-radius: 999px; padding: 10px 26px; font-weight: 600; font-size: 18px; }
.welcome .fine { color: var(--muted); font-size: 16px; margin-top: 34px; }
.welcome .privacy { max-width: 760px; margin: 18px auto 0; font-size: 15px; color: #8a7f73; }

/* review */
.review-section { margin-bottom: 18px; }
.review-section .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-section h2 { font-size: 24px; }
.rv { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 22px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 17px; }
.rv:last-child { border-bottom: 0; }
.rv .k { color: var(--muted); }
.rv .v { font-weight: 600; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.rv .v.empty { color: #b9ad9b; font-weight: 400; }
.rv.sub .k { padding-left: 18px; }
.review-diagram { max-width: 640px; width: 100%; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }

/* thank you / saving */
.center { text-align: center; }
.big-check { width: 120px; height: 120px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-size: 64px; margin: 0 auto 24px; box-shadow: 0 10px 30px rgba(95,111,82,.35); }
.thanks h1 { font-size: 46px; color: var(--plum); font-weight: 500; }
.thanks p { font-size: 22px; color: var(--muted); margin: 12px auto; max-width: 720px; }
.countdown { margin-top: 28px; color: var(--muted); font-size: 18px; }
.countdown b { color: var(--sage-d); }
.preview-box { margin: 34px auto 0; max-width: 720px; text-align: left; background: #fbf6e6; border: 1px dashed #d9c48c; border-radius: 14px; padding: 16px 20px; font-size: 16px; color: #5a4a20; }
.preview-box .btn { margin-top: 10px; }
.spinner { width: 72px; height: 72px; border-radius: 50%; border: 7px solid var(--sage-l); border-top-color: var(--sage); animation: spin 1s linear infinite; margin: 0 auto 26px; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: #fff6e8; border: 1px solid #ecd2a5; border-radius: 14px; padding: 18px 22px; color: #6b4a16; font-size: 18px; max-width: 760px; margin: 18px auto; text-align: left; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(47,42,38,.45); display: grid; place-items: center; padding: 24px; backdrop-filter: blur(3px); }
.modal { background: var(--paper); border-radius: 24px; padding: 30px 32px; width: min(560px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal h2 { font-size: 28px; margin-bottom: 8px; }
.modal p { color: var(--muted); margin: 8px 0 18px; }
.modal .row { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 14px 0 20px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--sage); }
.pin-dots span.on { background: var(--sage); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keypad button { min-height: 66px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-size: 26px; font-weight: 600; cursor: pointer; }
.staff-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.staff-row:last-child { border-bottom: 0; }
.staff-row .seg button { min-width: 0; padding: 0 14px; min-height: 48px; font-size: 16px; }
.staff-note { font-size: 15px; color: var(--muted); background: var(--sage-xl); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--navbar-h) + 24px); transform: translateX(-50%) translateY(30px); opacity: 0; z-index: 120;
  background: #3d342d; color: #fff; padding: 14px 22px; border-radius: 14px; font-size: 17px; transition: all .25s; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.extras-flag { display: inline-block; background: #f3e3b4; color: #5a4613; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 8px; margin-left: 10px; vertical-align: middle; font-family: var(--sans); }

@media (orientation: landscape) {
  .welcome-logo { width: 150px; height: 150px; margin-bottom: 14px; }
  .welcome h1 { font-size: 42px; }
  .welcome .sub { margin-bottom: 26px; }
  .choice { min-height: 220px; }
}

/* "Clients under 18" info note (MINORS_SECTION) */
.info-note {
  display: flex; gap: 16px; align-items: flex-start; margin: 0 0 18px; padding: 16px 20px;
  background: linear-gradient(180deg, #f3f6ee, #eef2e7); border: 1px solid #cfd9c2; border-left: 5px solid var(--sage);
  border-radius: 14px; color: #3d4a33; font-size: 18px; line-height: 1.5; box-shadow: 0 4px 14px rgba(95,111,82,.08);
}
.info-note b { color: var(--sage-d); }
.info-icon {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 18px; margin-top: 1px;
}

.help { margin: -2px 0 10px; color: var(--muted); font-size: 16px; }
.req-pill { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: #f4e6dc; color: var(--clay); font-size: 13px; font-weight: 700; vertical-align: 1px; }
textarea.input[data-fid="health_concerns"] { min-height: 170px; }

/* language picker */
.lang-screen .choices { margin-top: 26px; }
.choice.lang { min-height: 150px; justify-content: center; }
.choice.lang .t { font-size: 34px; }
/* therapist staff notes (important) */
.staff-notes { border: 2px solid #b8322a; background: #fdf3f1; border-radius: 14px; padding: 14px 16px; margin-top: 18px; }
.staff-notes .label { color: #8e2219; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.imp-badge { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #b8322a; color: #fff; font-weight: 900; align-items: center; justify-content: center; font-size: 17px; }
.notice.staff-error { background: #fdecea; border-color: #e5a29b; color: #7a1c14; font-size: 17px; }

/* Therapist review (Oct 13 2026) */
.tr-review summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.tr-review summary::-webkit-details-marker { display: none; }
.tr-review summary h2 { font-size: 26px; }
.tr-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.tr-section h2 { font-size: 21px; }
.tr-diagram { max-width: 360px; }
.tr-sig { max-width: 320px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
