/* ============================================================
   WeNeedIA Prompts · Estilos
   Mesma família visual do Manual Claude PRO (tokens de cor, cartões,
   selos, fluxos e medalhas). Fontes da marca: Poppins e Inter.
   ============================================================ */

/* ===== TOKENS ===== */
:root {
  --violet: #7C3AED;
  --violet-light: #8B5CF6;
  --violet-soft: #C4B5FD;
  --violet-deep: #4C1D95;
  --violet-glow: rgba(124,58,237,0.18);
  --gold: #FBBF24;
  --green: #22C55E;

  --bg: #F8FAFC;
  --bg-elev: #FFFFFF;
  --bg-soft: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-hover: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0A0A0F;
  --text-soft: #475569;
  --text-mute: #64748B;
  --accent-text: #6D28D9;
  --gold-text: #B45309;
  --green-text: #15803D;
  --shadow-md: 0 4px 16px rgba(15,23,42,0.09);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.13);
  --shadow-violet: 0 8px 30px rgba(124,58,237,0.22);
  --page-bg: radial-gradient(circle at 88% 0%, rgba(139,92,246,0.10), transparent 40%), radial-gradient(circle at 0% 100%, rgba(167,139,250,0.07), transparent 40%), var(--bg);
  --topbar-bg: rgba(248,250,252,0.92);
  --code-bg: #F1F5F9;
  --code-text: #0A0A0F;
  --font-title: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(.32,.72,0,1);
}
[data-theme="dark"] {
  --bg: #09090F;
  --bg-elev: #0F0F1A;
  --bg-soft: #13131F;
  --bg-card: #0F0F1A;
  --bg-hover: #1A1A2A;
  --border: #1E1E30;
  --border-strong: #2A2A40;
  --text: #F1F5F9;
  --text-soft: #A3B0C2;
  --text-mute: #8391A7;
  --accent-text: #C4B5FD;
  --gold-text: #FBBF24;
  --green-text: #4ADE80;
  --shadow-md: 0 4px 16px rgba(0,0,0,0.55);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.65);
  --shadow-violet: 0 8px 30px rgba(124,58,237,0.38);
  --page-bg: radial-gradient(circle at 88% 0%, rgba(139,92,246,0.16), transparent 42%), radial-gradient(circle at 0% 100%, rgba(76,29,149,0.14), transparent 42%), var(--bg);
  --topbar-bg: rgba(9,9,15,0.9);
  --code-bg: #13131F;
  --code-text: #DDD6FE;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--page-bg); background-repeat: no-repeat; color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3, .display { font-family: var(--font-title); letter-spacing: -.02em; line-height: 1.2; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--violet-light); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--violet); color: #fff; padding: .6rem 1rem; border-radius: 10px; }
.skip-link:focus { left: 12px; }
.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }
body.modal-open { overflow: hidden; }

