/* ============ 3d6 Learn — folha de estilo ============ */
:root {
  --bg: #F6F4EC;
  --surface: #FFFFFF;
  --surface-2: #F1EFE6;
  --ink: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --primary: #4F46E5;
  --primary-2: #4338CA;
  --primary-soft: #EEF2FF;
  --accent: #F59E0B;
  --accent-soft: #FEF3C7;
  --ok: #16A34A;
  --ok-soft: #DCFCE7;
  --err: #DC2626;
  --err-soft: #FEE2E2;
  --warn: #D97706;
  --warn-soft: #FEF3C7;
  --world-color: #4F46E5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.06);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; font-weight: 800; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8rem; }
code, pre { font-family: var(--mono); }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; font-size: 0.92em; }
pre { background: #111827; color: #F9FAFB; padding: 0.9rem 1rem; border-radius: 12px; overflow-x: auto; font-size: 0.92rem; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.inline { display: inline; }
.linklike { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: 0.55rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.4rem; font-weight: 900; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.4rem; }
.nav { display: flex; gap: 0.2rem; flex: 1; flex-wrap: wrap; }
.nav a { padding: 0.45rem 0.8rem; border-radius: 999px; color: var(--ink); font-weight: 700; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.hero-chip { display: flex; align-items: center; gap: 0.8rem; }
.hero-chip-link { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); }
.hero-chip-link:hover { text-decoration: none; }
.avatar { font-size: 1.7rem; line-height: 1; }
.hero-meta { display: flex; flex-direction: column; min-width: 150px; }
.hero-name { font-weight: 800; line-height: 1.1; }
.hero-level { font-size: 0.78rem; color: var(--muted); }
.xpbar { display: block; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 3px; }
.xpbar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #FBBF24); border-radius: 999px; transition: width 0.6s ease; }
.xpbar.big { height: 14px; }
.streak, .xp-total { font-weight: 800; background: var(--surface-2); padding: 0.3rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.switch-btn { white-space: nowrap; }
.switch-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 1rem; display: flex; gap: 0.5rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.page-head { margin-bottom: 1.2rem; }
.back { display: inline-block; margin-bottom: 0.6rem; font-weight: 700; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 1.1rem; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 800; cursor: pointer; transition: transform 0.08s ease, background 0.15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-2); text-decoration: none; }
.btn-secondary { background: var(--primary-soft); color: var(--primary); }
.btn-secondary:hover:not(:disabled) { background: #E0E7FF; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); text-decoration: none; }
.btn-danger { background: var(--err); color: #fff; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; border-radius: 9px; }
.btn-row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; }
.badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.82rem; font-weight: 800; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.alert { padding: 0.7rem 0.9rem; border-radius: 12px; font-weight: 600; }
.alert-error { background: var(--err-soft); color: var(--err); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- formulários ---------- */
.form { display: flex; flex-direction: column; gap: 0.9rem; }
.form label, .practice-controls label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; }
input[type="text"], input[type="password"], input[type="number"], input:not([type]), select, textarea { font: inherit; padding: 0.6rem 0.75rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { width: 100%; resize: vertical; }
.form-inline { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.7rem; }
.form-inline label { display: flex; flex-direction: column; gap: 0.2rem; font-weight: 700; font-size: 0.9rem; }
.form-inline label.check { flex-direction: row; align-items: center; gap: 0.5rem; }
.form-inline.danger { border-top: 1px dashed var(--line); padding-top: 0.7rem; }

/* ---------- login ---------- */
.login-body .page { max-width: 720px; }
.login-wrap { display: flex; flex-direction: column; gap: 1.2rem; padding-top: 1rem; }
.login-hero { text-align: center; }
.login-emblem { font-size: 4rem; }
.login-hero h1 { font-size: 2.4rem; }
.tagline { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.login-card { padding: 1.6rem; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.avatar-option input { display: none; }
.avatar-option span { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; font-size: 1.7rem; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; background: #fff; }
.avatar-option input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.player-picker { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.player-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 800; }
.player-option input { display: none; }
.player-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.track-picker { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.track-picker .picker-label { flex-basis: 100%; font-weight: 800; font-size: 0.9rem; }
.track-option { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; flex: 1 1 240px; }
.track-option input { display: none; }
.track-option .track-icon { font-size: 1.8rem; }
.track-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.new-hero summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.new-hero summary::-webkit-details-marker { display: none; }
.new-hero[open] summary { margin-bottom: 1rem; }
.new-hero[open] summary .btn { background: var(--primary-soft); }
.player-avatar { font-size: 1.6rem; }

/* ---------- home ---------- */
.home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.2rem; }
.mentor-box { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 1rem; }
.mentor-avatar { font-size: 2.4rem; line-height: 1; background: var(--surface); border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); flex-shrink: 0; }
.mentor-bubble { background: var(--surface); border-radius: 16px; border-top-left-radius: 4px; padding: 0.8rem 1rem; box-shadow: var(--shadow); flex: 1; }
.mentor-bubble p:last-child { margin-bottom: 0; }
.quest-card { border-top: 6px solid var(--world-color); }
.quest-kicker { font-weight: 800; color: var(--world-color); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.quest-subtitle { color: var(--muted); font-size: 1.05rem; }
.story { background: var(--surface-2); padding: 0.8rem 1rem; border-radius: 12px; font-style: italic; margin-bottom: 0.8rem; }
.story p:last-child { margin: 0; }
.activity-list { list-style: none; padding: 0; margin: 0.4rem 0 0.8rem; display: flex; flex-direction: column; gap: 0.3rem; }
.activity-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border-radius: 10px; background: var(--surface-2); }
.a-icon { font-size: 1.2rem; }
.a-title { flex: 1; font-weight: 700; }
.a-min { color: var(--muted); font-size: 0.85rem; }
.quest-done { border-top-color: var(--ok); }
.next-preview { background: var(--surface-2); padding: 0.7rem 0.9rem; border-radius: 12px; margin: 0.5rem 0; }
.stat-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.35rem; font-weight: 900; }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.rules { padding-left: 0; list-style: none; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.92rem; }

/* ---------- mapa ---------- */
.world-path { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; position: relative; }
.world-node { position: relative; }
.world-card { display: flex; align-items: center; gap: 1rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; color: var(--ink); border-left: 8px solid var(--world-color); transition: transform 0.12s ease; }
.world-card:hover { text-decoration: none; transform: translateX(4px); }
.world-node.state-locked .world-card { opacity: 0.55; filter: grayscale(0.6); cursor: not-allowed; }
.world-node.state-locked .world-card:hover { transform: none; }
.world-node.state-current .world-card { box-shadow: 0 0 0 3px var(--world-color), var(--shadow); }
.world-icon { font-size: 2.4rem; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--surface-2); flex-shrink: 0; }
.world-icon.big { font-size: 3rem; width: 84px; height: 84px; }
.world-info { flex: 1; }
.world-info h2 { margin-bottom: 0.1rem; }
.world-kicker { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--world-color); }
.world-progress { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.world-progress .xpbar { flex: 1; margin: 0; }
.world-state { font-size: 1.6rem; }

/* ---------- mundo ---------- */
.world-head-main { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.8rem; }
.world-desc { background: var(--surface); padding: 0.9rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow); }
.outcomes { margin-top: 0.6rem; }
.outcomes summary { cursor: pointer; font-weight: 800; }
.day-path { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }
.day-card { display: flex; gap: 0.7rem; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 0.9rem 1rem; color: var(--ink); height: 100%; position: relative; border-top: 4px solid var(--line); }
a.day-card:hover { text-decoration: none; box-shadow: 0 0 0 3px var(--world-color), var(--shadow); }
.day-node.access-done .day-card { border-top-color: var(--ok); }
.day-node.access-open .day-card { border-top-color: var(--world-color); box-shadow: 0 0 0 3px var(--world-color), var(--shadow); }
.day-node.access-locked_prev .day-card, .day-node.access-locked_today .day-card { opacity: 0.6; }
.day-node.kind-boss .day-card { border-top-color: #B91C1C; background: linear-gradient(180deg, #FFF7ED, #fff); }
.day-num { display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 1.3rem; min-width: 46px; }
.day-num span { font-size: 0.72rem; color: var(--muted); font-weight: 800; }
.day-info h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.day-types { font-size: 0.95rem; margin-top: 0.3rem; }
.day-flag { position: absolute; right: 0.6rem; top: 0.5rem; font-size: 0.72rem; font-weight: 800; background: var(--accent-soft); color: var(--warn); padding: 0.15rem 0.5rem; border-radius: 999px; }

/* ---------- dia ---------- */
.day-head { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem 1rem; align-items: end; margin-bottom: 1rem; }
.day-head .back { grid-column: 1 / -1; }
.day-kicker { font-weight: 800; color: var(--world-color); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.04em; }
.day-timer { font-family: var(--mono); font-weight: 600; font-size: 1.3rem; background: var(--surface); padding: 0.4rem 0.8rem; border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.day-layout { display: grid; grid-template-columns: 270px 1fr; gap: 1.2rem; align-items: start; }
.steps-rail { position: sticky; top: 76px; padding: 0.8rem; }
.steps-rail ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.step-btn { width: 100%; display: flex; align-items: center; gap: 0.6rem; background: transparent; border: 2px solid transparent; border-radius: 12px; padding: 0.5rem 0.6rem; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.step-btn:hover { background: var(--surface-2); }
.step.active .step-btn { background: var(--primary-soft); border-color: var(--primary); }
.step-icon { font-size: 1.3rem; }
.step-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.step-title { font-weight: 800; font-size: 0.92rem; line-height: 1.2; }
.step-sub { font-size: 0.75rem; color: var(--muted); }
.step-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: transparent; flex-shrink: 0; }
.step.done .step-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.rail-foot { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.activity-panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.5rem; }
.a-kicker { font-size: 0.8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.activity-head h2 { font-size: 1.5rem; }
.a-intro { color: var(--muted); }
.activity-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.foot-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-left: auto; }
.locked-card { text-align: center; padding: 2rem; }
.complete-box { text-align: center; padding: 1.5rem 0; }
.complete-emoji { font-size: 4rem; }
.complete-box .btn-row { justify-content: center; }

/* prosa das lições */
.prose { font-size: 1.04rem; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.2rem; }
.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.25rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 0.8rem 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; }
.prose th { background: var(--surface-2); }
.prose img { max-width: 100%; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 0.8rem 0; padding: 0.4rem 0.9rem; background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.prose .admonition { border-radius: 12px; padding: 0.7rem 1rem; margin: 0.9rem 0; border-left: 5px solid var(--primary); background: var(--primary-soft); }
.prose .admonition-title { font-weight: 900; margin-bottom: 0.2rem; }
.prose .admonition.dica, .prose .admonition.tip { border-color: var(--ok); background: var(--ok-soft); }
.prose .admonition.atencao, .prose .admonition.warning, .prose .admonition.cuidado { border-color: var(--warn); background: var(--warn-soft); }
.prose .admonition.experimente, .prose .admonition.faca, .prose .admonition.pratica { border-color: var(--accent); background: var(--accent-soft); }
.prose .admonition.curiosidade, .prose .admonition.sabia, .prose .admonition.note { border-color: #0EA5E9; background: #E0F2FE; }
.prose kbd { font-family: var(--mono); font-size: 0.85em; background: #fff; border: 1px solid #CBD5E1; border-bottom-width: 3px; border-radius: 6px; padding: 0.1em 0.45em; }

/* quiz / rapidinhas */
.question { margin: 1rem 0; padding: 0.9rem 1rem; border-radius: 12px; background: var(--surface-2); }
.q-text { font-weight: 700; margin-bottom: 0.6rem; }
.q-text p { margin: 0; display: inline; }
.options { display: flex; flex-direction: column; gap: 0.4rem; }
.opt { text-align: left; font: inherit; padding: 0.6rem 0.9rem; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.opt:hover:not(:disabled) { border-color: var(--primary); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--err); background: var(--err-soft); }
.q-feedback { margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 10px; font-weight: 600; }
.q-feedback.ok { background: var(--ok-soft); }
.q-feedback.bad { background: var(--err-soft); }
.q-feedback p { display: inline; margin: 0; }
.q-feedback .btn { display: block; margin-top: 0.5rem; }
.quiz-result { text-align: center; padding: 1rem; }
.big-score { font-size: 3rem; font-weight: 900; color: var(--primary); }
.quiz-summary { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }

/* missão */
.mission-steps { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.check-step { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.check-step input { width: 22px; height: 22px; margin-top: 0.2rem; accent-color: var(--ok); flex-shrink: 0; }
.check-step .prose p { margin: 0; }
.mission-steps li.checked { color: var(--muted); }
.tips { margin-top: 0.8rem; }
.tips summary, .hint summary { cursor: pointer; font-weight: 800; }
.hints { margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.3rem; }
.hint { background: var(--accent-soft); padding: 0.5rem 0.8rem; border-radius: 10px; }

/* digitação */
.typing-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tstat { display: flex; flex-direction: column; align-items: center; background: var(--surface-2); padding: 0.4rem 0.9rem; border-radius: 12px; min-width: 84px; }
.tstat-num { font-weight: 900; font-size: 1.25rem; font-family: var(--mono); }
.tstat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 800; }
.tstat.target { background: var(--accent-soft); }
.typing-text { font-family: var(--mono); font-size: 1.5rem; line-height: 1.9; padding: 1rem 1.2rem; background: var(--surface-2); border-radius: 14px; border: 2px solid var(--line); min-height: 110px; max-height: 260px; overflow-y: auto; cursor: text; word-break: break-word; user-select: none; }
.typing-text.focused { border-color: var(--primary); }
.typing { position: relative; }
.typing-input { position: absolute; top: 0; left: 0; opacity: 0; height: 1px; width: 1px; padding: 0; border: 0; resize: none; pointer-events: none; }
.ch { border-radius: 3px; }
.ch.ok { color: var(--ok); }
.ch.bad { color: #fff; background: var(--err); }
.ch.current { background: var(--accent); color: #111; animation: blink 1s steps(2) infinite; }
.ch.pending { color: var(--muted); }
.ch.nl { opacity: 0.6; }
@keyframes blink { 50% { background: var(--accent-soft); } }
.typing-help { margin: 0.4rem 0 0.6rem; }
.typing-result { margin-top: 0.8rem; background: var(--primary-soft); padding: 1rem; border-radius: 14px; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.typing-final { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.final-stat { display: flex; flex-direction: column; align-items: center; background: #fff; padding: 0.5rem 1rem; border-radius: 12px; min-width: 90px; }
.final-stat b { font-size: 1.5rem; font-family: var(--mono); }
.final-stat span { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; font-weight: 800; }
.final-msg { font-weight: 700; margin: 0; }
.final-tip { margin: 0; }
.typing-result-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tstat[data-tier="fail"] .tstat-num { color: var(--err); }
.tstat[data-tier="min"] .tstat-num { color: var(--warn); }
.tstat[data-tier="good"] .tstat-num, .tstat[data-tier="max"] .tstat-num { color: var(--ok); }
.typing-result[data-tier="fail"] { background: var(--err-soft); }
.typing-result[data-tier="max"] { background: var(--ok-soft); }
.typing-meter { width: 100%; max-width: 520px; padding-bottom: 1.1rem; }
.typing-meter-bar { position: relative; height: 12px; border-radius: 999px; background: #fff; overflow: visible; }
.typing-meter-fill { height: 100%; border-radius: 999px; background: var(--err); transition: width 0.6s ease; }
.typing-result[data-tier="min"] .typing-meter-fill { background: var(--warn); }
.typing-result[data-tier="good"] .typing-meter-fill, .typing-result[data-tier="max"] .typing-meter-fill { background: var(--ok); }
.typing-meter-mark { position: absolute; top: -3px; width: 2px; height: 18px; background: var(--ink); opacity: 0.5; transform: translateX(-1px); }
.typing-meter-labels { position: relative; height: 1rem; font-size: 0.7rem; color: var(--muted); font-weight: 700; margin-top: 0.25rem; }
.typing-meter-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.typing-meter-labels span:first-child { left: 0; transform: none; }
.typing-meter-labels span.end { right: 0; transform: none; }
.kb { display: flex; flex-direction: column; gap: 4px; max-width: 760px; margin: 0.4rem auto 0; user-select: none; }
.kb-row { display: flex; gap: 4px; }
.kb-key { height: 40px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 0.85rem; font-weight: 600; border: 1px solid rgba(0,0,0,0.08); position: relative; flex-direction: column; line-height: 1; }
.kb-shift { font-size: 0.6rem; opacity: 0.6; }
.kb-key.lit { outline: 3px solid var(--ink); box-shadow: 0 0 0 4px rgba(79,70,229,0.35); transform: translateY(-2px); z-index: 1; }
.finger-0 { background: #FECACA; } .finger-1 { background: #FED7AA; } .finger-2 { background: #FEF08A; } .finger-3 { background: #BBF7D0; }
.finger-4 { background: #A5F3FC; } .finger-5 { background: #C7D2FE; } .finger-6 { background: #E9D5FF; } .finger-7 { background: #FBCFE8; } .finger-8 { background: #E5E7EB; }
.kb-hint { text-align: center; font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }

/* código */
.code-ui { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0.9rem; margin-top: 0.8rem; }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; background: #1F2937; color: #E5E7EB; padding: 0.35rem 0.8rem; border-radius: 12px 12px 0 0; font-family: var(--mono); font-size: 0.85rem; }
.editor { display: flex; background: #111827; border-radius: 0 0 12px 12px; overflow: hidden; }
.gutter { padding: 0.8rem 0.4rem 0.8rem 0.6rem; color: #6B7280; font-family: var(--mono); font-size: 0.95rem; line-height: 1.55; text-align: right; user-select: none; display: flex; flex-direction: column; overflow: hidden; }
.code-input { flex: 1; min-height: 280px; background: #111827; color: #F9FAFB; border: 0; border-radius: 0; padding: 0.8rem 0.8rem; font-family: var(--mono); font-size: 0.95rem; line-height: 1.55; resize: vertical; white-space: pre; overflow: auto; tab-size: 4; }
.code-input:focus { outline: none; }
.code-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.console-title { font-weight: 800; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.console { min-height: 160px; max-height: 360px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word; }
.c-in { color: #93C5FD; }
.c-err { color: #FCA5A5; }
.console-input { margin-top: 0.5rem; background: var(--primary-soft); padding: 0.6rem; border-radius: 10px; }
.ci-row { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.ci-row input { flex: 1; }
.tests { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.4rem; }
.tests-head { font-weight: 800; padding: 0.5rem 0.8rem; border-radius: 10px; }
.tests-head.ok { background: var(--ok-soft); color: var(--ok); }
.tests-head.bad { background: var(--err-soft); color: var(--err); }
.test-item { border: 2px solid var(--line); border-radius: 10px; padding: 0.4rem 0.7rem; }
.test-item.ok { border-color: var(--ok); }
.test-item.bad { border-color: var(--err); }
.test-item summary { cursor: pointer; font-weight: 700; }
.test-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.4rem; }
.test-cmp pre { font-size: 0.82rem; padding: 0.5rem 0.6rem; margin: 0; }
.mini-chart { width: 100%; max-width: 440px; background: #fff; border-radius: 10px; margin: 0.5rem 0; display: block; }
.mc-title { font: 800 13px var(--font); fill: var(--ink); }
.mc-axis { stroke: #CBD5E1; }
.mc-bar { fill: #4F46E5; }
.mc-line { fill: none; stroke: #4F46E5; stroke-width: 2; }
.mc-dot { fill: #4F46E5; }
.mc-val, .mc-label { font: 600 11px var(--font); fill: var(--ink); }

/* robô */
.robot-ui { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 1rem; margin-top: 0.6rem; }
.robot-board { display: grid; gap: 3px; background: #1F2937; padding: 4px; border-radius: 12px; aspect-ratio: 1; }
.rcell { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; border-radius: 4px; }
.rcell.wall { background: #374151; }
.rcell.floor { background: #F3F4F6; }
.rcell.goal { background: #FEF3C7; }
.rcell.star { background: #E0F2FE; }
.rcell.visited { background: #DBEAFE; }
.rcell.robot { background: #C7D2FE; }
.rcell.crash { background: #FECACA; }
.rcell.collected { background: #DCFCE7; }
.robot-palette { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.rep-n { width: 48px; padding: 0.2rem; margin: 0 0.2rem; border-radius: 6px; border: 1px solid var(--line); font: inherit; }
.robot-program { background: var(--surface-2); border-radius: 12px; padding: 0.6rem 0.8rem; min-height: 120px; }
.rp-title { font-weight: 800; margin-bottom: 0.3rem; }
.rp-list, .rp-list ol { padding-left: 1.4rem; margin: 0; }
.rp-list li { padding: 0.15rem 0; }
.rp-list li.open { color: var(--primary); }
.robot-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.6rem; }
.robot-msg { margin-top: 0.6rem; }

/* enigma */
.puzzle-ui { margin-top: 0.8rem; }
.puzzle-row { display: flex; gap: 0.5rem; max-width: 460px; }
.puzzle-input { flex: 1; font-size: 1.1rem; }
.puzzle-feedback { margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 10px; font-weight: 600; }
.puzzle-feedback.ok { background: var(--ok-soft); }
.puzzle-feedback.bad { background: var(--err-soft); }
.puzzle-feedback p { display: inline; margin: 0; }

/* pares / ordem */
.match-ui { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.2rem; margin-top: 0.6rem; }
.match-col { display: flex; flex-direction: column; gap: 0.4rem; }
.match-item { font: inherit; font-weight: 600; text-align: left; padding: 0.6rem 0.8rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.match-item.selected { border-color: var(--primary); background: var(--primary-soft); }
.match-item.matched { border-color: var(--ok); background: var(--ok-soft); cursor: default; }
.match-item.shake { animation: shake 0.35s; border-color: var(--err); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.match-status { margin-top: 0.5rem; }
.order-list { list-style: none; padding: 0; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.4rem; counter-reset: ord; }
.order-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; counter-increment: ord; }
.order-item::before { content: counter(ord); font-weight: 900; color: var(--muted); min-width: 1.4em; }
.order-item.wrong { border-color: var(--err); background: var(--err-soft); }
.order-text { flex: 1; font-weight: 600; }
.order-btns { display: flex; gap: 0.2rem; }
.order-feedback { margin-top: 0.5rem; font-weight: 700; padding: 0.5rem 0.8rem; border-radius: 10px; }
.order-feedback.ok { background: var(--ok-soft); }
.order-feedback.bad { background: var(--err-soft); }

/* pixel art */
.pixel-ui { margin-top: 0.6rem; }
.pixel-tools { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.6rem; }
.palette { display: flex; flex-wrap: wrap; gap: 4px; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid rgba(0,0,0,0.15); cursor: pointer; }
.swatch.active { outline: 3px solid var(--ink); }
.tools { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tools .tool.active { outline: 3px solid var(--primary); }
.pixel-grid { display: grid; gap: 1px; background: #CBD5E1; border: 2px solid #94A3B8; width: min(100%, 480px); aspect-ratio: 1; touch-action: none; }
.pixel-grid.nogrid { gap: 0; background: #fff; }
.px { background: #fff; cursor: crosshair; }

/* web */
.web-ui { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.8rem; }
.web-input { width: 100%; min-height: 300px; font-family: var(--mono); font-size: 0.92rem; background: #111827; color: #F9FAFB; border-radius: 0 0 12px 12px; border: 0; padding: 0.8rem; white-space: pre; tab-size: 2; }
.web-preview { width: 100%; min-height: 340px; background: #fff; border: 2px solid var(--line); border-radius: 12px; }
.web-feedback { margin-top: 0.5rem; font-weight: 700; padding: 0.5rem 0.8rem; border-radius: 10px; }
.web-feedback.ok { background: var(--ok-soft); }
.web-feedback.bad { background: var(--err-soft); }

/* reflexão */
.reflection-ui { margin-top: 0.6rem; }
.reflection-input { font-size: 1.05rem; }

/* diário */
.journal-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; }
.timeline-day h3 { margin: 0.9rem 0 0.3rem; font-size: 0.95rem; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.ev { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0.6rem; border-radius: 8px; background: var(--surface-2); font-size: 0.95rem; }
.ev-medal { background: var(--accent-soft); }
.ev-level { background: #E0F2FE; }
.ev-day { background: var(--ok-soft); }
.ev-parent { background: #F3E8FF; }
.ev-xp { font-weight: 800; color: var(--warn); white-space: nowrap; }
.entry { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.entry-prompt { color: var(--muted); font-style: italic; }
.entry-text { white-space: pre-wrap; margin: 0.2rem 0 0; }
.chart { margin: 0.5rem 0; }
.tchart-wrap { position: relative; }
.tchart { width: 100%; height: auto; display: block; margin-bottom: 0.4rem; }
.tc-title { font: 800 13px var(--font); }
.tc-tick { font: 600 10px var(--font); }
.tc-label { font: 800 11px var(--font); }
.tc-tip { position: absolute; background: var(--ink); color: #fff; padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 0.82rem; pointer-events: none; z-index: 5; max-width: 220px; }
.chart-legend { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 0.35rem; vertical-align: middle; }
.lg-wpm::before { background: #4F46E5; } .lg-acc::before { background: #0F766E; }
.tc-table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 0.5rem; }
.tc-table th, .tc-table td { border-bottom: 1px solid var(--line); padding: 0.3rem 0.5rem; text-align: left; }

/* medalhas */
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
.medal { text-align: center; padding: 0.8rem 0.5rem; border-radius: 14px; background: var(--surface-2); }
.medal.earned { background: linear-gradient(180deg, #FEF3C7, #fff); box-shadow: 0 0 0 2px var(--accent); }
.medal.locked { opacity: 0.55; filter: grayscale(0.7); }
.medal-icon { font-size: 2.2rem; }
.medal-name { font-weight: 800; font-size: 0.92rem; }
.medal-desc { line-height: 1.25; margin-top: 0.2rem; }

/* perfil / stats */
.profile-card { display: flex; gap: 1.2rem; align-items: center; }
.profile-avatar { font-size: 4rem; width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 24px; flex-shrink: 0; }
.profile-avatar.small { font-size: 2.2rem; width: 60px; height: 60px; border-radius: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.stats-grid.compact { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin-bottom: 0.8rem; }
.stat-tile { text-align: center; padding: 0.8rem; margin: 0; background: var(--surface-2); border-radius: 12px; box-shadow: none; }
.stat-tile .stat-num { font-size: 1.5rem; }
.world-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.world-list li { display: flex; justify-content: space-between; padding: 0.35rem 0.5rem; border-radius: 8px; background: var(--surface-2); }

/* treino */
.practice-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.practice-tabs .tab { font: inherit; font-weight: 800; padding: 0.5rem 1rem; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.practice-tabs .tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.practice-controls { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.8rem; }

/* pais */
.parent-head { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.parent-forms { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }

/* certificado */
.certificate { max-width: 860px; margin: 0 auto; text-align: center; }
.cert-border { border: 6px double var(--accent); border-radius: 18px; padding: 2.5rem 2rem; background: #fff; }
.cert-emblem { font-size: 3.5rem; }
.cert-kicker { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; color: var(--muted); font-size: 0.85rem; }
.cert-name { font-size: 2.4rem; font-weight: 900; color: var(--primary); margin: 0.4rem 0; }
.cert-text { font-size: 1.1rem; max-width: 640px; margin: 0.4rem auto; }
.cert-sign { display: flex; justify-content: space-around; margin-top: 2rem; font-weight: 700; color: var(--muted); }

/* toasts / modal / confete */
.toast-root { position: fixed; bottom: 1rem; right: 1rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 0.7rem 1rem; border-radius: 12px; font-weight: 700; opacity: 0; transform: translateY(8px); transition: all 0.25s ease; max-width: 340px; }
.toast.show { opacity: 1; transform: none; }
.toast-xp { background: var(--accent); color: #111; }
.toast-error { background: var(--err); }
.modal-wrap { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal { background: #fff; border-radius: 20px; padding: 1.6rem; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: pop 0.25s ease; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.reward-icon { font-size: 4rem; }
.reward-row { display: flex; gap: 0.7rem; align-items: center; text-align: left; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.reward-row-icon { font-size: 2rem; }
.reward-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--warn); font-size: 0.8rem; }
.modal-close { margin-top: 0.8rem; }
.confetti { position: fixed; top: -12px; width: 10px; height: 16px; z-index: 300; pointer-events: none; animation: fall 2.4s linear forwards; border-radius: 2px; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0.4; } }

/* responsivo */
@media (max-width: 900px) {
  .home-grid, .journal-grid, .day-layout, .code-ui, .web-ui, .robot-ui, .match-ui, .test-cmp { grid-template-columns: 1fr; }
  .steps-rail { position: static; }
  .steps-rail ol { flex-direction: row; flex-wrap: wrap; }
  .step-btn { padding: 0.35rem 0.5rem; }
  .step-sub { display: none; }
  .topbar { flex-wrap: wrap; gap: 0.4rem 0.8rem; padding: 0.5rem 0.8rem; }
  .brand { order: 1; }
  .hero-chip { order: 2; margin-left: auto; gap: 0.4rem; }
  .nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 0.15rem; }
  .nav a { padding: 0.35rem 0.55rem; font-size: 0.9rem; white-space: nowrap; }
  .hero-meta { min-width: 0; }
  .hero-level { display: none; }
  .brand-text { display: none; }
  .switch-label { display: none; }
  .switch-btn { padding: 0.3rem 0.5rem; }
  .typing-text { font-size: 1.2rem; }
  .kb { display: none; }
}
@media print {
  .topbar, .footer, .no-print, .toast-root { display: none !important; }
  body { background: #fff; }
  .cert-border { border-color: #000; }
}

/* história em cartões (trilha Júnior) */
.story-cards { display: flex; flex-direction: column; gap: 0.8rem; }
.story-card { background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 1.4rem 1.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; text-align: center; min-height: 240px; justify-content: center; }
.story-card.pop { animation: story-pop 0.35s ease; }
@keyframes story-pop { from { transform: scale(0.96); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
.story-figure { font-size: 4.5rem; line-height: 1.1; letter-spacing: 0.1em; }
.story-text { font-size: 1.35rem; line-height: 1.5; max-width: 34rem; font-weight: 600; }
.story-text p { margin: 0.2rem 0; }
.story-question { width: 100%; max-width: 34rem; text-align: left; }
.story-question .q-text { font-size: 1.1rem; font-weight: 800; }
.story-question .opt { font-size: 1.05rem; padding: 0.7rem 1rem; }
.story-nav { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.story-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.story-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.story-dot.on { background: var(--primary); }
@media (max-width: 900px) {
  .story-figure { font-size: 3.2rem; }
  .story-text { font-size: 1.15rem; }
}


/* ---------- kit visual Júnior: estrelas, sons, figurinhas, caminho, mini-jogos ---------- */
.stars { color: var(--accent); letter-spacing: 0.05em; font-size: 1.05em; }
.stars .stars-off { color: var(--line); }
.step-stars { display: block; margin-top: 2px; }
.sound-btn { padding: 0.3rem 0.5rem; font-size: 1rem; }
.sticker-reward { text-align: center; }
.sticker-big { font-size: 5rem; line-height: 1.1; display: inline-block; animation: sticker-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1); }
.sticker-big.shine { filter: drop-shadow(0 0 14px #FBBF24); animation: sticker-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1), shine-pulse 1.6s ease-in-out 0.7s infinite alternate; }
@keyframes sticker-in { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shine-pulse { from { filter: drop-shadow(0 0 6px #FBBF24); } to { filter: drop-shadow(0 0 22px #F59E0B); } }
.album-world { margin-bottom: 1rem; border-top: 4px solid var(--world-color); }
.album-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.album-icon { font-size: 2.2rem; }
.album-head h2 { font-size: 1.15rem; margin: 0; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.6rem; }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.6rem 0.3rem; border-radius: 14px; background: var(--surface-2); border: 2px dashed var(--line); }
.sticker.earned { border-style: solid; border-color: var(--world-color); background: #fff; animation: sticker-in 0.5s ease; }
.sticker.earned.shine { box-shadow: 0 0 0 3px #FDE68A, 0 0 18px #FBBF24; }
.sticker.missing .sticker-emoji { color: var(--line); font-weight: 900; }
.sticker-emoji { font-size: 2.2rem; line-height: 1.1; }
.sticker-day { font-size: 0.7rem; font-weight: 800; color: var(--muted); }

/* caminho do mundo (Júnior) */
.day-trail { list-style: none; padding: 0.5rem 0 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; position: relative; max-width: 620px; margin-inline: auto; }
.day-trail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; border-radius: 3px; background: var(--line); transform: translateX(-50%); }
.trail-node { position: relative; display: flex; justify-content: flex-start; padding-left: 0; }
.trail-node.odd { justify-content: flex-end; }
.trail-stop { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); width: 50%; padding: 0.2rem 0.4rem; }
.trail-node.odd .trail-stop { flex-direction: row-reverse; text-align: right; }
a.trail-stop:hover { text-decoration: none; }
.trail-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); border: 4px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; flex-shrink: 0; box-shadow: var(--shadow); position: relative; z-index: 1; }
.trail-node.access-done .trail-circle { border-color: var(--ok); background: var(--ok-soft); }
.trail-node.access-open .trail-circle { border-color: var(--world-color); box-shadow: 0 0 0 5px color-mix(in srgb, var(--world-color) 30%, transparent), var(--shadow); animation: bounce 1.4s ease-in-out infinite; }
.trail-node.kind-boss .trail-circle { width: 80px; height: 80px; font-size: 2.4rem; border-color: #F59E0B; background: linear-gradient(180deg, #FFF7ED, #FDE68A); }
.trail-node.access-locked_prev .trail-stop, .trail-node.access-locked_today .trail-stop { opacity: 0.55; }
.trail-label { display: flex; flex-direction: column; line-height: 1.2; }
.trail-label .small { color: var(--muted); }
.trail-label .day-flag { position: static; display: inline-block; margin-top: 0.2rem; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* jogo do mouse */
.tap-game { display: flex; flex-direction: column; gap: 0.6rem; }
.tap-bar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.tap-count { font-weight: 900; font-size: 1.2rem; }
.tap-time { margin-left: auto; font-family: var(--mono); }
.tap-arena { position: relative; height: 320px; border-radius: 16px; background: linear-gradient(180deg, #E0F2FE, #FEF3C7); border: 3px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; user-select: none; }
.tap-arena.shake { animation: shake 0.3s; }
.tap-target { position: absolute; width: 64px; height: 64px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 2rem; cursor: pointer; animation: sticker-in 0.25s ease; }
.tap-target:hover { transform: scale(1.08); }
.tap-target.pop { animation: pop-out 0.15s ease forwards; }
@keyframes pop-out { to { transform: scale(1.6); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.tap-result, .drag-result { background: var(--primary-soft); padding: 0.8rem 1rem; border-radius: 14px; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.tap-final { font-size: 1.05rem; }

/* arraste e solte */
.drag-game { display: flex; flex-direction: column; gap: 0.8rem; }
.drag-pool { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 56px; padding: 0.6rem; border-radius: 14px; background: var(--surface-2); border: 2px dashed var(--line); }
.drag-item { font: inherit; font-weight: 700; font-size: 1.05rem; padding: 0.5rem 0.9rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: grab; box-shadow: var(--shadow); }
.drag-item.selected { border-color: var(--primary); background: var(--primary-soft); }
.drag-item.dragging { opacity: 0.5; }
.drag-item.wrong { animation: shake 0.3s; border-color: var(--err); }
.drag-item.placed { cursor: default; border-color: var(--ok); background: var(--ok-soft); box-shadow: none; }
.drag-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.7rem; }
.drag-bin { border: 3px solid var(--line); border-radius: 16px; background: #fff; min-height: 140px; padding: 0.6rem; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drag-bin.over { border-color: var(--primary); background: var(--primary-soft); }
.drag-bin.shake { animation: shake 0.3s; border-color: var(--err); }
.drag-bin-head { display: flex; align-items: center; gap: 0.4rem; font-weight: 900; margin-bottom: 0.5rem; }
.drag-bin-icon { font-size: 1.6rem; }
.drag-bin-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
@media (max-width: 900px) {
  .tap-arena { height: 260px; }
  .trail-circle { width: 54px; height: 54px; font-size: 1.6rem; }
}
