/* ROTA de Story · identidade Radmick Souza
   Paleta: Marrom Profundo #3B2A20 · Terra #6B4A36 · Areia #C9B79C · Bege #E6D9C6 · Off-white #F6F1E8
   Tipografia: Poppins */

@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --marrom: #3B2A20; --terra: #6B4A36; --areia: #C9B79C; --bege: #E6D9C6; --offwhite: #F6F1E8;
  --card: #FFFFFF;
  --r: 18px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--offwhite); color: var(--marrom); font-family: var(--font); font-size: 15px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- barra superior escura ---------- */
.topbar { position: sticky; top: 0; z-index: 5; height: 54px; display: flex; align-items: center; gap: 6px;
  padding: 0 16px; background: var(--marrom); color: var(--offwhite); }
.brand { flex: 1; text-align: left; background: none; border: 0; padding: 0; color: var(--offwhite);
  font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.brand em { font-style: normal; font-weight: 300; color: var(--areia); }
.icon-btn { background: none; border: 0; color: var(--offwhite); padding: 6px; margin-left: -8px; display: grid; place-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(246,241,232,.35); background: transparent;
  color: var(--offwhite); font-size: 13px; font-weight: 600; }

main { max-width: 480px; margin: 0 auto; padding: 22px 18px 130px; }

/* ---------- hierarquia ---------- */
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--terra); margin: 0 0 6px; }
h1 { font-size: 25px; font-weight: 600; line-height: 1.2; letter-spacing: -.4px; margin: 0 0 8px; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
h3 { font-size: 18px; font-weight: 600; margin: 4px 0 6px; letter-spacing: -.2px; }
.sub { font-size: 13px; color: var(--terra); line-height: 1.5; margin: 0 0 18px; font-weight: 400; }
.muted { color: var(--terra); }

/* ---------- cartões ---------- */
.card { background: var(--card); border: 1px solid var(--bege); border-radius: var(--r); padding: 18px; margin: 0 0 12px;
  box-shadow: 0 1px 2px rgba(59,42,32,.04); }
.card.featured { border: 1.5px solid var(--marrom); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* números grandes (meta) */
.big { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; margin: 10px 0 2px; }
.big small { font-size: 15px; font-weight: 500; color: var(--terra); letter-spacing: 0; margin-left: 4px; }
.caption { font-size: 12px; color: var(--terra); margin: 0; }

.progress { height: 6px; background: var(--bege); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress i { display: block; height: 100%; background: var(--marrom); border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.marks { display: flex; justify-content: space-between; font-size: 10px; color: var(--areia); }
.marks b { color: var(--terra); font-weight: 600; }

.streak { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: 99px;
  background: var(--offwhite); font-size: 12px; font-weight: 500; }

/* ---------- botões ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border-radius: 99px;
  padding: 15px 20px; font-weight: 600; font-size: 15px; border: 1.5px solid var(--marrom); transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--marrom); color: var(--offwhite); }
.btn.secondary { background: transparent; color: var(--marrom); }
.btn.small { width: auto; padding: 9px 16px; font-size: 13px; }
.btn:disabled { opacity: .3; cursor: not-allowed; }
.btn + .btn { margin-top: 10px; }
.text-link { background: none; border: 0; padding: 10px 0; color: var(--terra); font-size: 13px; font-weight: 500; }

.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 14px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(246,241,232,0) 0, var(--offwhite) 28%); }
.bottom-bar .inner { max-width: 480px; margin: 0 auto; display: grid; justify-items: center; gap: 2px; }

/* ---------- perguntas ---------- */
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.stepper .bars { display: flex; gap: 4px; flex: 1; }
.stepper .bars i { flex: 1; height: 4px; background: var(--bege); border-radius: 99px; }
.stepper .bars i.done, .stepper .bars i.on { background: var(--marrom); }
.stepper span { font-size: 11px; font-weight: 600; color: var(--terra); letter-spacing: .4px; white-space: nowrap; }

textarea, input[type=text] { width: 100%; border: 1px solid var(--bege); border-radius: 14px; background: var(--card);
  padding: 15px; font-size: 16px; line-height: 1.5; outline: none; transition: border-color .15s; }
textarea { min-height: 130px; resize: vertical; }
textarea:focus, input[type=text]:focus { border-color: var(--marrom); }
textarea::placeholder, input::placeholder { color: var(--areia); }
.field-gap { margin-top: 12px; }

.options { display: grid; gap: 8px; }
.opt { display: flex; flex-direction: column; text-align: left; background: var(--card); border: 1px solid var(--bege);
  border-radius: 14px; padding: 14px 16px; font-size: 15px; font-weight: 500; }
.opt small { color: var(--terra); font-size: 12px; font-weight: 400; margin-top: 2px; }
.opt[aria-pressed=true] { border-color: var(--marrom); box-shadow: inset 0 0 0 1px var(--marrom); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--bege); background: var(--card); border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 500; }
.chip[aria-pressed=true] { background: var(--marrom); border-color: var(--marrom); color: var(--offwhite); }
.group-title { font-size: 10.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--terra); margin: 20px 0 8px; }
.interpret { font-size: 12px; color: var(--terra); margin: 8px 0 0; min-height: 18px; }
.interpret b { color: var(--marrom); }

.sell { margin-top: 16px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  background: var(--marrom); color: var(--offwhite); border: 0; border-radius: var(--r); padding: 16px 18px; }
.sell strong { display: block; font-size: 15px; font-weight: 600; }
.sell small { font-size: 12px; color: var(--areia); }
.sell .ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--areia); flex: none; }
.sell[aria-pressed=true] .ck { background: var(--offwhite); box-shadow: inset 0 0 0 5px var(--marrom); border-color: var(--offwhite); }