/* ===== BOTÕES ===== */
.btn-primary, .btn-secondary, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.3rem; border-radius: 12px; font-weight: 700; font-size: .92rem; line-height: 1.2; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; text-decoration: none !important; cursor: pointer; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: var(--shadow-violet); }
.btn-primary:hover { background: #6D28D9; transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); }
.btn-primary.success { background: #16A34A; box-shadow: 0 8px 24px rgba(22,163,74,.3); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--violet); }
.btn-secondary.success { border-color: #16A34A; color: var(--green-text); }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-hover); }
.btn-sm { padding: .5rem .85rem; font-size: .82rem; border-radius: 10px; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--text-soft); background: var(--bg-card); transition: color .2s, border-color .2s; }
.btn-icon:hover { color: var(--gold); border-color: var(--gold); }
.btn-icon.active { color: var(--gold); border-color: var(--gold); background: rgba(251,191,36,.08); }
.btn-icon-sm { width: 36px; height: 36px; border-radius: 10px; }
.btn-icon[data-lib-win].active { color: var(--green); border-color: var(--green); background: rgba(34,197,94,.08); }
.btn-icon:disabled { cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: var(--text-soft); border: 1px solid var(--border); background: var(--bg-card); }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* ===== ENTRADA ===== */
.access-page { min-height: 100vh; padding: 24px clamp(16px, 4vw, 48px) 48px; display: flex; flex-direction: column; }
.access-header { display: flex; justify-content: space-between; align-items: center; max-width: 1120px; width: 100%; margin: 0 auto; }
.brand-mini { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-title); font-weight: 700; }
.brand-mini img { border-radius: 9px; }
.access-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; max-width: 1120px; width: 100%; margin: 0 auto; padding-top: 40px; }
.access-copy h1 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.08; margin: 1rem 0 1.6rem; text-wrap: balance; }
.access-copy h1 span, .display span { background: linear-gradient(120deg, var(--violet-light), var(--violet-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .access-copy h1 span, [data-theme="light"] .display span { background: linear-gradient(120deg, var(--violet), var(--violet-deep)); -webkit-background-clip: text; background-clip: text; }
.access-credit { color: var(--text-soft); font-size: .95rem; margin-top: 1.2rem; max-width: 46ch; }
.access-card { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 22px; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow-lg); }
.access-card h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.access-card > p { color: var(--text-soft); font-size: .92rem; margin-bottom: 1.3rem; }
.access-input { display: flex; gap: .5rem; margin: .4rem 0 .3rem; }
.access-input input { flex: 1; min-width: 0; }
.access-input button { padding: 0 .9rem; border-radius: 12px; border: 1px solid var(--border-strong); font-size: .85rem; font-weight: 600; color: var(--text-soft); }
.access-help { font-size: .82rem; color: var(--text-mute); margin-top: 1rem; }

/* ===== TOPO E NAVEGAÇÃO ===== */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: .7rem clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 1.2rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none !important; margin-right: auto; min-width: 0; }
.brand img { border-radius: 10px; flex-shrink: 0; }
.brand strong { display: block; font-family: var(--font-title); font-size: 1rem; line-height: 1.15; white-space: nowrap; }
.brand small { display: block; font-size: .7rem; color: var(--text-mute); white-space: nowrap; }
.topnav { display: flex; gap: .2rem; }
.topnav a { padding: .5rem .85rem; border-radius: 10px; color: var(--text-soft); font-weight: 600; font-size: .88rem; text-decoration: none; }
.topnav a:hover { color: var(--text); background: var(--bg-hover); }
.topnav a.active { color: var(--text); background: var(--violet-glow); }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.points-pill { display: inline-flex; align-items: baseline; gap: .3rem; padding: .45rem .8rem; border-radius: 99px; border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.08); color: var(--text); text-decoration: none !important; font-size: .85rem; }
.points-pill b { font-family: var(--font-title); }
.points-pill small { color: var(--text-mute); font-size: .7rem; }
.bottomnav { display: none; }

