/* ===== Questionário ===== */
.form-page { min-height: 100vh; min-height: 100dvh; background:
  radial-gradient(700px 400px at 100% 0%, #e2f1e6 0%, transparent 70%),
  radial-gradient(600px 400px at 0% 100%, #fbefcc 0%, transparent 70%), var(--cream); }
.form-page h1 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 14px; font-size: clamp(30px, 5vw, 46px); color: var(--olive); letter-spacing: -.015em; }
.form-page h1 em { color: var(--teal); }
.kicker { display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--olive-2); margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 14px; }

.f-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 4vw, 40px); }
.f-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.f-brand span { display: flex; flex-direction: column; line-height: 1.1; }
.f-brand strong { font-family: var(--serif); font-weight: 600; color: var(--olive); font-size: 18px; }
.f-brand small { font-size: 12px; color: var(--muted); font-weight: 600; }
.f-save { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.f-save::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.f-save.ok::before { background: #2fb36b; } .f-save.busy::before { background: var(--sun); animation: blink 1s infinite; } .f-save.err { color: #c43d3d; } .f-save.err::before { background: #c43d3d; }
@keyframes blink { 50% { opacity: .3; } }

.f-progress { position: sticky; top: 0; z-index: 20; padding: 10px clamp(16px, 4vw, 40px) 8px; background: rgba(251,248,241,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.f-progress-bar { height: 8px; border-radius: 99px; background: #e6e2d3; overflow: hidden; max-width: 760px; margin: 0 auto; }
.f-progress-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--lime), var(--teal-2)); transition: width .6s var(--ease); }
.f-progress-meta { max-width: 760px; margin: 6px auto 0; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }

.f-main { padding: 18px clamp(16px, 4vw, 40px) 200px; position: relative; }
.screen { max-width: 760px; margin: 0 auto; animation: fadeUp .55s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* código */
.code-card { text-align: center; background: #fff; border-radius: 32px; padding: 34px clamp(20px, 5vw, 56px) 30px; box-shadow: var(--shadow-lg); max-width: 560px; margin: 4vh auto 0; }
.code-chibi { width: 150px; margin: -4px auto 4px; }
.code-card p { color: var(--ink-2); }
.code-boxes { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 26px 0 8px; }
.code-box { width: 52px; height: 64px; text-align: center; font-family: var(--pixel); font-size: 30px; text-transform: uppercase; border: 2px solid #e2ddcc; border-radius: 14px; background: var(--cream); outline: none; transition: border-color .2s, box-shadow .2s, transform .2s; caret-color: var(--teal); }
.code-box:focus { border-color: var(--teal-2); box-shadow: 0 0 0 4px rgba(31,154,134,.15); transform: translateY(-2px); background: #fff; }
.code-dash { color: var(--muted); font-weight: 700; }
.code-boxes.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.btn-big { padding: 1.05em 2em; font-size: 17px; }
.code-card .btn-big { width: 100%; margin-top: 10px; }
.code-help { font-size: 14px; margin: 18px 0 0; }
.code-help a { color: var(--teal); font-weight: 700; }
.f-error { color: #c43d3d; font-weight: 600; font-size: 14.5px; min-height: 1.2em; margin: 8px 0; }

/* boas-vindas */
.welcome { background: #fff; border-radius: 32px; padding: clamp(26px, 5vw, 48px); box-shadow: var(--shadow); }
.welcome p { color: var(--ink-2); }
.w-sections { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 8px; }
.w-sections li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--cream); font-weight: 600; }
.ws-n { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #fff; font-family: var(--pixel); color: var(--teal); box-shadow: inset 0 0 0 1px var(--line); }
.ws-t { flex: 1; } .ws-c { font-size: 13px; color: var(--muted); }
.w-sections li.done .ws-n { background: var(--teal-2); color: #fff; }
.w-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; }
.w-tips div { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); background: #f4f8ef; padding: 14px; border-radius: 14px; }
.w-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.welcome .w-actions { justify-content: flex-start; }

/* pergunta */
.q-card { background: #fff; border-radius: 30px; padding: clamp(24px, 5vw, 44px); box-shadow: var(--shadow-lg); }
.q-card.enter { animation: qIn .5s var(--ease); }
@keyframes qIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.q-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.q-section { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); background: var(--mint); padding: 6px 12px; border-radius: 99px; }
.q-num { font-family: var(--pixel); font-size: 15px; color: var(--muted); }
.q-label { display: block; font-family: var(--serif); font-size: clamp(23px, 3.4vw, 32px); line-height: 1.2; color: var(--ink); margin-bottom: 10px; }
.q-help { color: var(--muted); margin: 0 0 22px; font-size: 15.5px; }
.q-fig { margin: -6px 0 22px; }
.q-fig a { display: inline-block; max-width: 100%; }
.q-fig img { display: block; max-width: 100%; max-height: 360px; border-radius: 16px; box-shadow: 0 8px 24px -14px rgba(38,48,15,.45); background: #fff; }
.q-fig figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.q-body input[type=text], .q-body input[type=tel], .q-body input[type=email], .q-body input[type=date], .q-body textarea {
  width: 100%; border: 2px solid #e4dfcf; background: var(--cream); border-radius: 16px; padding: 15px 18px; font-size: 17px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; resize: none; line-height: 1.5;
}
.q-body textarea { min-height: 120px; }
.q-body input:focus, .q-body textarea:focus { border-color: var(--teal-2); background: #fff; box-shadow: 0 0 0 4px rgba(31,154,134,.13); }
.q-body ::placeholder { color: #aaa58f; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; position: relative; }
.field > span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.field.unit em { position: absolute; right: 16px; bottom: 17px; font-style: normal; color: var(--muted); font-weight: 700; font-size: 14px; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 10px 16px; border-radius: 99px; background: var(--cream); border: 2px solid #e4dfcf; font-weight: 600; font-size: 14.5px; transition: .2s var(--ease); }
.chip span::before { content: '+ '; color: var(--muted); }
.chip input:checked + span { background: var(--teal-2); border-color: var(--teal-2); color: #fff; }
.chip input:checked + span::before { content: '✓ '; color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.chip:hover span { border-color: var(--teal-2); }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt { position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 14px; border-radius: 18px; background: var(--cream); border: 2px solid #e4dfcf; text-align: center; font-weight: 600; font-size: 14.5px; transition: .2s var(--ease); }
.opt input { position: absolute; opacity: 0; }
.opt:hover { border-color: var(--teal-2); transform: translateY(-2px); }
.opt:has(input:checked) { border-color: var(--teal-2); background: #e8f6f1; box-shadow: 0 0 0 3px rgba(31,154,134,.15); }
.opt:has(input:focus-visible) { outline: 3px solid var(--sun); }
.options.plain { grid-template-columns: repeat(2, 1fr); }
.options.plain .opt { flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px 16px; }
.options.plain .opt::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9c2ad; background: #fff; transition: .2s; }
.options.plain .opt:has(input:checked)::before { border-color: var(--teal-2); background: var(--teal-2); box-shadow: inset 0 0 0 3px #fff; }
.glass { width: 30px; height: 40px; border: 3px solid #7fb9c9; border-top: 0; border-radius: 0 0 8px 8px; position: relative; overflow: hidden; display: grid; place-items: center; font-style: normal; color: var(--muted); font-weight: 800; }
.glass b { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#8fd3f0, #4fa6dd); transition: height .4s; }
.opt:has(input:checked) .glass b { animation: slosh 1.2s ease-in-out infinite; }
@keyframes slosh { 50% { transform: skewY(-6deg); } }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.sc { cursor: pointer; position: relative; }
.sc input { position: absolute; opacity: 0; }
.sc span { display: grid; place-items: center; height: 52px; border-radius: 12px; font-family: var(--pixel); font-size: 20px; background: var(--cream); border: 2px solid #e4dfcf; transition: .2s var(--ease); }
.sc:hover span { transform: translateY(-3px); border-color: hsl(calc(var(--h) * 1deg) 60% 45%); }
.sc input:checked + span { background: hsl(calc(var(--h) * 1deg) 62% 48%); border-color: transparent; color: #fff; transform: translateY(-3px) scale(1.06); }
.sc input:focus-visible + span { outline: 3px solid var(--sun); }
.scale-legend { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 700; margin: 8px 0 18px; }
.drop { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 18px; border: 2px dashed #cfc8b2; border-radius: 18px; cursor: pointer; transition: .2s; background: #fdfcf7; }
.drop:hover, .drop.over { border-color: var(--teal-2); background: #eef8f4; }
.drop-ic { font-size: 26px; }
.drop strong { display: block; } .drop small { color: var(--muted); }
.files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; background: var(--cream); padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.files .f-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.files .f-size { color: var(--muted); font-size: 12.5px; }
.files .err .f-size { color: #c43d3d; }
.f-rm { border: 0; background: #fff; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.f-rm:hover { color: #c43d3d; }
.bristol { margin-top: 14px; background: #f4f8ef; border-radius: 14px; padding: 12px 16px; font-size: 14.5px; }
.bristol summary { cursor: pointer; font-weight: 700; color: var(--teal); }
.bristol ol { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; color: var(--ink-2); }

.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.q-kbd { font-size: 12.5px; color: var(--muted); }
kbd { font-family: var(--pixel); background: var(--cream-2); padding: 2px 6px; border-radius: 4px; box-shadow: 0 2px 0 #d6d0bd; }

/* revisão */
.review { text-align: center; background: #fff; border-radius: 32px; padding: clamp(26px, 5vw, 48px); box-shadow: var(--shadow-lg); }
.review-chibi { width: 170px; margin: -10px auto 6px; }
.review p { color: var(--ink-2); }
.r-title { font-weight: 800; text-align: left; margin: 20px 0 8px; }
.r-list { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.r-list button { width: 100%; text-align: left; border: 0; background: var(--cream); padding: 10px 14px; border-radius: 12px; cursor: pointer; font-size: 14.5px; }
.r-list button:hover { background: var(--mint); }
.r-list .req button { background: #fdecec; color: #a32d2d; font-weight: 700; }
.thanks blockquote { margin: 24px auto; max-width: 520px; font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--olive); }

/* dock do chibi */
.dock { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 18px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; transition: transform .4s var(--ease); }
.dock-chibi { width: 176px; height: auto; aspect-ratio: 64/72; filter: drop-shadow(0 8px 0 rgba(38,48,15,.1)); }
.dock-bubble { max-width: 210px; margin-bottom: -4px; margin-right: 26px; font-size: 14.5px; }
.dock-bubble::after { right: 30px; bottom: -6px; }
.dock-bubble:empty { display: none; }
.dock-bubble.pop { animation: pop .4s var(--ease); }
.dock-bubble { transition: opacity .5s, transform .5s var(--ease); }
.dock-bubble.fade { opacity: 0; transform: translateY(6px); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
.dock-min { pointer-events: auto; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); cursor: pointer; font-weight: 800; color: var(--muted); }
.dock.min .dock-chibi, .dock.min .dock-bubble { display: none; }
.dock.min .dock-min { position: static; }

.f-loading { position: fixed; inset: 0; display: none; place-items: center; background: rgba(251,248,241,.6); z-index: 40; gap: 6px; grid-auto-flow: column; justify-content: center; align-content: center; }
.f-loading.on { display: grid; }
.f-loading span { width: 12px; height: 12px; background: var(--teal-2); border-radius: 3px; animation: hop .8s infinite; }
.f-loading span:nth-child(2) { animation-delay: .12s; } .f-loading span:nth-child(3) { animation-delay: .24s; }
@keyframes hop { 50% { transform: translateY(-12px); } }

@media (min-width: 1180px) {
  .dock { right: max(24px, calc((100vw - 760px) / 2 - 250px)); bottom: 40px; }
  .dock-chibi { width: 210px; }
}
@media (max-width: 720px) {
  .w-tips { grid-template-columns: 1fr; }
  .options { grid-template-columns: repeat(2, 1fr); }
  .options.plain { grid-template-columns: 1fr; }
  .scale { grid-template-columns: repeat(6, 1fr); }
  .q-kbd { display: none; }
  .f-main { padding-bottom: 210px; }
  .q-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: 0 -10px 30px -18px rgba(0,0,0,.3); }
  .q-nav .btn { flex: 1; }
  .dock { bottom: calc(78px + env(safe-area-inset-bottom)); right: 6px; }
  .dock-chibi { width: 84px; }
  .dock-bubble { font-size: 13px; max-width: 170px; margin-right: 10px; }
  .f-brand small { display: none; }
}
@media (max-width: 420px) {
  .grid2 { grid-template-columns: 1fr; }
  .code-box { width: 42px; height: 56px; font-size: 26px; }
  .code-boxes { gap: 5px; }
}