.ask { background: var(--marrom); color: var(--offwhite); border-radius: var(--r); padding: 18px; margin-bottom: 12px; }
.ask .q { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 4px 0 6px; }
.ask .ex { color: var(--areia); font-size: 12px; margin: 0; line-height: 1.5; }
.ask .eyebrow { color: var(--areia); }

/* ---------- ângulos / estruturas ---------- */
.tag { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--terra); }
.tag.strong { background: var(--marrom); color: var(--offwhite); padding: 4px 10px; border-radius: 99px; }
.kv { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.kv b { display: block; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--areia); font-weight: 600; }
.why { margin: 12px 0 0; padding: 10px 12px; background: var(--offwhite); border-radius: 12px; font-size: 12px; line-height: 1.5; }
.card .btn { margin-top: 16px; }

/* ---------- home ---------- */
.link-card { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; }
.link-card .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--offwhite); display: grid; place-items: center; font-size: 18px; flex: none; }
.link-card strong { display: block; font-size: 15px; font-weight: 600; }
.link-card small { font-size: 12px; color: var(--terra); }
.link-card .arrow { margin-left: auto; color: var(--terra); }
.medals { display: flex; justify-content: space-between; margin-top: 14px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 20%; text-align: center; font-size: 9.5px; line-height: 1.25; color: var(--terra); }
.medal .m { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  background: var(--offwhite); border: 1.5px dashed var(--areia); filter: grayscale(1); opacity: .55; }
.medal.on .m { background: var(--marrom); border: 2px solid var(--areia); filter: none; opacity: 1; }
.medal.on { color: var(--marrom); font-weight: 600; }

/* ---------- sequência ---------- */
.story { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 16px; }
.story .n { width: 36px; height: 36px; border-radius: 50%; background: var(--offwhite); color: var(--marrom);
  display: grid; place-items: center; font-weight: 800; font-size: 15px; transition: .2s; }
.story.done .n { background: var(--marrom); color: var(--offwhite); }
.story .main { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 2px 0 0; }
.story .chip-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.story .pill { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 99px; background: var(--offwhite); color: var(--terra); }
.story details { margin-top: 10px; }
.story summary { font-size: 12px; font-weight: 600; color: var(--terra); cursor: pointer; list-style: none; }
.story summary::-webkit-details-marker { display: none; }
.story summary::after { content: ' +'; }
.story details[open] summary::after { content: ' −'; }
.story .how { font-size: 12.5px; line-height: 1.55; color: var(--terra); margin: 8px 0 0; }
.story .how b { color: var(--marrom); font-weight: 600; }
.check { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bege); background: var(--card);
  border-radius: 99px; padding: 7px 14px 7px 8px; font-size: 12px; font-weight: 600; }