/* ===== ESTRUTURA ===== */
.main { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 32px) 48px; outline: none; }
.view { animation: fade-in .35s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eyebrow, .kicker { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.display { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; margin: .7rem 0 .9rem; }
.lead { font-size: 1.05rem; color: var(--text-soft); max-width: 52ch; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .8rem 1.5rem; margin: 2.2rem 0 1rem; }
.section-head h2, .section-title { font-size: 1.3rem; }
.section-title { margin: 2.4rem 0 1rem; }
.hint-line { font-size: .88rem; color: var(--text-soft); margin: -.6rem 0 1.4rem; }

/* ===== INÍCIO ===== */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.score-card { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 1.4rem; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--bg-card); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s; }
.score-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.score-ring-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.score-ring { width: 84px; height: 84px; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 7; }
.ring-bg { stroke: var(--bg-soft); }
.ring-fg { stroke: var(--violet-light); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.score-ring-wrap > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 800; }
.score-stats { display: grid; gap: .55rem; }
.score-stats strong { display: block; font-family: var(--font-title); font-size: 1.3rem; line-height: 1; }
.score-stats small { font-size: .66rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.continue-card { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; padding: 1rem 1.2rem; border-radius: 16px; border: 1px solid rgba(124,58,237,.35); background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(124,58,237,.03)); color: var(--text); text-decoration: none !important; transition: transform .2s, border-color .2s; }
.continue-card:hover { transform: translateY(-2px); border-color: var(--violet); }
.continue-icon { font-size: 1.4rem; }
.continue-card small { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); }
.continue-card strong { font-size: .98rem; }
.continue-go { margin-left: auto; font-size: 1.3rem; color: var(--accent-text); }
.area-select { display: flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 700; color: var(--text-soft); }
.area-select select { padding: .55rem 2rem .55rem .8rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text); font-size: .88rem; max-width: 68vw; }
.goal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.goal-card { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.3rem; border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(165deg, rgba(124,58,237,.10), transparent 55%), var(--bg-card); color: var(--text); text-decoration: none !important; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; min-height: 190px; }
.goal-card:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 14px 30px var(--violet-glow); }
.goal-icon { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: var(--bg-soft); border: 1px solid rgba(124,58,237,.3); font-size: 1.6rem; margin-bottom: .5rem; }
.goal-card strong { font-family: var(--font-title); font-size: 1.12rem; line-height: 1.25; }
.goal-card small { font-size: .84rem; color: var(--text-soft); line-height: 1.5; }
.goal-foot { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; margin-top: auto; padding-top: .8rem; font-size: .75rem; font-weight: 700; color: var(--text-mute); }
.goal-used { display: inline-flex; align-items: center; gap: .25rem; color: var(--green-text); }
.goal-imagem, .goal-video { background: linear-gradient(165deg, rgba(251,191,36,.10), rgba(124,58,237,.08) 45%, transparent 75%), var(--bg-card); }
.home-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 1rem; }

/* ===== FLUXO E EQUAÇÃO (iguais ao Manual) ===== */
.ui-flow { display: flex; align-items: stretch; gap: .4rem; margin: .4rem 0 1.4rem; }
.ui-flow-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 1rem .7rem; border-radius: 14px; border: 1px solid var(--border); background: linear-gradient(170deg, rgba(124,58,237,.12), transparent 70%), var(--bg-soft); }
.ui-flow-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--bg-card); border: 1px solid rgba(124,58,237,.35); font-size: 1.3rem; margin-bottom: .2rem; }
.ui-flow-step strong { font-size: .84rem; line-height: 1.3; }
.ui-flow-step small { font-size: .72rem; color: var(--text-soft); line-height: 1.4; }
.ui-flow-arrow { align-self: center; color: var(--violet-light); font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.ui-flow-sm { max-width: 560px; }
.ui-eq { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .4rem 0 1.4rem; padding: 1.1rem; border-radius: 16px; border: 1px dashed rgba(124,58,237,.45); background: rgba(124,58,237,.05); }
.ui-eq-part { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .85rem; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-card); font-size: .85rem; font-weight: 700; }
.ui-eq-part > span { font-size: 1.1rem; }
.ui-eq-part.result { border-color: var(--violet); background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff; box-shadow: 0 8px 22px var(--violet-glow); }
.ui-eq-op { font-size: 1.2rem; font-weight: 800; color: var(--violet-light); }

