:root { --navy: #2E3F5C; --navy2: #1f2c42; --ouro: #C8A14B; --cinza: #F4F6F8; --texto: #333; --suave: #6b7280; --verm: #c0392b; --verde: #1e874b; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--texto); background: var(--cinza); -webkit-text-size-adjust: 100%; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.barra { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.marca { color: #fff; text-decoration: none; font-size: 18px; }
.lmrx { font-weight: 800; letter-spacing: 2px; font-size: 13px; color: var(--ouro); }
main { max-width: 820px; margin: 0 auto; padding: 18px 14px 120px; }

/* ---------- Início ---------- */
.hero { text-align: center; padding: 18px 4px 6px; }
.hero h1 { color: var(--navy); font-size: 30px; line-height: 1.15; margin: 4px 0 8px; }
.hero p { color: var(--suave); margin: 0 auto 22px; max-width: 460px; }
.mic { width: 190px; height: 190px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 70px; box-shadow: 0 0 0 10px rgba(46,63,92,.12), 0 10px 26px rgba(0,0,0,.18); display: inline-flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.mic:active { transform: scale(.97); }
.mic-legenda { display: block; font-weight: 700; font-size: 20px; color: var(--navy); margin: 16px 0 4px; }
.mic-sub { color: var(--suave); font-size: 15px; }
.roteiro { background: #fff; border-radius: 14px; padding: 16px 18px; margin: 26px 0 14px; border-left: 4px solid var(--ouro); }
.roteiro h2 { font-size: 17px; margin: 0 0 8px; color: var(--navy); }
.roteiro ol { margin: 0; padding-left: 22px; }
.roteiro li { margin: 4px 0; }
.roteiro .ex { color: var(--suave); font-size: 15px; font-style: italic; margin: 10px 0 0; }
.link { background: none; border: 0; color: var(--navy); text-decoration: underline; padding: 8px; }
textarea { width: 100%; font: inherit; border: 1.5px solid #cfd6df; border-radius: 12px; padding: 12px; min-height: 130px; resize: vertical; background: #fff; }
.escrever { background: #fff; border-radius: 14px; padding: 14px; margin-top: 10px; }

.btn { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.cheio { background: var(--navy); color: #fff; }
.btn.ouro { background: var(--ouro); border-color: var(--ouro); color: #1d1d1d; }
.btn.vermelho { background: var(--verm); border-color: var(--verm); color: #fff; }
.btn.grande { font-size: 19px; padding: 16px 22px; width: 100%; }
.btn:disabled { opacity: .5; }

.privacidade { background: #fff; border-radius: 14px; padding: 12px 16px; font-size: 14px; color: var(--suave); margin-top: 14px; }
.privacidade label { display: flex; gap: 10px; align-items: flex-start; color: var(--texto); font-size: 15px; }
.privacidade input { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* ---------- Editor ---------- */
.acoes { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.1); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; z-index: 5; }
.acoes .btn { flex: 1; padding: 14px 6px; font-size: 16px; }
.perguntas { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 16px; border: 2px solid var(--ouro); }
.perguntas h2 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.perguntas ul { margin: 0 0 12px; padding-left: 20px; }
.perguntas li { margin: 6px 0; font-size: 17px; }
.perguntas .linha { display: flex; gap: 8px; margin-top: 8px; }
.perguntas textarea { min-height: 70px; }
.pronto { background: #e8f5ee; color: var(--verde); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.dica { font-size: 14px; color: var(--suave); margin: 0 0 12px; text-align: center; }

/* ---------- Folha do currículo ---------- */
.folha { background: #fff; color: #222; padding: 34px 36px; border-radius: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.08); font-family: Arial, Helvetica, sans-serif; font-size: 14.5px; line-height: 1.45; }
.folha h1 { font-size: 26px; color: var(--navy); margin: 0 0 4px; letter-spacing: .3px; }
.folha .contato { color: #444; font-size: 14px; }
.folha .contato .ci + .ci::before { content: " · "; color: #999; }
@media print { .folha .contato .ci:has(> :empty) { display: none; } .folha .contato .ci + .ci::before { content: ""; } .folha .contato .ci:not(:has(> :empty)) ~ .ci:not(:has(> :empty))::before { content: " · "; } }
.folha .topo { border-bottom: 3px solid var(--navy); padding-bottom: 10px; margin-bottom: 4px; }
.folha section { margin-top: 16px; position: relative; }
.folha h2 { font-size: 13.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--navy); margin: 0 0 6px; padding-bottom: 3px; border-bottom: 1.5px solid var(--ouro); }
.folha .item { margin: 0 0 10px; position: relative; padding-right: 28px; }
.folha .item .l1 { font-weight: 700; }
.folha .item .per { color: #555; font-size: 13.5px; }
.folha ul { margin: 3px 0 0; padding-left: 18px; }
.folha li { margin: 1px 0; }
.folha p { margin: 0; }
[contenteditable] { outline: none; border-radius: 3px; }
[contenteditable]:focus { background: #fff7e0; box-shadow: 0 0 0 2px #f1d58a; }
[contenteditable]:empty::before { content: attr(data-ph); color: #b3b9c2; font-style: italic; }
.x { position: absolute; right: 0; top: 0; border: 0; background: #f1f3f6; color: #888; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; line-height: 26px; padding: 0; }
.mais-li { border: 0; background: none; color: var(--navy); font-size: 13px; padding: 2px 0 0 18px; text-decoration: underline; }

/* ---------- Ocupado / toast ---------- */
.ocupado { position: fixed; inset: 0; background: rgba(20,28,42,.82); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.ocupado-caixa { background: #fff; border-radius: 18px; padding: 26px 22px; text-align: center; width: 100%; max-width: 360px; }
.ocupado-caixa p { font-size: 19px; font-weight: 700; color: var(--navy); margin: 14px 0 18px; }
.onda { display: flex; gap: 6px; justify-content: center; height: 46px; align-items: center; }
.onda i { width: 8px; height: 14px; background: var(--ouro); border-radius: 4px; animation: onda 1s infinite ease-in-out; }
.onda i:nth-child(2) { animation-delay: .1s } .onda i:nth-child(3) { animation-delay: .2s } .onda i:nth-child(4) { animation-delay: .3s } .onda i:nth-child(5) { animation-delay: .4s }
@keyframes onda { 0%,100% { height: 12px } 50% { height: 42px } }
.toast { position: fixed; left: 12px; right: 12px; bottom: 90px; margin: 0 auto; max-width: 480px; background: #222; color: #fff; padding: 12px 16px; border-radius: 12px; z-index: 30; text-align: center; font-size: 15px; }
.toast.erro { background: var(--verm); }

@media (max-width: 520px) {
  .folha { padding: 22px 18px; font-size: 14px; }
  .folha h1 { font-size: 22px; }
  .hero h1 { font-size: 26px; }
}

/* ---------- Impressão / PDF ---------- */
@page { size: A4; margin: 14mm 14mm; }
@media print {
  body { background: #fff; }
  .no-print, .barra, .acoes, .perguntas, .pronto, .dica, .x, .mais-li { display: none !important; }
  main { padding: 0; max-width: none; }
  .folha { box-shadow: none; padding: 0; border-radius: 0; font-size: 11pt; }
  .folha h1 { font-size: 20pt; }
  [contenteditable]:empty { display: none; }
  .folha .item { padding-right: 0; break-inside: avoid; }
  .folha h2 { break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
