:root {
  --bg: oklch(0.985 0.006 85);
  --surface: oklch(1 0 0);
  --panel: oklch(0.955 0.012 80);
  --line: oklch(0.9 0.012 78);
  --ink: oklch(0.22 0.02 60);
  --muted: oklch(0.46 0.02 60);
  --primary: oklch(0.82 0.165 75);
  --primary-deep: oklch(0.66 0.16 65);
  --accent: oklch(0.38 0.07 55);
  --accent-soft: oklch(0.945 0.045 85);
  --ok: oklch(0.5 0.13 150);
  --ok-deep: oklch(0.4 0.11 150);
  --ok-soft: oklch(0.95 0.045 150);
  --focus: oklch(0.5 0.14 250);
  --f1: oklch(0.52 0.1 195); --f1s: oklch(0.95 0.035 195);
  --f2: oklch(0.5 0.16 275); --f2s: oklch(0.95 0.035 275);
  --f3: oklch(0.8 0.165 75); --f3s: oklch(0.95 0.06 85);
  --f4: oklch(0.5 0.12 150); --f4s: oklch(0.95 0.04 150);
  --f5: oklch(0.56 0.16 30); --f5s: oklch(0.95 0.04 30);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-xs: 0.8125rem; --t-sm: 0.9375rem; --t-md: 1rem; --t-lg: 1.1875rem; --t-xl: 1.5rem; --t-2xl: 2rem;
  --tab-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; line-height: 1.15; letter-spacing: -0.015em; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }
.ic { display: inline-flex; width: 24px; height: 24px; flex: none; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill svg { fill: currentColor; stroke: none; }

/* shell */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100dvh; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: var(--t-lg); padding: 4px 8px; letter-spacing: -0.01em; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-size: var(--t-sm); font-weight: 600; color: var(--muted); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { background: oklch(0.925 0.016 80); color: var(--ink); } }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--line); }
.nav a[aria-current="page"] .ic { color: var(--primary-deep); }
.side-card { margin-top: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 10px; text-decoration: none; }
.by { font-size: var(--t-xs); color: var(--muted); padding: 0 8px; }
.topbar, .tabbar { display: none; }
.main { padding: 36px clamp(20px, 4vw, 56px) 96px; max-width: 1180px; width: 100%; outline: none; }
.view { animation: in 200ms var(--ease); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* tipografia */
.h1 { font-size: var(--t-2xl); font-weight: 800; }
.h2 { font-size: var(--t-xl); font-weight: 750; }
.h3 { font-size: var(--t-lg); font-weight: 700; }
.lead { font-size: var(--t-lg); color: var(--muted); max-width: 56ch; }
.small { font-size: var(--t-sm); color: var(--muted); }
.xs { font-size: var(--t-xs); color: var(--muted); }
.stack > * + * { margin-top: 14px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: var(--t-md); text-decoration: none; box-shadow: 0 3px 0 var(--line); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 150ms var(--ease); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--ink); box-shadow: 0 3px 0 var(--primary-deep); }
.btn-primary:active { box-shadow: 0 0 0 var(--primary-deep); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 0 3px 0 var(--line); }
@media (hover: hover) and (pointer: fine) { .btn:hover:not([disabled]) { background: var(--panel); } .btn-primary:hover:not([disabled]) { background: oklch(0.85 0.165 75); } }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: var(--t-sm); text-decoration: none; }
.chip .ic { width: 18px; height: 18px; }
.chip.flame .ic { color: oklch(0.65 0.19 45); }
.chip.xp .ic { color: var(--primary-deep); }

/* barras e anéis */
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width 350ms var(--ease); }
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .trk { stroke: var(--line); }
.ring .val { stroke: var(--primary-deep); stroke-linecap: round; transition: stroke-dashoffset 800ms var(--ease); }
.ring .mid { position: absolute; text-align: center; font-weight: 800; line-height: 1.05; }
.segs { display: flex; gap: 6px; }
.segs i { flex: 1; height: 10px; border-radius: 99px; background: var(--line); transition: background-color 250ms var(--ease); }
.segs i.on { background: var(--ok); }
.segs i.pop { animation: pop 380ms var(--ease); }
@keyframes pop { 0% { transform: scaleY(0.6); } 50% { transform: scaleY(1.8); } 100% { transform: none; } }