/* ===== CARTÕES DE APOIO ===== */
.install-card { position: relative; display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 2.8rem 1.1rem 1.1rem; margin: 1.6rem 0; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--bg-card); }
.install-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--violet-glow); font-size: 1.3rem; flex-shrink: 0; }
.install-copy strong { display: block; margin-bottom: .3rem; }
.install-copy p { font-size: .86rem; color: var(--text-soft); margin-bottom: .7rem; }
.install-steps { padding-left: 1.1rem; font-size: .86rem; color: var(--text-soft); line-height: 1.8; }
.install-steps strong { display: inline; margin: 0; color: var(--text); }
.ios-share { display: inline-block; padding: 0 .35rem; border: 1px solid var(--border-strong); border-radius: 5px; font-size: .78rem; }
.install-close { position: absolute; top: .6rem; right: .7rem; width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; color: var(--text-mute); }
.install-close:hover { background: var(--bg-hover); color: var(--text); }
.manual-card { display: flex; gap: 1rem; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s; margin: 1.4rem 0; }
.home-duo .manual-card { margin: 0; }
.manual-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.manual-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--violet-glow); font-size: 1.35rem; flex-shrink: 0; }
.manual-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.manual-body small { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); }
.manual-body strong { font-family: var(--font-title); font-size: 1rem; }
.manual-body > span:not(.manual-foot) { font-size: .86rem; color: var(--text-soft); line-height: 1.55; }
.manual-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.manual-foot em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--accent-text); }
.plan-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 99px; font-size: .68rem; font-weight: 700; border: 1px solid transparent; }
.plan-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.plan-chip.ok { color: var(--green-text); background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); }
.plan-chip.mixed { color: #0369A1; background: rgba(56,189,248,.1); border-color: rgba(56,189,248,.25); }
[data-theme="dark"] .plan-chip.mixed { color: #38BDF8; }
.plan-chip.pro { color: var(--gold-text); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.28); }
.club-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; padding: 1.5rem; margin: 1.6rem 0 .5rem; border-radius: 22px; border: 1px solid rgba(124,58,237,.35); background: radial-gradient(circle at 92% 8%, rgba(139,92,246,.28), transparent 55%), var(--bg-card); }
.club-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--violet); flex-shrink: 0; }
.club-card-copy { flex: 1 1 300px; }
.club-card h3 { font-size: 1.15rem; margin: .3rem 0 .4rem; }
.club-card p { font-size: .88rem; color: var(--text-soft); max-width: 62ch; }
.club-btn { white-space: nowrap; }

