:root {
  color-scheme: light;
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  color: #241a2e;
  background: #fbf7f0;
  --ink: #241a2e;
  --muted: #645969;
  --line: #e9dfd7;
  --peach: #fce7d6;
  --orange: #ad4e29;
  --primary: #332140;
  --surface: #fffdf9;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 15% 0, #fae2cf 0%, transparent 50%),
    radial-gradient(ellipse at 94% 100%, #e8e1f2 0%, transparent 55%),
    #fbf7f0;
}
body:has(dialog[open]) { overflow: hidden; }
button, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #7d4da2;
  outline-offset: 3px;
}
h1, h2, p { margin: 0; }
svg { display: block; }

.experience {
  width: min(100%, 535px);
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) max(13px, env(safe-area-inset-right))
    max(13px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left));
}
.topline { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #de925e;
  border-radius: 14px;
  color: #492535;
  background: linear-gradient(140deg, #ffd6a3, #f6a873);
  box-shadow: 0 4px 10px #8b462121;
}
.brand-mark svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wordmark { display: block; font-size: 1.25rem; font-weight: 850; letter-spacing: -.045em; line-height: 1; }
.wordmark span { color: var(--orange); }
.brand-caption { display: block; color: var(--muted); font-size: .68rem; margin-block-start: 3px; }
.receipt-link {
  flex: none;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--primary);
  background: #fffdf9;
  padding: 5px 9px;
  font-size: .76rem;
  font-weight: 750;
}
.receipt-link svg, .footnote svg, .receipt-close svg, .primary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.panel {
  overflow: hidden;
  border: 1px solid #e6d9ce;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 40px #54323112, 0 2px 4px #54323109;
}
.startup { padding: 36px 19px; text-align: center; }
.startup h1 { font-size: 1.18rem; }
.startup p { margin-block-start: 8px; color: var(--muted); font-size: .87rem; }
.startup-retry { margin-block-start: 13px; }
.loader {
  display: block;
  width: 31px;
  height: 31px;
  margin: 0 auto 15px;
  border: 2px solid #eedcd4;
  border-top-color: #9a492d;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.survey-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 15px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(105deg, #fffdf9 39%, #fdf0e6);
}
.eyebrow { color: #8b482d; font-size: .67rem; font-weight: 800; }
.survey-head h1 { margin-block-start: 3px; font-size: clamp(1.18rem, 5vw, 1.6rem); letter-spacing: -.04em; }
.progress { width: min(30%, 93px); flex: none; }
.progress-count { display: block; font-weight: 800; color: #5d385a; font-size: .72rem; margin-block-end: 4px; }
.progress-track { display: flex; gap: 3px; }
.progress-track i { flex: 1; height: 4px; border-radius: 3px; background: #e5dbeb; }
.progress-track .done { background: #a55a3d; }
.progress-track .current { background: #e6aa82; }
.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 7px 13px 0;
}
.answers:empty { display: none; }
.answer-chip {
  min-width: 0;
  min-height: 33px;
  border-radius: 8px;
  border: 1px solid #eee4d8;
  background: #faf5ee;
  color: #58475a;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  text-align: start;
  font-size: .68rem;
  font-weight: 700;
}
.answer-chip span:first-child { overflow-wrap: anywhere; }
.answer-chip bdi {
  flex: none;
  min-width: 19px;
  border-radius: 6px;
  padding: 3px 4px;
  text-align: center;
  font-size: .68rem;
  background: #ede1f0;
  color: #5b3465;
}
.answer-chip[aria-current="step"] { border-color: #a66fbc; }
.question-card, .review-card { padding: 11px 13px 0; animation: arrive .2s ease-out both; }
@keyframes arrive { from { transform: translateY(5px); opacity: .55; } to { transform: translateY(0); opacity: 1; } }
.step-id { color: #855338; font-size: .67rem; font-weight: 800; margin-block-end: 3px; }
.question-title { font-size: clamp(1.19rem, 5.5vw, 1.58rem); letter-spacing: -.025em; line-height: 1.13; }
.instruction { font-size: .78rem; color: var(--muted); margin-block-start: 5px; }
.faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-block: 10px 7px; }
.face-choice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  min-width: 0;
  border: 1px solid #ebdfd6;
  border-radius: 12px;
  background: #fffefa;
  color: var(--ink);
  padding: 4px 1px 3px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.face-choice:hover, .face-choice[aria-pressed="true"] { border-color: #d1a18b; background: #fdf1e5; transform: translateY(-2px); }
.face-choice:active { transform: translateY(1px); }
.face-choice svg { width: clamp(31px, 10vw, 49px); height: auto; }
.face-choice b { font-size: .69rem; line-height: 1; }
.face-choice small { font-size: clamp(.49rem, 2.2vw, .69rem); color: #635265; line-height: 1.05; text-align: center; min-height: 1.9em; display: grid; align-items: center; }
.next-up {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px dashed #e8dbd5;
  border-radius: 8px;
  font-size: .71rem;
  color: #746873;
}
.next-up span { color: #835b48; font-weight: 800; font-size: .66rem; }
.notes { padding: 9px 13px 10px; }
.notes label { display: flex; align-items: baseline; gap: 5px; font-size: .77rem; font-weight: 800; color: #4b3c50; margin-block-end: 4px; }
.notes small { color: #746570; font-size: .68rem; font-weight: 400; }
.notes textarea {
  display: block;
  width: 100%;
  height: 45px;
  min-height: 43px;
  max-height: 148px;
  resize: vertical;
  border: 1px solid #e9dfd7;
  border-radius: 10px;
  color: var(--ink);
  background: #fcf9f5;
  padding: 6px 8px;
  font-size: 16px;
}
.notes textarea::placeholder { font-size: .76rem; color: #786c76; }
.notes.is-complete textarea { height: 58px; }
.callback { margin: 0 13px 7px; min-height: 34px; display: flex; align-items: center; gap: 7px; color: #594161; font-size: .8rem; font-weight: 800; }
.callback input { width: 17px; height: 17px; accent-color: #875b98; margin: 0; }
.submit-row { padding: 0 13px 11px; }
.primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 43px;
  border: 1px solid #422d52;
  border-radius: 11px;
  color: white;
  background: linear-gradient(120deg, #533762, #332140);
  font-size: .88rem;
  font-weight: 800;
}
.primary svg { width: 16px; }
.primary:disabled { cursor: wait; opacity: .74; }
.form-error { margin: 0 13px 12px; color: #9e2632; font-size: .8rem; }
.review-card { display: flex; align-items: center; gap: 9px; }
.review-card .result-face { width: 51px; margin: 0; flex: none; }
.review-card h2 { font-size: 1.05rem; line-height: 1.2; }
.review-card p { color: var(--muted); margin-block-start: 3px; font-size: .78rem; }

.result { padding: clamp(15px, 5vw, 25px); text-align: center; }
.result-face { width: 110px; height: auto; margin: 0 auto 8px; }
.result h1 { font-size: clamp(1.5rem, 6vw, 2.12rem); letter-spacing: -.045em; }
.result > p { margin-block-start: 6px; color: var(--muted); line-height: 1.45; font-size: .9rem; }
.google-block { margin-block-start: 15px; padding: 12px; background: #faf6fa; border: 1px solid #e9dfec; border-radius: 15px; }
.google-block p { color: #57475c; font-size: .83rem; margin-block-end: 9px; }
.google-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  border: 1px solid #dbcedf;
  border-radius: 10px;
  background: #fff;
  color: #392846;
  font-weight: 800;
  font-size: .89rem;
  text-decoration: none;
}
.google-cta:hover { border-color: #ad90bc; }
.google-cta svg { width: 18px; height: 18px; }
.tear { transform-box: fill-box; transform-origin: center; opacity: 0; animation: fall 4.5s .2s infinite; }
@keyframes fall {
  0%, 12% { opacity: 0; transform: translate(0, -1px) scale(.52); }
  16% { opacity: .9; transform: translate(0, 0) scale(.77); }
  30% { opacity: .93; transform: translate(1.2px, 19px) scale(.95); }
  43%, 100% { opacity: 0; transform: translate(3px, 34px) scale(.88); }
}
.wink-open { animation: wink-open 5s .4s infinite; }
.wink-shut { opacity: 0; animation: wink-shut 5s .4s infinite; }
@keyframes wink-open { 0%, 6%, 14%, 100% { opacity: 1; } 7%, 13% { opacity: 0; } }
@keyframes wink-shut { 0%, 6%, 14%, 100% { opacity: 0; } 7%, 13% { opacity: 1; } }
.footnote { display: flex; gap: 5px; align-items: center; justify-content: center; color: var(--muted); font-size: .69rem; }
.footnote svg { width: 13px; height: 13px; }

.receipt {
  width: min(100% - 26px, 485px);
  max-height: min(660px, 82dvh);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 21px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 12px 50px #2e203847;
  overflow: hidden;
}
.receipt[open] { display: flex; flex-direction: column; }
.receipt::backdrop { background: #23152d88; }
.receipt-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 13px 15px; background: #fff1e7; border-bottom: 1px solid var(--line); }
.receipt-head h2 { margin-block-start: 3px; font-size: 1.2rem; }
.receipt-close { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); }
.receipt-body { min-height: 0; padding: 13px 15px 16px; overflow: auto; overscroll-behavior: contain; }
.receipt-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.receipt-facts div { background: #f8f3ed; border-radius: 9px; padding: 7px; }
.receipt-facts dt { font-size: .68rem; color: var(--muted); }
.receipt-facts dd { margin: 2px 0 0; font-size: .85rem; font-weight: 800; overflow-wrap: anywhere; }
.receipt-table { width: 100%; border-collapse: collapse; font-size: .85rem; text-align: start; }
.receipt-table caption { text-align: start; font-weight: 800; padding: 3px 0 5px; }
.receipt-table :is(th, td) { padding: 6px 4px; text-align: start; border-bottom: 1px solid var(--line); }
.receipt-table td:first-child { overflow-wrap: anywhere; }
.receipt-table :is(th, td):last-child { text-align: end; }
.receipt-note { color: var(--muted); font-size: .76rem; margin-block-start: 7px; }

@media (min-width: 480px) and (min-height: 710px) {
  .experience { gap: 16px; }
  .survey-head { padding: 17px 20px 14px; }
  .question-card, .review-card { padding: 15px 19px 0; }
  .notes, .answers { padding-inline: 19px; }
  .callback { margin-inline: 19px; }
  .submit-row { padding-inline: 19px; }
  .face-choice { min-height: 78px; }
}
@media (max-height: 530px) {
  .experience { justify-content: flex-start; gap: 6px; padding-block-start: max(6px, env(safe-area-inset-top)); }
  .survey-head { padding-block: 8px 7px; }
  .result-face { width: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tear { opacity: .76; }
}