/* hoje */
.today { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.mission { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 28px; display: grid; gap: 18px; box-shadow: 0 4px 0 var(--line); }
.mission-top { display: flex; gap: 20px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 99px; font-size: var(--t-xs); font-weight: 700; background: var(--accent-soft); color: var(--accent); width: fit-content; }
.pill.p1 { background: var(--f1s); color: var(--f1); } .pill.p2 { background: var(--f2s); color: var(--f2); } .pill.p3 { background: var(--f3s); color: oklch(0.42 0.1 70); }
.pill.p4 { background: var(--f4s); color: var(--f4); } .pill.p5 { background: var(--f5s); color: var(--f5); }
.mission .big { font-size: var(--t-lg); font-weight: 700; line-height: 1.35; }
.side-col { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 12px; }
.panel h2 { font-size: var(--t-md); font-weight: 750; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.week { display: flex; justify-content: space-between; gap: 6px; }
.day { display: grid; gap: 6px; justify-items: center; font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.day i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.day i .ic { width: 18px; height: 18px; }
.day.on i { background: var(--ok); border-color: var(--ok); }
.day.today i { border-color: var(--primary-deep); }
.journey { display: flex; overflow-x: auto; padding: 8px 4px 12px; margin: 0 -4px; scrollbar-width: thin; }
.jn { flex: none; display: grid; justify-items: center; gap: 6px; width: 58px; position: relative; text-decoration: none; }
.jn::before { content: ""; z-index: 0; position: absolute; top: 15px; left: -50%; width: 100%; height: 4px; background: var(--line); }
.jn:first-child::before { display: none; }
.jn.done::before, .jn.now::before { background: var(--ok); }
.jn b { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: var(--t-xs); font-weight: 800; background: var(--surface); border: 3px solid var(--line); color: var(--muted); }
.jn.done b { background: var(--ok); border-color: var(--ok); color: #fff; }
.jn.now b { background: var(--primary); border-color: var(--primary-deep); color: var(--ink); box-shadow: 0 0 0 5px oklch(0.82 0.165 75 / 0.3); }
.jn b .ic { width: 16px; height: 16px; stroke-width: 3; }
.jn span { font-size: 0.6875rem; font-weight: 600; color: var(--muted); }
.next-badge { display: flex; gap: 14px; align-items: center; }

/* diagnóstico */
.quiz { max-width: 640px; margin: 0 auto; padding-top: 8px; }
.q-top { display: grid; gap: 12px; }
.q-row { display: flex; align-items: center; gap: 12px; }
.q-row .segs { flex: 1; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .iconbtn:hover { background: var(--panel); color: var(--ink); } }
.q-text { font-size: var(--t-xl); font-weight: 800; margin: 28px 0 6px; line-height: 1.2; }
.q-hint { color: var(--muted); font-size: var(--t-sm); }
.opts { display: grid; gap: 12px; margin-top: 24px; border: 0; padding: 0; min-width: 0; }
.opts legend { padding: 0; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt > span { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 18px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font-weight: 700; box-shadow: 0 3px 0 var(--line); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), border-color 150ms var(--ease), background-color 150ms var(--ease); }
.opt .oi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--muted); flex: none; }
.opt .oi .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.opt kbd { margin-left: auto; font: 600 var(--t-xs) var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.opt.o2 input:checked + span { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 3px 0 var(--ok); }
.opt.o2 input:checked + span .oi { background: var(--ok); color: #fff; }
.opt.o1 input:checked + span { border-color: var(--primary-deep); background: var(--f3s); box-shadow: 0 3px 0 var(--primary-deep); }
.opt.o1 input:checked + span .oi { background: var(--primary); color: var(--ink); }
.opt.o0 input:checked + span { border-color: var(--muted); background: var(--panel); box-shadow: 0 3px 0 var(--muted); }
.opt.o0 input:checked + span .oi { background: var(--muted); color: #fff; }
.opt input:active + span { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.areas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; border: 0; padding: 0; }
.area { position: relative; }
.area input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.area span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: var(--t-sm); transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.area input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.area input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.result { max-width: 880px; margin: 0 auto; display: grid; gap: 24px; text-align: center; justify-items: center; }
.result .ring .mid { font-size: 2rem; }
.xpgain { display: inline-flex; align-items: center; gap: 8px; background: var(--f3s); color: oklch(0.4 0.1 70); font-weight: 800; padding: 8px 16px; border-radius: 99px; animation: rise 500ms var(--ease) 500ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(0.95); } to { opacity: 1; transform: none; } }
.profile { width: 100%; max-width: 560px; text-align: left; display: grid; }
.profile li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.profile li:first-child { border-top: 0; }
.profile .oi { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--panel); color: var(--muted); }
.profile .oi .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.profile .s2 { background: var(--ok); color: #fff; } .profile .s1 { background: var(--primary); color: var(--ink); }

/* rota */
.rota { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 32px; margin-top: 20px; align-items: start; }
.mapcol { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); scrollbar-width: thin; }
.f1 { --c: var(--f1); --cs: var(--f1s); } .f2 { --c: var(--f2); --cs: var(--f2s); } .f3 { --c: var(--f3); --cs: var(--f3s); } .f4 { --c: var(--f4); --cs: var(--f4s); } .f5 { --c: var(--f5); --cs: var(--f5s); }
.detail { display: grid; gap: 22px; min-width: 0; }
.back { display: none; }
.dhead { display: grid; gap: 10px; }
.dhead .h1 { font-size: 1.75rem; max-width: 26ch; }
.prog { display: grid; gap: 8px; }
.prog-top { display: flex; justify-content: space-between; font-size: var(--t-sm); font-weight: 700; }
.checks { display: grid; gap: 10px; }
.check { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-size: var(--t-sm); line-height: 1.45; box-shadow: 0 3px 0 var(--line); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), border-color 150ms var(--ease), background-color 150ms var(--ease); }
.check:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .bx { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); flex: none; display: grid; place-items: center; color: transparent; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.check .bx .ic { width: 16px; height: 16px; stroke-width: 3; }
.check input:checked ~ .bx { background: var(--ok); border-color: var(--ok); color: #fff; }
.check:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 3px 0 var(--ok); }
.check input:checked ~ .tx { color: var(--muted); }
.check:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.reward { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: var(--ok-soft); border: 2px solid var(--ok); }
.reward .tr { width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; animation: rise 400ms var(--ease) both; }
.reward .tr .ic { width: 28px; height: 28px; stroke-width: 3; }
.acc { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.acc summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; font-weight: 700; cursor: pointer; border-radius: 16px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .chev { margin-left: auto; transition: transform 200ms var(--ease); color: var(--muted); }
.acc[open] summary .chev { transform: rotate(180deg); }
.acc summary .lead-ic { color: var(--primary-deep); }
.acc .body { padding: 0 16px 16px 52px; font-size: var(--t-sm); display: grid; gap: 8px; }
.acc .body ul { display: grid; gap: 8px; }
.acc .body li { padding-left: 14px; position: relative; }
.acc .body li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tagc { padding: 4px 12px; border-radius: 99px; background: var(--panel); font-size: var(--t-xs); font-weight: 600; border: 1px solid var(--line); }
.step-nav { display: flex; justify-content: space-between; gap: 12px; }

/* profissão */
.pchips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 16px -2px 0; scrollbar-width: thin; }
.pchip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: var(--t-sm); transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.pchip[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pdetail { display: grid; gap: 12px; margin-top: 8px; max-width: 760px; }

/* conquistas */
.level { display: flex; align-items: center; gap: 24px; background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 4px 0 var(--line); margin-top: 20px; }
.level .grow { flex: 1; display: grid; gap: 10px; min-width: 0; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.badge { display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; padding: 18px 12px; border-radius: 20px; border: 2px solid var(--line); background: var(--surface); }
.badge .bi { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--muted); }
.badge .bi .ic { width: 30px; height: 30px; }
.badge b { font-size: var(--t-sm); line-height: 1.2; }
.badge .xs { line-height: 1.3; }
.badge.on { border-color: var(--primary-deep); background: var(--f3s); }
.badge.on .bi { background: var(--primary); color: var(--ink); box-shadow: 0 3px 0 var(--primary-deep); }

/* glossário */
.search { position: relative; max-width: 480px; margin-top: 16px; }
.search .ic { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: var(--muted); }
.input { min-height: 48px; width: 100%; padding: 0 14px 0 44px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.gl { margin-top: 20px; max-width: 760px; display: grid; gap: 10px; }
.term { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px 16px; }
.term dt { font-weight: 750; }
.term dd { color: var(--muted); font-size: var(--t-sm); margin-top: 4px; }
.empty { padding: 28px 0; color: var(--muted); }

/* feedback */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: var(--t-sm); box-shadow: 0 8px 24px oklch(0.2 0.02 60 / 0.3); animation: rise 260ms var(--ease) both; }
.toast .ti { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--ink); display: grid; place-items: center; flex: none; }
.toast .ti .ic { width: 20px; height: 20px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 200ms, transform 200ms; }
.xpfloat { position: fixed; z-index: 60; pointer-events: none; font-weight: 800; color: oklch(0.42 0.12 70); background: var(--f3s); border-radius: 99px; padding: 2px 10px; animation: floatup 900ms var(--ease) forwards; }
@keyframes floatup { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-48px); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* responsivo */
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; position: sticky; top: 0; z-index: 20; background: oklch(0.985 0.006 85 / 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .top-stats { display: flex; gap: 8px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: var(--tab-h); font-size: 0.6875rem; font-weight: 700; color: var(--muted); text-decoration: none; }
  .tabbar a .ic { transition: transform 160ms var(--ease); }
  .tabbar a:active .ic { transform: scale(0.88); }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] .ic { color: var(--primary-deep); }
  .main { padding: 20px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); }
  .today, .rota { grid-template-columns: minmax(0, 1fr); }
  .h1 { font-size: 1.625rem; }
  .mission { padding: 20px; }
  .mission-top { flex-direction: column; align-items: flex-start; }
  .rota .mapcol { position: static; max-height: none; overflow: visible; border: 0; background: none; }
  .rota.has-detail .mapcol { display: none; }
  .rota:not(.has-detail) .detail { display: none; }
  .back { display: inline-flex; }
  .level { flex-direction: column; text-align: center; }
  .dhead .h1 { font-size: 1.5rem; }
}
@media (max-width: 420px) { .btn { padding: 0 18px; } .step-nav .btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) {
  .view, .xpgain, .reward .tr, .toast { animation: none; }
  .node.is-now .nb::after { animation: none; }
  .segs i.pop { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* trilho */
.rail { padding: 18px 14px 22px; display: grid; }
.rail-phase { margin: 16px 0 4px 70px; }
.rail-phase:first-child { margin-top: 0; }
.node { position: relative; display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 6px 8px 20px 0; background: none; border: 0; border-radius: 14px; }
.node::before { content: ""; position: absolute; left: 26px; top: 60px; bottom: 2px; width: 4px; border-radius: 2px; background: var(--line); }
.node.is-done::before, .node.is-prior::before { background: var(--ok); }
.node.last::before { display: none; }
.node .nb { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: var(--t-xl); font-weight: 800; border: 4px solid var(--c); background: var(--cs); color: var(--c); box-shadow: 0 4px 0 var(--c); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease); }
.node:active .nb { transform: translateY(4px); box-shadow: 0 0 0 var(--c); }
.node .nb .ic { width: 28px; height: 28px; stroke-width: 3; }
.node .nt { display: grid; gap: 2px; padding-top: 4px; min-width: 0; }
.node .nn { font-size: var(--t-sm); font-weight: 700; line-height: 1.3; color: var(--ink); }
.node .ns { font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
.node.is-done .nb, .node.is-prior .nb { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 4px 0 var(--ok-deep); }
.node.is-now .nb { background: var(--c); color: #fff; }
.node.is-now.f3 .nb { color: var(--ink); }
.node.is-now .nb::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid var(--c); opacity: 0; animation: ping 2.2s var(--ease) infinite; }
.node.is-now .ns { color: var(--ink); font-weight: 800; }
.node[aria-current="step"] { background: var(--panel); }
@media (hover: hover) and (pointer: fine) { .node:hover { background: var(--panel); } }
@keyframes ping { 0% { opacity: 0.7; transform: scale(0.85); } 70%, 100% { opacity: 0; transform: scale(1.25); } }
.f1 { --c: var(--f1); --cs: var(--f1s); } .f2 { --c: var(--f2); --cs: var(--f2s); } .f3 { --c: var(--f3); --cs: var(--f3s); } .f4 { --c: var(--f4); --cs: var(--f4s); } .f5 { --c: var(--f5); --cs: var(--f5s); }

/* modo foco */
.sgs { display: flex; gap: 6px; }
.sg { flex: 1; height: 28px; padding: 9px 0; background: none; border: 0; }
.sg i { display: block; height: 10px; border-radius: 99px; background: var(--line); transition: background-color 250ms var(--ease), transform 200ms var(--ease); }
.sg.on i { background: var(--ok); }
.sg.cur i { background: var(--primary); transform: scaleY(1.5); }
.sg.on.cur i { background: var(--ok); }
.sg.pop i { animation: pop 380ms var(--ease); }
.focus { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 24px; display: grid; gap: 16px; box-shadow: 0 4px 0 var(--line); scroll-margin-top: 80px; }
.f-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.f-head { font-size: 1.375rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.f-state { color: var(--ok); font-weight: 700; font-size: var(--t-sm); display: inline-flex; align-items: center; gap: 6px; }
.f-state .ic { width: 18px; height: 18px; stroke-width: 3; }
.how { border: 0; background: var(--panel); border-radius: 14px; }
.how summary { min-height: 48px; padding: 0 16px; border-radius: 14px; }
.how .body { padding: 0 16px 16px; }
.f-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.f-actions .btn-primary { flex: 1 1 200px; }
.linkbtn { background: none; border: 0; color: var(--muted); font-weight: 600; font-size: var(--t-sm); min-height: 44px; padding: 0 12px; text-decoration: underline; text-underline-offset: 3px; }
.mini { display: grid; }
.mini button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 4px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font-size: var(--t-sm); }
.mini button:first-child { border-top: 0; }
.mini .bx { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; }
.mini .bx .ic { width: 14px; height: 14px; stroke-width: 3; }
.mini .on .bx { background: var(--ok); border-color: var(--ok); }
.mini .cur { font-weight: 700; }
.mini span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* espaço de escrita */
.ws { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--panel); border: 2px solid transparent; }
.ws.drag { border-color: var(--accent); background: var(--accent-soft); }
.ws-l { font-weight: 700; font-size: var(--t-sm); }
.ta { width: 100%; min-height: 112px; resize: vertical; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); line-height: 1.5; }
.ta:focus-visible { outline-offset: 0; }
.ws-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: var(--t-sm); box-shadow: 0 2px 0 var(--line); cursor: pointer; }
.btn-sm .ic { width: 20px; height: 20px; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.btn:has(.sr:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: var(--t-sm); }
.file .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .ic { color: var(--muted); }

/* biblioteca e meu espaço */
.tabs2 { display: inline-grid; grid-auto-flow: column; gap: 4px; background: var(--panel); padding: 4px; border-radius: 16px; margin-top: 16px; }
.tabs2 a { display: grid; place-items: center; min-height: 44px; padding: 0 20px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: var(--t-sm); color: var(--muted); }
.tabs2 a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--line); }
.eg { display: grid; gap: 10px; padding: 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.eg h2 { font-size: var(--t-md); font-weight: 750; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ei { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--panel); }
.ei b { font-size: var(--t-sm); }
.ei p { white-space: pre-wrap; font-size: var(--t-sm); }
.egs { display: grid; gap: 14px; margin-top: 18px; max-width: 820px; }
.empty-state { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 40px 16px; border: 2px dashed var(--line); border-radius: 24px; margin-top: 20px; max-width: 560px; }
.empty-state .tr { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty-state .tr .ic { width: 30px; height: 30px; }
@media (max-width: 1023px) { .rail { padding: 8px 4px 16px; } .mapcol { padding: 0; } .focus { padding: 20px; } }