/* ===== OBJETIVO ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; color: var(--text-mute); margin-bottom: 1.2rem; }
.crumbs a { color: var(--text-soft); font-weight: 600; }
.page-hero { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.6rem; }
.page-icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(160deg, rgba(124,58,237,.22), rgba(124,58,237,.05)); border: 1px solid rgba(124,58,237,.35); font-size: 1.9rem; flex-shrink: 0; }
.page-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; letter-spacing: -.035em; }
.page-hero p { color: var(--text-soft); margin-top: .25rem; max-width: 60ch; }
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.3rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .95rem; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-soft); font-size: .84rem; font-weight: 600; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: var(--violet-light); color: var(--text); }
.chip.active { border-color: var(--violet); background: var(--violet); color: #fff; }
.chip-sm { padding: .3rem .7rem; font-size: .76rem; }
.chip-row-sm { margin: .55rem 0 0; }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.task-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); text-decoration: none !important; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.task-card:hover { transform: translateY(-2px); border-color: var(--violet); box-shadow: 0 10px 26px var(--violet-glow); }
.task-card strong { font-family: var(--font-title); font-size: 1.02rem; line-height: 1.3; }
.task-card small { font-size: .85rem; color: var(--text-soft); line-height: 1.5; }
.task-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.task-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.kind-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border); }
.kind-badge.kind-image { color: var(--gold-text); border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08); }
.kind-badge.kind-video { color: var(--accent-text); border-color: rgba(124,58,237,.35); background: rgba(124,58,237,.08); }
.used-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 800; color: var(--green-text); }
.tool-chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.tool-chip { display: inline-block; padding: .18rem .55rem; border-radius: 7px; background: var(--bg-soft); border: 1px solid var(--border); font-size: .7rem; font-weight: 700; color: var(--text-soft); }
.area-tag { font-size: .72rem; color: var(--text-mute); font-weight: 600; }

/* ===== TAREFA ===== */
.stepper { display: flex; list-style: none; gap: .4rem; margin-bottom: 1.6rem; }
.stepper li { flex: 1; display: flex; align-items: center; gap: .55rem; font-size: .82rem; font-weight: 700; color: var(--text-mute); }
.stepper li:last-child { flex: 0 0 auto; }
.stepper li a { display: flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; }
.stepper li::after { content: ""; flex: 1; height: 2px; margin-left: .55rem; border-radius: 2px; background: var(--border-strong); }
.stepper li:last-child::after { display: none; }
.stepper-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--bg-soft); font-size: .78rem; flex-shrink: 0; }
.stepper li.current { color: var(--text); }
.stepper li.current .stepper-num { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 0 0 4px var(--violet-glow); }
.stepper li.done, .stepper li.done a { color: var(--text-soft); }
.stepper li.done .stepper-num { background: rgba(34,197,94,.12); border-color: var(--green); color: var(--green-text); }
.stepper li.done::after { background: var(--green); }
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 2rem; align-items: start; }
.task-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.035em; margin: .7rem 0 .3rem; }
.task-head p { color: var(--text-soft); }
.tool-pick { margin: 1.4rem 0 1rem; padding: 1rem; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--border); }
.tool-options { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.tool-option { display: inline-flex; flex-direction: column; align-items: flex-start; padding: .6rem 1rem; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--bg-card); font-weight: 700; font-size: .9rem; color: var(--text); min-width: 120px; transition: border-color .15s, box-shadow .15s; }
.tool-option small { font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.tool-option:hover { border-color: var(--violet-light); }
.tool-option.active { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-glow); background: linear-gradient(160deg, rgba(124,58,237,.12), transparent), var(--bg-card); }
.form-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.details-form { display: flex; flex-direction: column; gap: 1.1rem; }
.field-group { border: 0; display: flex; flex-direction: column; min-width: 0; }
.field-label, legend.field-label { display: block; font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: .45rem; padding: 0; }
.optional { font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--text-mute); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: .05rem .4rem; margin-left: .3rem; vertical-align: middle; }
.form-label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .3rem; }
.field-input { width: 100%; padding: .8rem .95rem; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text); line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
textarea.field-input { resize: vertical; min-height: 88px; }
.field-input::placeholder { color: var(--text-mute); opacity: .85; }
.field-input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-glow); }
.field-input[aria-invalid="true"] { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
.field-group.invalid .chip-row { outline: 2px solid rgba(239,68,68,.5); outline-offset: 4px; border-radius: 12px; }
.field-group .chip-row { margin-bottom: 0; }
.privacy-line { font-size: .78rem; color: var(--text-mute); margin-top: 1rem; }
.validation-message { min-height: 1.2rem; font-size: .84rem; font-weight: 600; color: #EF4444; margin: .4rem 0; }
[data-theme="dark"] .validation-message { color: #F87171; }
.sticky-cta { margin-top: .4rem; }
.preview-box { position: sticky; top: 90px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--bg-card); overflow: hidden; }
.preview-box summary { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .9rem 1.1rem; cursor: pointer; list-style: none; font-family: var(--font-title); font-weight: 700; border-bottom: 1px solid var(--border); }
.preview-box summary::-webkit-details-marker { display: none; }
.preview-box summary span::before { content: "👁️ "; }
.preview-box summary small { font-family: var(--font-body); font-size: .72rem; color: var(--text-mute); font-weight: 600; }
.preview-body { padding: 1rem; }
.preview-text { max-height: 58vh; font-size: .8rem; }
.preview-note { font-size: .74rem; color: var(--text-mute); margin-top: .6rem; }

/* ===== PROMPT (texto com rolagem visível) ===== */
.prompt-text { display: block; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; font-family: 'Inter', ui-monospace, Menlo, monospace; font-size: .86rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--violet) var(--bg-soft); }
.prompt-text::-webkit-scrollbar { width: 8px; }
.prompt-text::-webkit-scrollbar-track { background: var(--bg-soft); border-radius: 99px; }
.prompt-text::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 99px; }
.prompt-text.has-more { border-color: rgba(124,58,237,.45); }
.scroll-hint { font-size: .74rem; font-weight: 700; color: var(--accent-text); margin: .45rem 0 0 .2rem; }