.check .box { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--areia); display: grid; place-items: center; font-size: 11px; color: transparent; }
.story.done .check { border-color: var(--marrom); }
.story.done .check .box { background: var(--marrom); border-color: var(--marrom); color: var(--offwhite); }

/* ---------- biblioteca ---------- */
.lib-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.lib-card .t { flex: 1; }
.lib-card strong { display: block; font-size: 15px; font-weight: 600; }
.lib-card span.d { display: block; color: var(--terra); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.lib-card .arrow { color: var(--areia); }
.beats { list-style: none; padding: 0; margin: 0; }
.beats li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--bege); font-weight: 500; }
.beats li:last-child { border-bottom: 0; }
.beats .n { width: 26px; height: 26px; border-radius: 50%; background: var(--offwhite); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }

.history { list-style: none; padding: 0; margin: 8px 0 0; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--bege); font-size: 13px; font-weight: 500; }
.history li:last-child { border-bottom: 0; }
.history small { display: block; color: var(--terra); font-size: 11px; font-weight: 400; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 9px; filter: blur(2px); opacity: .6; margin-top: 12px; }
.week div { background: var(--offwhite); border-radius: 8px; padding: 8px 0; }
.week b { display: block; font-size: 11px; }

/* ---------- comemoração ---------- */
.celebrate { position: fixed; inset: 0; z-index: 20; background: var(--marrom); color: var(--offwhite); display: grid; place-items: center;
  padding: 28px; text-align: center; overflow: hidden; animation: fadein .25s ease; }
.celebrate .inner { max-width: 360px; position: relative; z-index: 2; }
.celebrate .eyebrow { color: var(--areia); }
.celebrate h1 { font-size: 32px; font-weight: 800; margin: 6px 0 4px; }
.celebrate .big { color: var(--offwhite); }
.celebrate .big small, .celebrate .caption { color: var(--areia); }
.celebrate .progress { background: rgba(246,241,232,.15); }
.celebrate .progress i { background: var(--offwhite); }
.celebrate .badge { margin: 18px auto 0; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 99px;
  background: rgba(246,241,232,.1); font-size: 13px; font-weight: 600; animation: pop .5s .3s both cubic-bezier(.2,1.6,.4,1); }
.celebrate .badge .m { width: 34px; height: 34px; border-radius: 50%; background: var(--offwhite); display: grid; place-items: center; font-size: 17px; }
.celebrate .btn.primary { background: var(--offwhite); color: var(--marrom); border-color: var(--offwhite); margin-top: 26px; }
.trophy { font-size: 56px; animation: pop .6s both cubic-bezier(.2,1.6,.4,1); }
.confetti { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; z-index: 1; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadein { from { opacity: 0; } }

/* ---------- menu inferior ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; justify-content: space-around; align-items: flex-end;
  background: var(--card); border-top: 1px solid var(--bege); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.nav button { flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 500; color: var(--areia); padding: 4px 0; }
.nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav button.active { color: var(--marrom); font-weight: 600; }
.nav .create span { width: 48px; height: 48px; margin-top: -22px; border-radius: 50%; background: var(--marrom); color: var(--offwhite);
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(59,42,32,.28); border: 3px solid var(--offwhite); }
.nav .create.active span { background: var(--terra); }
body.has-nav main { padding-bottom: 150px; }
body.has-nav .bottom-bar { bottom: 62px; }

/* ---------- início: hoje ---------- */
.hero { font-size: 27px; line-height: 1.15; margin-bottom: 16px; }
.today-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fire { display: flex; align-items: center; gap: 10px; }
.fire .flame { font-size: 34px; filter: grayscale(1); opacity: .45; }
.fire.lit .flame { filter: none; opacity: 1; animation: pop .6s both cubic-bezier(.2,1.6,.4,1); }
.streak-n { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.fire .caption { max-width: 130px; margin-top: 2px; line-height: 1.35; }
.donut { position: relative; display: flex; flex-direction: column; align-items: center; }
.donut .pct { position: absolute; top: 25px; width: 76px; text-align: center; font-size: 17px; font-weight: 800; }
.donut .caption { font-size: 10.5px; margin-top: 4px; text-align: center; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bege); }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--areia); }
.wd i { font-style: normal; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--offwhite); color: var(--terra); font-size: 12px; font-weight: 600; }
.wd.today span { color: var(--marrom); }
.wd.today i { box-shadow: inset 0 0 0 1.5px var(--marrom); }
.wd.on i { background: var(--marrom); color: var(--offwhite); }
.reflex { background: var(--marrom); border-color: var(--marrom); color: var(--offwhite); margin-top: 16px; }
.reflex .eyebrow { color: var(--areia); }
.reflex .quote { font-size: 16px; font-weight: 500; line-height: 1.45; margin: 2px 0 0; }

