:root {
  --ink: #14213d;
  --ink-2: #4a5572;
  --ink-3: #7c869f;
  --paper: #f7f5ef;
  --card: #ffffff;
  --line: #e7e3d8;
  --sun: #ffc857;
  --sun-deep: #f2a900;
  --sun-soft: #fff4d6;
  --go: #1f9d6b;
  --go-soft: #e4f6ee;
  --bad: #d64545;
  --bad-soft: #fdeaea;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 24px rgba(20, 33, 61, .06);
  --chart: #2f6fd0;
  --r: 16px;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--ink-3); }
.hidden { display: none !important; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; font-weight: 600; font-size: 14.5px; text-decoration: none; transition: transform .12s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #1f3159; }
.btn.sun { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn.sun:hover { background: var(--sun-deep); border-color: var(--sun-deep); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 10px; color: var(--ink-2); }
.icon-btn:hover { background: #efece3; color: var(--ink); }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.icon-btn:disabled { opacity: .3; cursor: default; }
svg.i { width: 18px; height: 18px; flex: none; }

/* Formulários */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; }
textarea.input { resize: vertical; min-height: 76px; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 33, 61, .08); }

/* Estrutura */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 18px var(--display); padding: 0 10px 18px; letter-spacing: -.02em; text-decoration: none; }
.brand img { display: block; height: 34px; width: auto; }
.nav-a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: rgba(255, 255, 255, .72); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.nav-a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-a.on { background: rgba(255, 200, 87, .16); color: var(--sun); }
.nav-sep { margin: 16px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.side-foot { margin-top: auto; }
.topbar { display: none; }
.main { padding: 40px clamp(18px, 4vw, 56px) 80px; min-width: 0; }
.wrap { max-width: 980px; margin: 0 auto; }
.wrap.narrow { max-width: 720px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 22px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }

/* Início */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: 22px; padding: 28px; margin: 22px 0 36px; }
.hero::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 300px; height: 154px; background: url(/icons/logo-mark.png) center/contain no-repeat; opacity: .1; pointer-events: none; }
.hero-num { font: 800 54px/1 var(--display); letter-spacing: -.03em; color: var(--sun); }
.hero-label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 10px; }
.bar { height: 8px; border-radius: 99px; background: rgba(20, 33, 61, .1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--go); transition: width .3s; }
.hero .bar { background: rgba(255, 255, 255, .16); margin: 18px 0 8px; position: relative; z-index: 1; }
.hero .bar > i { background: var(--sun); }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; font-size: 13.5px; color: rgba(255, 255, 255, .7); position: relative; z-index: 1; }
.stage-h { display: flex; align-items: center; gap: 12px; margin: 30px 0 14px; }
.stage-n { width: 30px; height: 30px; border-radius: 9px; background: var(--sun-soft); color: #9a6b00; display: grid; place-items: center; font: 800 14px var(--display); }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.module-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px; background: none; border: 0; text-align: left; }
.module-h .chev { transition: transform .15s; color: var(--ink-3); }
.module.open .chev { transform: rotate(180deg); }
.module-prog { padding: 0 18px 16px; }
.lessons { border-top: 1px solid var(--line); padding: 6px; }
.lesson { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: 14.5px; }
a.lesson:hover { background: var(--paper); }
.lesson.locked { color: var(--ink-3); }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.dot.done { background: var(--go); border-color: var(--go); color: #fff; }
.dot svg { width: 12px; height: 12px; }

/* Aula */
.tabs { display: inline-flex; padding: 4px; background: #ece8dc; border-radius: 13px; gap: 2px; margin: 20px 0; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 33, 61, .12); }
.article { font-size: 18px; line-height: 1.85; }
.article p { margin: 0 0 18px; }
.line-card { padding: 20px; transition: background .2s, border-color .2s; }
.line-card.learned { background: var(--go-soft); border-color: #bfe6d4; }
.line-en { font: 700 18px/1.4 var(--display); letter-spacing: -.01em; }
.line-pt { color: var(--ink-2); margin-top: 8px; }
.line-note { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--sun-soft); font-size: 14.5px; }
.line-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.btn.learned { background: var(--go); border-color: var(--go); color: #fff; }

/* Testes */
.trail { display: flex; flex-direction: column; align-items: center; gap: 34px; padding: 20px 0 40px; }
.node { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; width: min(260px, 100%); position: relative; }
.node:nth-child(4n+2) { transform: translateX(70px); }
.node:nth-child(4n) { transform: translateX(-70px); }
.node-dot { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 var(--sun-deep); margin-bottom: 12px; position: relative; }
.node-dot svg { width: 28px; height: 28px; }
.node.done .node-dot { background: var(--go); color: #fff; box-shadow: 0 6px 0 #167a52; }
.node.locked .node-dot { background: #e4e0d4; color: var(--ink-3); box-shadow: 0 6px 0 #cfcaba; }
.node-score { position: absolute; right: -8px; bottom: -4px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.q-opts { display: grid; gap: 10px; margin-top: 18px; }
.q-opt { text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); background: #fff; border-radius: 13px; font-weight: 500; }
.q-opt:hover:not(:disabled) { border-color: var(--ink); }
.q-opt.sel { border-color: var(--ink); background: #f0f2f7; }
.q-opt.ok { border-color: var(--go); background: var(--go-soft); }
.q-opt.no { border-color: var(--bad); background: var(--bad-soft); }
.q-opt:disabled { cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; font-weight: 600; }
.chip:disabled { opacity: .3; }
.build-out { min-height: 58px; padding: 10px; margin: 18px 0 14px; border: 1.5px dashed var(--line); border-radius: 13px; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pairs .col { display: grid; gap: 8px; align-content: start; }
.pair-b { padding: 12px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; font-weight: 600; font-size: 15px; }
.pair-b.sel { border-color: var(--ink); background: #f0f2f7; }
.pair-b.linked { border-color: var(--sun-deep); background: var(--sun-soft); }
.feedback { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.feedback.ok { background: var(--go-soft); color: #137a50; }
.feedback.no { background: var(--bad-soft); color: #a92f2f; }
.score-big { font: 800 72px/1 var(--display); letter-spacing: -.04em; }

/* Player */
.player { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--paper); border-radius: 14px; }
.player-play { width: 52px; height: 52px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: var(--sun); display: grid; place-items: center; }
.player-play svg { width: 22px; height: 22px; }
.player-mid { flex: 1; min-width: 0; display: grid; gap: 8px; }
.player input[type=range] { flex: 1; min-width: 0; accent-color: var(--ink); }
.speeds { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.speeds > span { margin-right: 4px; }
.speed { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font-size: 13px; font-weight: 600; }
.speed.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.finish { display: flex; justify-content: center; margin-top: 24px; }
.btn.big { min-height: 50px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.done-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #137a50; font-weight: 600; font-size: 14px; }
.notes { white-space: pre-line; font-size: 15.5px; line-height: 1.7; }
.burst { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; background: var(--go); color: #fff; display: grid; place-items: center; }
.burst svg { width: 30px; height: 30px; }

/* Teste no estilo Duolingo */
.qz { position: fixed; inset: 0; z-index: 40; background: #fff; display: flex; flex-direction: column; }
.qz-top { display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; padding: 16px; }
.qz-bar { flex: 1; height: 14px; background: #e9e6dc; }
.qz-bar > i { background: var(--go); transition: width .35s; }
.qz-combo { width: 52px; text-align: right; font-weight: 800; color: #d9660a; font-family: var(--display); }
.qz-main { flex: 1; overflow: auto; width: 100%; max-width: 620px; margin: 0 auto; padding: 12px 18px 24px; }
.qz-prompt { font-size: clamp(20px, 3.2vw, 26px); font-weight: 800; margin-bottom: 18px; }
.qz-retry { font-size: 13px; font-weight: 700; color: #d9660a; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.qz-foot { border-top: 2px solid #efece3; background: #fff; transition: background .15s; }
.qz-foot-in { max-width: 760px; margin: 0 auto; padding: 16px 18px; display: flex; align-items: center; gap: 14px; min-height: 82px; }
.qz-foot.ok { background: var(--go-soft); color: #137a50; border-color: transparent; }
.qz-foot.no { background: var(--bad-soft); color: #a92f2f; border-color: transparent; }
.qz-go { background: var(--go); border-color: var(--go); color: #fff; box-shadow: 0 4px 0 #167a52; min-width: 150px; }
.qz-go:hover { background: var(--go); border-color: var(--go); }
.qz-go:disabled { background: #e4e0d4; border-color: #e4e0d4; color: var(--ink-3); box-shadow: none; opacity: 1; }
.qz-foot.no .qz-go { background: var(--bad); border-color: var(--bad); box-shadow: 0 4px 0 #a92f2f; }
.say { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.say-btn { width: 64px; height: 64px; border-radius: 18px; border: 0; background: #1b8fd6; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 #14709f; }
.say-btn svg { width: 28px; height: 28px; }
.say-btn.slow { width: 46px; height: 46px; border-radius: 14px; background: #eaf5fc; box-shadow: 0 3px 0 #bcdff3; font-size: 22px; }
.q-opt { display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 0 var(--line); }
.q-key { width: 26px; height: 26px; flex: none; border: 1.5px solid var(--line); border-radius: 8px; display: grid; place-items: center; font-size: 13px; color: var(--ink-3); }
.chip { box-shadow: 0 2px 0 var(--line); }
.chip.used { background: #efece3; color: transparent; box-shadow: none; opacity: 1; }
.bank { justify-content: center; }
.build-out { min-height: 66px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; padding: 8px 0 12px; margin: 0 0 22px; }
.pair-b { box-shadow: 0 2px 0 var(--line); transition: background .12s, border-color .12s; }
.pair-b.matched { background: var(--go-soft); border-color: #bfe6d4; color: #137a50; box-shadow: none; opacity: .65; }
.pair-b.wrong { background: var(--bad-soft); border-color: var(--bad); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.qz-end { align-items: center; justify-content: center; text-align: center; padding: 24px; overflow: auto; }
.qz-cards { display: flex; gap: 10px; margin: 26px 0 14px; flex-wrap: wrap; justify-content: center; }
.qz-card { width: 112px; border-radius: 16px; padding: 8px 8px 12px; color: #fff; }
.qz-card span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.qz-card b { display: block; background: #fff; border-radius: 10px; padding: 8px 4px; font: 800 22px var(--display); color: var(--ink); }
.qz-card.sun { background: var(--sun-deep); }
.qz-card.go { background: var(--go); }
.qz-card.ink { background: var(--ink); }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .7; } }
button.node { background: none; border: 0; font: inherit; color: inherit; }

/* Cadastro e aprovação */
.waiting { max-width: 440px; text-align: center; margin: 16px; }
.burst.wait { background: var(--sun); color: var(--ink); }
.burst.off { background: #e4e0d4; color: var(--ink-2); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--sun); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.pending-box h2 .nav-badge { margin-left: 6px; vertical-align: 3px; font-family: var(--body); }
.pending-box { background: var(--sun-soft); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.pending-box > .card + .card { margin-top: 10px; }
.signup-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* App instalável */
.install-banner { display: flex; align-items: center; gap: 10px; background: var(--sun-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 18px; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.side-foot { padding-bottom: env(safe-area-inset-bottom); }
.qz-foot { padding-bottom: env(safe-area-inset-bottom); }
.qz-top { padding-top: calc(16px + env(safe-area-inset-top)); }
a.link { display: inline-block; }

/* Painel de desempenho */
.perf .stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.perf-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.perf h2 + .list-row { margin-top: 8px; }
.perf-mod { margin: 18px 0 8px; font-size: 14px; color: var(--ink-2); }
.perf-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#chart-tip { display: none; position: fixed; z-index: 70; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; pointer-events: none; max-width: 280px; }
.dc { display: flex; gap: 8px; height: 150px; }
.dc-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--ink-3); text-align: right; min-width: 16px; }
.dc-plot { flex: 1; min-width: 0; display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line); }
.dc-col { flex: 1; min-width: 0; padding: 0; border: 0; background: none; display: flex; align-items: flex-end; border-radius: 4px 4px 0 0; }
.dc-col:hover { background: #f4f2ea; }
.dc-col i { display: block; width: 100%; background: var(--chart); border-radius: 4px 4px 0 0; }
.dc-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin: 6px 0 0 24px; }
.br { display: grid; grid-template-columns: minmax(0, 210px) 1fr 70px; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.br-label span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-track { height: 12px; background: #efece3; border-radius: 4px; overflow: hidden; }
.br-track i { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.br-val { text-align: right; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.perf-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.perf-table th { text-align: left; border-bottom: 1px solid var(--line); padding: 0 8px 8px; }
.perf-table th button { background: none; border: 0; padding: 0; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.perf-table th button.on { color: var(--ink); text-decoration: underline; }
.perf-table td { padding: 11px 8px; border-bottom: 1px solid #f1eee6; vertical-align: middle; }
.perf-table small { display: block; color: var(--ink-3); font-size: 12.5px; }
.perf-table .tag { gap: 4px; white-space: nowrap; }
.perf-table .tag svg { width: 12px; height: 12px; }
.perf .page-head .tag { gap: 5px; }
.perf .page-head .tag svg { width: 13px; height: 13px; }
.perf-name { font-weight: 600; text-decoration: none; }
.perf-name:hover { text-decoration: underline; }
.mini { width: 90px; height: 6px; background: #efece3; border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.mini i { display: block; height: 100%; background: var(--chart); }
.hm-grid { display: grid; grid-template-rows: repeat(7, 16px); grid-auto-flow: column; grid-auto-columns: 16px; gap: 3px; overflow-x: auto; }
.hm { padding: 0; border: 0; border-radius: 3px; background: #efece3; }
.hm.on { background: var(--chart); }

/* Conta */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat b { display: block; font: 800 30px/1.1 var(--display); letter-spacing: -.02em; }
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--sun-soft); color: #9a6b00; display: grid; place-items: center; font: 800 22px var(--display); flex: none; }
.avatar.sm { width: 42px; height: 42px; font-size: 16px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 12px; color: var(--ink-3); }
.week i { display: grid; place-items: center; font-style: normal; height: 36px; border-radius: 10px; background: #efece3; color: var(--ink-2); font-weight: 600; margin-top: 4px; }
.week i.on { background: var(--sun); color: var(--ink); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }

/* Admin */
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; background: #efece3; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tag.go { background: var(--go-soft); color: #137a50; }
.tag.bad { background: var(--bad-soft); color: #a92f2f; }
.tag.sun { background: var(--sun-soft); color: #8a6000; }
.tree-m { background: var(--paper); border-radius: 13px; padding: 12px; margin-top: 10px; }
.tree-t { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; margin-top: 8px; font-size: 14.5px; }
.tree-t a { flex: 1; min-width: 0; text-decoration: none; font-weight: 500; }
.tree-t a:hover { text-decoration: underline; }
.editor { min-height: 180px; padding: 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; outline: none; background: #fff; line-height: 1.7; }
.editor p { margin: 0 0 12px; }
.toolbar { display: flex; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 12px 12px 0 0; background: var(--paper); }
.tool { width: 34px; height: 32px; border: 0; background: none; border-radius: 8px; font-weight: 700; }
.tool:hover { background: #e7e3d8; }
.check-tree { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 12px; }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
.pair-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }

/* Janelas e avisos */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(20, 33, 61, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 18px; padding: 24px; }
.modal h2 { margin-bottom: 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow); }
.toast.err { background: var(--bad); }

/* Entrada */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--ink); color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -90px; bottom: -40px; width: 560px; height: 286px; background: url(/icons/logo-mark.png) center/contain no-repeat; opacity: .08; }
.auth-logo { display: block; width: 190px; height: auto; position: relative; z-index: 1; }
.auth-art h1 { font-size: clamp(32px, 4.4vw, 54px); max-width: 12em; position: relative; z-index: 1; }
.auth-art h1 em { font-style: normal; color: var(--sun); }
.auth-form { display: grid; place-items: center; padding: 28px 18px; }
.auth-box { width: min(380px, 100%); }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-size: 14px; }

@media (max-width: 860px) {
  .shell { display: block; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
  .br { grid-template-columns: minmax(0, 1fr) 62px; }
  .br-track { grid-column: 1 / -1; grid-row: 2; }
  .topbar .icon-btn { color: #fff; }
  .topbar .brand { padding: 0; font-size: 16px; }
  .topbar .brand img { height: 30px; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .side { transform: none; }
  body.menu-open::before { content: ""; position: fixed; inset: 0; background: rgba(20, 33, 61, .45); z-index: 25; }
  .main { padding: 24px 16px 70px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; gap: 24px; }
  .auth-art::after { width: 300px; height: 154px; right: -40px; bottom: -30px; }
  .auth-logo { width: 140px; }
  .node:nth-child(4n+2) { transform: translateX(34px); }
  .node:nth-child(4n) { transform: translateX(-34px); }
  .pair-row { grid-template-columns: 1fr 1fr; }
  .qz-foot-in { flex-direction: column; align-items: stretch; }
  .qz-go { width: 100%; }
  .player { align-items: flex-start; }
  .article { font-size: 17px; }
}