/* ===== RESULTADO ===== */
.result-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.result-badge { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 20px; font-size: 1.9rem; background: linear-gradient(135deg, var(--violet-light), var(--violet-deep)); box-shadow: var(--shadow-violet); flex-shrink: 0; }
.result-hero h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.035em; margin-top: .2rem; }
.guidance { font-size: .9rem; color: var(--text-soft); margin: -.4rem 0 1.2rem; max-width: 80ch; }
.tool-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: 1.2rem; font-size: .84rem; color: var(--text-soft); font-weight: 600; }
.tool-switch > span { margin-right: .3rem; }
.note-banner { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: 14px; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); margin-bottom: 1.2rem; font-size: .88rem; color: var(--text-soft); }
.note-banner strong { color: var(--text); }
.parts-note { font-size: .9rem; font-weight: 600; margin-bottom: .8rem; }
.prompt-list { display: flex; flex-direction: column; gap: 1rem; }
.prompt-card { border-radius: 18px; border: 1px solid var(--border-strong); background: var(--bg-card); padding: 1rem; box-shadow: var(--shadow-md); }
.prompt-card-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.prompt-label { display: block; font-family: var(--font-title); font-weight: 700; font-size: .95rem; }
.prompt-meta { display: block; font-size: .72rem; color: var(--text-mute); }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0; }
.win-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: 18px; border: 1px solid rgba(34,197,94,.35); background: linear-gradient(135deg, rgba(34,197,94,.10), transparent 70%), var(--bg-card); margin-bottom: 1.6rem; }
.win-box strong { font-family: var(--font-title); }
.win-box p { font-size: .84rem; color: var(--text-soft); }
.btn-win { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.2rem; border-radius: 12px; background: #16A34A; color: #fff; font-weight: 800; font-size: .9rem; box-shadow: 0 8px 22px rgba(22,163,74,.28); transition: transform .2s; }
.btn-win:hover { transform: translateY(-1px); }
.btn-win:disabled { background: transparent; color: var(--green-text); border: 1px solid var(--green); box-shadow: none; cursor: default; transform: none; }
.why-box, .tips-box, .points-box { padding: 1.3rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-soft); margin-bottom: 1.2rem; }
.why-box h2, .tips-box h2, .points-box h2 { font-size: 1.05rem; margin-bottom: .8rem; }
.why-box .ui-eq { margin-bottom: .8rem; background: var(--bg-card); }
.why-box p, .points-box p { font-size: .88rem; color: var(--text-soft); }
.tips-box ul, .points-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.tips-box li { position: relative; padding-left: 1.6rem; font-size: .9rem; color: var(--text-soft); }
.tips-box li::before { content: "💡"; position: absolute; left: 0; top: 0; font-size: .85rem; }
.points-list { margin-bottom: .8rem; }
.points-list li { font-size: .9rem; color: var(--text-soft); }
.points-list b { display: inline-block; min-width: 3.2rem; font-family: var(--font-title); color: var(--gold-text); }
.result-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