/* ---------- minha marca ---------- */
.mini { display: block; font-size: 11px; font-weight: 600; color: var(--terra); margin: 12px 0 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.sw { position: relative; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--bege); padding: 0; }
.sw small { position: absolute; top: 52px; left: -6px; width: 60px; text-align: center; font-size: 9px; color: var(--terra); }
.swatches:has(.sw small) { margin-bottom: 16px; }
.sw.add { display: grid; place-items: center; background: var(--offwhite); font-size: 20px; color: var(--terra); cursor: pointer; border-style: dashed; border-color: var(--areia); }
.sw.add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row input { flex: 1; padding: 11px 14px; font-size: 14px; }
.mood { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bege); font-size: 13px; }
.mood:last-child { border-bottom: 0; }
.mood b { font-weight: 600; }
.mood span { color: var(--terra); font-size: 12px; text-align: right; }
.tips { list-style: none; padding: 0; margin: 12px 0 0; }
.tips li { position: relative; padding: 9px 0 9px 22px; font-size: 13.5px; line-height: 1.45; border-bottom: 1px solid var(--bege); }
.tips li:last-child { border-bottom: 0; }
.tips li::before { content: '✓'; position: absolute; left: 0; color: var(--terra); font-weight: 700; }
.history li.row { display: flex; justify-content: space-between; align-items: center; }

/* ---------- conta, progresso e painel ---------- */
.notice { margin-top: 18px; border: 1px solid var(--bege); border-radius: 14px; padding: 14px 16px; background: var(--card); font-size: 12.5px; line-height: 1.5; }
.notice ul { margin: 4px 0 8px; padding-left: 18px; }
.notice p { margin: 0; color: var(--terra); }
.code-input { font-size: 30px !important; font-weight: 800; letter-spacing: 12px; text-align: center; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 14px; margin: 0 0 10px; }
.stat .big { font-size: 32px; margin: 6px 0 2px; }
.stat-row.three .big { font-size: 26px; }
.seq-title { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 6px 0 0; }
.seq-item .chip-line, .story .chip-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 99px; background: var(--offwhite); color: var(--terra); }
.pill.ok { background: var(--marrom); color: var(--offwhite); }
.seq-actions { display: flex; gap: 8px; margin-top: 14px; }
.seq-actions .btn { margin: 0; }
.pubtoggle { border: 1.5px solid var(--marrom); background: transparent; color: var(--marrom); border-radius: 99px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; }
.pubtoggle.on { background: var(--marrom); color: var(--offwhite); }
.pubtoggle:disabled { opacity: .5; }
.adm-nums { display: flex; gap: 18px; font-size: 13px; color: var(--terra); }
.adm-nums b { color: var(--marrom); font-size: 18px; font-weight: 800; margin-right: 3px; }

.btn.google { background: var(--card); color: var(--marrom); border: 1.5px solid var(--bege); box-shadow: 0 1px 3px rgba(59,42,32,.12); }
.demo-box { border: 1.5px dashed var(--areia); border-radius: 14px; padding: 14px 16px; background: var(--card); font-size: 13px; }
.demo-box p { margin: 0 0 12px; line-height: 1.5; color: var(--terra); }
.demo-box .btn { padding: 12px 16px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translate(-50%, 12px); background: var(--marrom); color: var(--offwhite);
  padding: 10px 18px; border-radius: 99px; opacity: 0; transition: .2s; pointer-events: none; z-index: 30; font-size: 13px; font-weight: 500; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
