:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-2: #fff1e8;
  --text: #1f1b18;
  --muted: #73675e;
  --primary: #ff6b35;
  --primary-dark: #d94d1a;
  --secondary: #18212f;
  --success: #2f9e61;
  --warning: #d67b00;
  --danger: #c83e3e;
  --line: #eadfd7;
  --shadow: 0 16px 40px rgba(66, 44, 28, 0.10);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
body { padding-bottom: env(safe-area-inset-bottom); }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: rgba(255,248,242,0.94); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(234,223,215,0.8); }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); text-align: left; padding: 0; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--primary); color: white; font-weight: 900; box-shadow: 0 8px 20px rgba(255,107,53,.24); }
.brand strong { display: block; font-size: 14px; letter-spacing: .04em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.avatar-btn, .ghost-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; font-weight: 800; }
.ghost-btn { padding: 9px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.view { width: min(100%, 860px); margin: 0 auto; padding: 18px 16px 110px; }
.hidden { display: none !important; }
.hero { background: linear-gradient(145deg, #ff6b35, #ff8f5f); color: #fff; border-radius: 28px; padding: 26px 22px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.12); right: -60px; top: -55px; }
.hero h1 { margin: 0; font-size: clamp(30px, 9vw, 52px); line-height: .96; letter-spacing: -.04em; max-width: 620px; }
.hero p { max-width: 560px; margin: 14px 0 0; color: rgba(255,255,255,.92); line-height: 1.55; }
.hero .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn { border: 0; border-radius: 15px; padding: 13px 16px; font-weight: 800; transition: transform .15s ease, opacity .15s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--secondary); color: white; }
.btn-light { background: white; color: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-success { background: var(--success); color: white; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 24px 2px 10px; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 26px rgba(66,44,28,.055); }
.card-click { width: 100%; text-align: left; color: inherit; }
.stat { display: flex; align-items: center; gap: 12px; }
.stat .icon { font-size: 24px; }
.stat strong { display: block; font-size: 20px; }
.stat small { color: var(--muted); }
.daily-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.daily-head h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.daily-head p { margin: 4px 0 0; color: var(--muted); }
.streak { background: #fff0e7; border: 1px solid #ffd3bd; color: #a63d0b; border-radius: 14px; padding: 9px 11px; font-weight: 900; white-space: nowrap; }
.progress-track { height: 9px; border-radius: 999px; background: #efe6df; overflow: hidden; margin-top: 14px; }
.progress-bar { height: 100%; background: var(--primary); border-radius: inherit; transition: width .4s ease; }
.task-list { display: grid; gap: 10px; }
.task { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.task.done { opacity: .72; background: #f2faf5; border-color: #cbe7d5; }
.task .task-icon { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; font-size: 23px; }
.task .task-main { min-width: 0; flex: 1; }
.task .task-main strong { display: block; }
.task .task-main small { display: block; margin-top: 3px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #d6c8bd; background: white; font-weight: 900; color: var(--success); }
.task.done .check-btn { border-color: var(--success); background: var(--success); color: white; }
.form-card { max-width: 720px; margin: 0 auto; }
.stepper { display: flex; gap: 7px; margin: 10px 0 18px; }
.stepper i { height: 6px; flex: 1; background: #eadfd7; border-radius: 999px; }
.stepper i.active { background: var(--primary); }
.form-group { margin: 14px 0; }
.form-group label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: white; color: var(--text); outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,.10); }
.choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.choice { border: 1px solid var(--line); background: white; border-radius: 18px; padding: 16px 14px; text-align: left; }
.choice.selected { border: 2px solid var(--primary); background: #fff4ee; }
.choice strong { display: block; }
.choice small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.notice { border-radius: 16px; padding: 13px 14px; background: #fff5d9; border: 1px solid #f3d786; color: #6f5203; line-height: 1.45; font-size: 13px; }
.notice.danger { background: #fff0f0; border-color: #efc1c1; color: #873333; }
.plan-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; }
.recipe-card, .exercise-card { overflow: hidden; padding: 0; }
.recipe-card img, .exercise-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #f5eee8; }
.recipe-card .inner, .exercise-card .inner { padding: 15px; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; margin: 9px 0; }
.badge { border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 800; background: #f4ede8; color: #5e5047; }
.badge.hot { background: #fff0e8; color: #b24310; }
.badge.good { background: #e9f7ef; color: #267749; }
.details { margin: 12px 0 0; padding-left: 18px; color: #51473f; line-height: 1.55; }
.details li + li { margin-top: 5px; }
.exercise-row { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.exercise-row:last-child { border-bottom: 0; }
.exercise-row img { width: 112px; height: 86px; object-fit: contain; border-radius: 16px; background: #fff7f2; border: 1px solid var(--line); padding: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.exercise-row strong { display: block; }
.exercise-row small { color: var(--muted); display: block; margin-top: 3px; }
.exercise-toggle { border: 1px solid var(--line); background: white; width: 36px; height: 36px; border-radius: 50%; }
.exercise-toggle.done { background: var(--success); color: white; border-color: var(--success); }
.mascot { display: grid; grid-template-columns: 74px 1fr; gap: 13px; align-items: center; background: #1c2533; color: white; border-radius: 24px; padding: 16px; }
.mascot-emoji { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 20px; background: #ff6b35; font-size: 38px; transform: rotate(-3deg); }
.mascot p { margin: 3px 0 0; color: #d9e0e7; line-height: 1.45; }
.achievement { display: flex; gap: 12px; align-items: center; }
.achievement .medal { width: 54px; height: 54px; flex: 0 0 54px; display: grid; place-items: center; border-radius: 16px; background: #fff1cc; font-size: 28px; }
.achievement.locked { opacity: .45; filter: grayscale(.65); }
.chart { display: flex; gap: 6px; align-items: flex-end; height: 130px; padding-top: 12px; }
.chart span { flex: 1; min-width: 12px; border-radius: 8px 8px 3px 3px; background: var(--primary); opacity: .86; position: relative; }
.chart span::after { content: attr(data-label); position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 10px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price strong { font-size: 30px; }
.plan-card.recommended { border: 2px solid var(--primary); position: relative; }
.plan-card.recommended::before { content: "MAIS ESCOLHIDO"; position: absolute; top: -10px; right: 14px; background: var(--primary); color: white; font-size: 9px; letter-spacing: .08em; padding: 5px 8px; border-radius: 999px; font-weight: 900; }
.bottom-nav { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 25; width: min(calc(100% - 18px), 660px); display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 22px; padding: 8px; box-shadow: 0 16px 50px rgba(40,28,20,.16); backdrop-filter: blur(18px); }
.bottom-nav button { border: 0; background: transparent; border-radius: 14px; padding: 8px 4px; color: var(--muted); }
.bottom-nav button span { display: block; font-size: 20px; }
.bottom-nav button small { display: block; margin-top: 2px; font-size: 10px; font-weight: 800; }
.bottom-nav button.active { background: #fff0e7; color: var(--primary-dark); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 95px; transform: translate(-50%, 20px); background: #18212f; color: white; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; max-width: calc(100% - 32px); text-align: center; font-weight: 700; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.divider { border: 0; height: 1px; background: var(--line); margin: 16px 0; }
.small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.kicker { color: var(--primary-dark); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 640px) {
  .view { padding-left: 12px; padding-right: 12px; }
  .grid-2, .choice-grid, .plan-hero { grid-template-columns: 1fr; }
  .hero { padding: 24px 18px; }
  .exercise-row { grid-template-columns: 94px 1fr auto; }
  .exercise-row img { width: 94px; height: 74px; }
}

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(24,33,47,.46); }
.modal-panel { position: relative; width: min(100%, 520px); max-height: min(90vh, 760px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(30,20,12,.24); padding: 18px; }
.modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-top h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.05; }
.modal-body { margin-top: 14px; color: #51473f; line-height: 1.5; }
.modal-body ol { margin: 8px 0 0; padding-left: 22px; }
.modal-body li + li { margin-top: 6px; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.icon-btn { border: 1px solid var(--line); background: white; width: 38px; height: 38px; border-radius: 14px; font-size: 18px; }
.info-card { border-radius: 16px; border: 1px solid var(--line); background: #fff8f2; padding: 12px; margin-top: 12px; }

.modal-panel-wide { width: min(100%, 980px); }
.exercise-thumb-btn { border: 0; background: transparent; padding: 0; width: 112px; text-align: left; }
.exercise-thumb-btn img { width: 112px; height: 86px; object-fit: cover; border-radius: 16px; background: #fff7f2; border: 1px solid var(--line); display: block; }
.zoom-hint { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11px; font-weight: 800; color: var(--primary-dark); background: #fff2ea; border: 1px solid #ffd8c7; border-radius: 999px; padding: 4px 8px; }
.viewer-image { width: 100%; border-radius: 18px; border: 1px solid var(--line); display: block; background: #fff7f2; }
.ai-panel { margin-top: 14px; background: linear-gradient(135deg, #18212f 0%, #28354a 100%); color: white; border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.ai-panel .kicker { color: #ffd9cb; }
.ai-panel p { margin: 6px 0 0; color: #e5edf5; line-height: 1.5; }
.ai-bullets { display: grid; gap: 8px; margin-top: 12px; }
.ai-bullets span { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #f2f6fb; }
.trust-grid { display: grid; gap: 12px; margin-top: 14px; }
.trust-card { border-radius: 18px; border: 1px solid var(--line); background: #fffdfb; padding: 14px; }
.trust-card strong { display: block; margin-bottom: 4px; }
@media (max-width: 640px) {
  .exercise-thumb-btn, .exercise-thumb-btn img { width: 94px; }
  .exercise-thumb-btn img { height: 74px; }
}