/* ===== BIBLIOTECA E MEUS PROMPTS ===== */
.search-box { display: flex; align-items: center; gap: .6rem; padding: 0 1rem; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-card); margin-bottom: 1rem; color: var(--text-mute); }
.search-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-glow); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: .85rem 0; outline: none; }
.result-count { font-size: .8rem; color: var(--text-mute); margin-bottom: .8rem; }
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.lib-card { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-card); min-width: 0; }
.lib-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.lib-goal { font-size: .72rem; font-weight: 700; color: var(--text-soft); margin-right: .2rem; }
.lib-card h3 { font-size: 1rem; }
.lib-date { font-size: .74rem; color: var(--text-mute); margin-top: -.4rem; }
.lib-text { max-height: 240px; font-size: .8rem; }
.lib-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: auto; }
.tabs { display: inline-flex; gap: .3rem; padding: .3rem; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); margin-bottom: 1.3rem; }
.tab { padding: .55rem 1.1rem; border-radius: 10px; font-weight: 700; font-size: .88rem; color: var(--text-soft); }
.tab.active { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow-md); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 99px; background: var(--violet); color: #fff; font-size: .7rem; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 2.6rem 1rem; border-radius: 18px; border: 1px dashed var(--border-strong); color: var(--text-soft); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.empty-state h3 { color: var(--text); }
.empty-icon { font-size: 2rem; }
.empty-state .btn-primary { margin-top: .6rem; }

/* ===== CONQUISTAS ===== */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.stat { padding: 1rem; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card); text-align: center; }
.stat strong { display: block; font-family: var(--font-title); font-size: 1.5rem; line-height: 1.1; }
.stat small { font-size: .7rem; font-weight: 700; color: var(--text-mute); text-transform: uppercase; letter-spacing: .07em; }
.medal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.medal-card { display: flex; gap: 1rem; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-card); }
.medal-card.earned { border-color: rgba(251,191,36,.45); background: linear-gradient(160deg, rgba(251,191,36,.09), transparent 60%), var(--bg-card); }
.medal-card h3 { font-size: 1rem; }
.medal-card p { font-size: .82rem; color: var(--text-soft); margin: .15rem 0 .6rem; }
.medal-card small { display: block; font-size: .72rem; font-weight: 700; color: var(--text-mute); margin: .35rem 0 .5rem; }
.medal { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--bg-soft); font-size: 1.2rem; flex-shrink: 0; filter: grayscale(.4); }
.medal.earned { border-color: var(--gold); background: linear-gradient(135deg, var(--violet-light), var(--violet-deep)); font-size: 1.6rem; box-shadow: 0 6px 18px rgba(124,58,237,.35); filter: none; }
.bar { height: 7px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; border: 1px solid var(--border); }
.bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet-light), var(--gold)); transition: width .6s var(--ease); }

/* ===== MODAL DE MEDALHA ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,5,12,.72); backdrop-filter: blur(6px); animation: fade-in .25s; }
.modal-box { position: relative; width: 100%; max-width: 440px; max-height: 94vh; overflow-y: auto; padding: 1.4rem; border-radius: 22px; background: var(--bg-card); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: .8rem; }
.modal-box h3 { font-size: 1.3rem; }
.modal-sub { font-size: .86rem; color: var(--text-soft); }
.achv-canvas { width: 100%; max-width: 230px; aspect-ratio: 9 / 16; height: auto; margin: 0 auto; border-radius: 14px; box-shadow: var(--shadow-lg); }
.modal-actions { display: flex; flex-direction: column; gap: .5rem; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.confetti i { position: absolute; top: -14px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--c); animation: confetti-fall 1.8s ease-in var(--d) forwards; opacity: 0; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(640px) rotate(540deg); opacity: 0; } }

/* ===== RODAPÉ, AVISOS ===== */
.app-footer { max-width: 1180px; margin: 0 auto; padding: 1.5rem clamp(16px, 3vw, 32px) 2.5rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-mute); }
.app-footer a { color: var(--text-soft); }
.footer-note { margin-top: .6rem; }
.footer-logout { display: none; margin-top: .6rem; font-weight: 700; color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.chip-row.scroll-x { scrollbar-width: none; }
.chip-row.scroll-x::-webkit-scrollbar { display: none; }
.footer-note summary { cursor: pointer; font-weight: 600; color: var(--text-soft); }
.footer-note p { margin-top: .5rem; max-width: 80ch; line-height: 1.6; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); z-index: 95; width: max-content; max-width: calc(100% - 32px); text-align: center; padding: .8rem 1.2rem; border-radius: 14px; background: #111827; color: #fff; font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #B91C1C; }
[data-theme="dark"] .toast { background: #F1F5F9; color: #0A0A0F; }
[data-theme="dark"] .toast.error { background: #FCA5A5; }

/* ===== RESPONSIVO ===== */
@media (max-width: 1000px) {
  .task-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .preview-box { position: static; order: 2; }
  .goal-grid, .medal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topnav { display: none; }
  .bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom)); background: var(--topbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem 0; border-radius: 12px; color: var(--text-mute); font-size: .68rem; font-weight: 700; text-decoration: none; }
  .bottomnav a.active { color: var(--accent-text); background: var(--violet-glow); }
  .app { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .sticky-cta { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 30; padding: .7rem 0; background: linear-gradient(transparent, var(--bg) 35%); }
}
@media (max-width: 760px) {
  .access-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .home-hero { grid-template-columns: 1fr; gap: 1.2rem; }
  .score-card { justify-content: flex-start; }
  .task-grid, .lib-grid, .home-duo { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper li span:not(.stepper-num) { font-size: .74rem; }
  .ui-flow { flex-direction: column; }
  .ui-flow-step { flex-direction: row; text-align: left; align-items: center; padding: .7rem .8rem; gap: .7rem; }
  .ui-flow-step small { margin-left: auto; text-align: right; }
  .ui-flow-icon { width: 32px; height: 32px; font-size: .95rem; margin: 0; }
  .ui-flow { gap: .35rem; }
  .ui-flow-arrow { display: none; }
  .ui-flow-step { padding: .5rem .75rem; border-radius: 12px; }
  .ui-flow-step strong { font-size: .84rem; }
  .chip-row.scroll-x { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; }
  .chip-row.scroll-x .chip { flex-shrink: 0; }
  .brand small { display: none; }
  .club-btn { width: 100%; }
  .result-actions > * { flex: 1 1 auto; }
  .prompt-text { max-height: 360px; }
}
@media (max-width: 560px) {
  .goal-grid, .medal-grid { grid-template-columns: 1fr; }
  .goal-card { min-height: 0; display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 1rem; row-gap: .2rem; padding: 1.1rem; }
  .goal-icon { grid-row: 1 / span 3; margin: 0; }
  .goal-foot { grid-column: 2; padding-top: .3rem; }
  .section-head { align-items: stretch; }
  .area-select { flex-direction: column; align-items: stretch; gap: .3rem; width: 100%; }
  .area-select select { max-width: none; width: 100%; }
  .stepper li::after { margin-left: .3rem; }
  .stepper li:not(.current) span:not(.stepper-num) { display: none; }
  .topbar-inner { gap: .5rem; }
  .brand strong { font-size: .92rem; }
  .points-pill small { display: none; }
  .ui-eq { padding: .8rem; }
  .ui-eq-part { font-size: .78rem; padding: .45rem .65rem; }
  .tool-option { flex: 1 1 40%; min-width: 0; }
  .result-hero { align-items: flex-start; }
  #logoutBtn { display: none; }
  .footer-logout { display: inline-block; }
  .page-icon, .result-badge { width: 48px; height: 48px; border-radius: 15px; font-size: 1.4rem; }
  .page-hero { align-items: flex-start; gap: .8rem; }
  .page-hero h1 { font-size: 1.55rem; }
  .score-card { padding: .9rem 1.1rem; }
  .score-ring-wrap, .score-ring { width: 68px; height: 68px; }
  .score-stats { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
