/* =====================================================================
   JINDANJI — Design system da PWA
   Barro (clay) · Savana (dourado) · Terracota · Verde-folha do logótipo
   Títulos: Fraunces · Texto: Nunito · Ícones SVG duotone (icons.js)
   ===================================================================== */
:root {
  --bg: #FDF8F1;
  --bg-2: #F6ECDD;
  --surface: #FFFFFF;
  --surface-2: #FBF4EA;
  --line: #EEDFC9;
  --text: #3B2415;
  --text-2: #5E3F2A;
  --muted: #86695A;
  --brown: #3B2415;
  --brown-2: #56331D;
  --gold: #E7A948;
  --gold-2: #D48A2A;
  --gold-soft: #FBEBC9;
  --terra: #B84A22;
  --terra-2: #963A18;
  --terra-soft: #F7DFD2;
  --green: #2F5D34;
  --green-2: #3E7A44;
  --green-soft: #DDEBD8;
  --track: #F0E4D2;
  --ic-d: var(--gold);
  --ic-w: #fff;
  --shadow-sm: 0 2px 8px rgba(59, 36, 21, .06);
  --shadow: 0 10px 30px -12px rgba(59, 36, 21, .22);
  --shadow-lg: 0 24px 60px -20px rgba(59, 36, 21, .38);
  --radius: 24px;
  --radius-sm: 14px;
  --fs: 16px;
  --reader-fs: 1.18rem;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C98A2B' stroke-opacity='.14' stroke-width='1.6'%3E%3Cpath d='M0 28 14 14l14 14 14-14 14 14M0 56l14-14 14 14 14-14 14 14'/%3E%3Ccircle cx='28' cy='6' r='2'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
html[data-theme="noite"] {
  --bg: #16100B; --bg-2: #1F1710; --surface: #241A12; --surface-2: #2B2017; --line: #3A2B1E;
  --text: #F7EBD8; --text-2: #E2CDB2; --muted: #BCA389; --brown: #0F0A06; --brown-2: #2A1D13;
  --gold: #F0B85A; --gold-soft: #3A2A14; --terra: #E2804F; --terra-soft: #3B2016; --green: #7DBB77; --green-2: #95CC8E; --green-soft: #1E2E1C;
  --track: #33261A; --ic-w: #241A12;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3); --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
html[data-theme="savana"] {
  --bg: #F5F7EE; --bg-2: #E8EEDB; --surface: #FFFFFF; --surface-2: #F2F6E9; --line: #DCE5CB;
  --text: #22301C; --text-2: #3C4F31; --muted: #637257; --brown: #22301C; --brown-2: #34452B; --track: #E3EAD4;
}
html[data-font="s"] { --fs: 14px; --reader-fs: 1.02rem; }
html[data-font="l"] { --fs: 18px; --reader-fs: 1.32rem; }
html[data-font="xl"] { --fs: 20px; --reader-fs: 1.52rem; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6;
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }
img { max-width: 100%; display: block; }
a { color: var(--terra); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5rem; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8rem; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-soft); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center-x { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.narrow { max-width: 780px; margin: 0 auto; }
.link { font-weight: 800; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.link .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link:hover .ic { transform: translateX(3px); }

/* ---------- Ícones ---------- */
.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; display: inline-block; vertical-align: -.22em; overflow: visible; }
.ic .d { fill: var(--ic-d); stroke: none; }
.ic .f { fill: currentColor; stroke: none; }
.ic-star.on .d { fill: var(--gold); }
.ic-star.on { color: var(--gold-2); }
.ic-emoji { font-style: normal; }
.ic.ok { color: var(--green); }

/* ---------- Avatares ---------- */
.avatar {
  --av: var(--terra); --sz: 40px; width: var(--sz); height: var(--sz); border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center; color: #2B160A; position: relative;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--av) 55%, #fff), var(--av) 70%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 3px 10px -3px color-mix(in srgb, var(--av) 60%, transparent);
  --ic-d: rgba(255, 255, 255, .45); --ic-w: #fff;
}
.avatar .ic { width: 64%; height: 64%; }
.avatar.xs { --sz: 26px; } .avatar.sm { --sz: 34px; } .avatar.lg { --sz: 52px; } .avatar.xl { --sz: 76px; } .avatar.xxl { --sz: 108px; }
.avatar.halo { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--gold), var(--shadow); }
.avatar.dashed { background: var(--surface-2); border: 3px dashed var(--line); color: var(--muted); box-shadow: none; }
.avatar.pop { animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }

/* ---------- Splash ---------- */
.splash { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 14px; transition: opacity .5s var(--ease), visibility .5s; }
.splash-mark { width: 128px; height: 128px; border-radius: 40px; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-lg); animation: breathe 1.6s ease-in-out infinite alternate; }
.splash-mark img { width: 96px; }
.splash-name { font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--gold-2); letter-spacing: .02em; }
.splash-bar { width: 120px; height: 4px; border-radius: 9px; background: var(--track); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--gold), var(--terra)); border-radius: 9px; animation: load 1.1s ease-in-out infinite; }
.splash.out { opacity: 0; visibility: hidden; }
@keyframes breathe { from { transform: scale(.96) rotate(-2deg); } to { transform: scale(1.03) rotate(2deg); } }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem;
  padding: calc(10px + env(safe-area-inset-top)) clamp(14px, 3vw, 28px) 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.topbar.scrolled { box-shadow: 0 6px 24px -14px rgba(59, 36, 21, .35); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, var(--gold-soft), #fff); display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .4s var(--spring); }
html[data-theme="noite"] .brand-mark { background: #FDF6E9; }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.01em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.icon-btn { background: none; border: 0; width: 42px; height: 42px; border-radius: 14px; cursor: pointer; color: var(--text); display: grid; place-items: center; transition: background .2s, transform .2s var(--spring); }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn:active { transform: scale(.9); }
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn.round { border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); }
.icon-btn.danger:hover { color: #B23A2B; border-color: #B23A2B; }
.chip-btn { border: 1.5px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; font-weight: 800; cursor: pointer; color: var(--text); font-size: .88rem; transition: all .2s; }
.chip-btn:hover { border-color: var(--terra); color: var(--terra); }
.points-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--brown); font-weight: 900; font-size: .9rem; }
html[data-theme="noite"] .points-chip { color: var(--gold); }
.points-chip .ic { width: 18px; height: 18px; }
.profile-btn { display: flex; align-items: center; gap: 8px; border: 0; background: var(--surface); padding: 4px 12px 4px 4px; border-radius: 999px; cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .2s var(--spring); }
.profile-btn:hover { transform: translateY(-1px); }
.profile-btn .avatar { --sz: 36px; }
.pb-t { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.pb-t b { font-size: .88rem; } .pb-t small { font-size: .72rem; color: var(--muted); font-weight: 700; }
@media (max-width: 560px) { .pb-t { display: none; } .profile-btn { padding: 3px; } .points-chip { padding: 5px 10px; } }
.offline-pill { background: var(--terra); color: #fff; font-size: .72rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Layout ---------- */
.layout { display: flex; max-width: 1360px; margin: 0 auto; }
.main { flex: 1; min-width: 0; outline: none; }
.view { padding: 18px clamp(14px, 3vw, 32px) 48px; max-width: 1100px; margin: 0 auto; }
.view.enter { animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Sidebar / gaveta */
.sidebar { width: 268px; flex-shrink: 0; padding: 16px 14px 24px; position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; scrollbar-width: thin; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav li a { position: relative; display: flex; align-items: center; gap: .8rem; padding: 9px 12px; border-radius: 16px; color: var(--text-2); font-weight: 800; transition: background .25s, color .25s, transform .25s var(--ease); }
.nav .n-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .35s var(--spring), background .25s; }
.nav .n-ic .ic { width: 22px; height: 22px; }
.nav li a:hover { background: var(--surface); transform: translateX(4px); color: var(--text); }
.nav li a:hover .n-ic { transform: rotate(-8deg) scale(1.08); }
.nav li a.active { background: var(--brown); color: #fff; box-shadow: var(--shadow); }
.nav li a.active .n-ic { background: rgba(255, 255, 255, .1); color: var(--gold); box-shadow: none; --ic-d: rgba(231, 169, 72, .35); }
.nav li a.active::after { content: ""; position: absolute; right: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.nav li a.soft { color: var(--muted); }
.nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 18px 14px 6px; font-weight: 900; }
.nav-label:empty { padding: 8px 0; }
.nav-profile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text); margin-bottom: 14px; transition: transform .25s var(--ease); }
.nav-profile:hover { transform: translateY(-2px); }
.nav-profile b { display: block; font-family: var(--display); font-size: 1.05rem; }
.nav-profile span { font-size: .78rem; color: var(--muted); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.nav-profile .swap { color: var(--muted); width: 18px; height: 18px; }
.nav-cta { padding: 16px; border-radius: 20px; background: linear-gradient(145deg, var(--gold-soft), var(--surface)); border: 1px solid var(--line); margin-bottom: 14px; }
.nav-cta b { font-family: var(--display); display: block; font-size: 1.05rem; }
.nav-cta span { font-size: .84rem; color: var(--muted); display: block; margin: 4px 0 10px; }
.drawer-head img { width: 170px; margin: 0 auto 14px; }
.scrim { position: fixed; inset: 0; background: rgba(28, 16, 8, .45); z-index: 39; backdrop-filter: blur(3px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.only-mobile { display: none; }
@media (max-width: 1023px) {
  .only-mobile { display: grid; }
  .drawer-head.only-mobile { display: block; }
  .sidebar { position: fixed; left: 10px; top: 10px; bottom: 10px; height: auto; z-index: 40; background: var(--bg); transform: translateX(calc(-100% - 20px)); transition: transform .45s var(--ease); width: min(310px, 86vw); border-radius: 28px; box-shadow: var(--shadow-lg); padding-top: calc(18px + env(safe-area-inset-top)); }
  .sidebar.open { transform: none; }
  .sidebar.open .nav li { animation: slideIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

/* Dock flutuante (telemóvel) */
.dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  display: flex; gap: 2px; padding: 7px; width: min(94vw, 480px);
  background: color-mix(in srgb, var(--brown) 94%, transparent); backdrop-filter: blur(12px); border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgba(28, 16, 8, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: dockIn .7s var(--spring) .2s both;
}
@keyframes dockIn { from { transform: translate(-50%, 140%); } to { transform: translate(-50%, 0); } }
.dock a { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; border-radius: 999px; color: rgba(255, 244, 226, .62); font-size: .7rem; font-weight: 800; transition: color .25s; }
.dock .d-ic { display: grid; place-items: center; transition: transform .35s var(--spring); }
.dock .d-ic .ic { width: 23px; height: 23px; --ic-d: rgba(255, 244, 226, .18); }
.dock a.active { color: #fff; }
.dock a.active .d-ic { transform: translateY(-2px) scale(1.1); }
.dock a.active .d-ic .ic { color: var(--gold); --ic-d: rgba(231, 169, 72, .35); }
.dock a:active .d-ic { transform: scale(.85); }
.dock-ind { position: absolute; top: 7px; bottom: 7px; left: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); transition: transform .45s var(--spring), width .45s var(--spring), opacity .3s; opacity: 0; }
.dock-ind::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--gold); }
@media (min-width: 1024px) { .dock { display: none; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 0; cursor: pointer;
  background: var(--terra); color: #fff; font-weight: 800; padding: 13px 22px; border-radius: 999px; font-size: 1rem; line-height: 1.2;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--terra) 70%, transparent); transition: transform .25s var(--spring), box-shadow .25s, filter .2s, background .2s;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn .ic { width: 20px; height: 20px; --ic-d: rgba(255, 255, 255, .3); transition: transform .3s var(--spring); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--terra) 75%, transparent); }
.btn:hover .ic-arrowRight { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover::after { transform: translateX(120%); }
.btn.green { background: var(--green); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--green) 70%, transparent); }
.btn.gold { background: var(--gold); color: var(--brown); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--gold-2) 80%, transparent); }
.btn.gold .ic { --ic-d: rgba(59, 36, 21, .2); }
.btn.white { background: #fff; color: var(--brown); box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .5); }
.btn.white .ic { --ic-d: var(--gold); }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost .ic { --ic-d: var(--gold-soft); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--terra); color: var(--terra); }
.btn.sm { padding: 9px 16px; font-size: .9rem; }
.btn.sm .ic { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn.playing { background: var(--terra); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 16px; }
.eq i { width: 3px; background: #fff; border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* ---------- Etiquetas, chips ---------- */
.pill-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--bg-2); color: var(--text-2); }
.pill-tag .ic { width: 16px; height: 16px; }
.pill-tag.gold { background: var(--gold); color: var(--brown); --ic-d: rgba(255, 255, 255, .45); }
.pill-tag.green { background: var(--green-soft); color: var(--green); }
.pill-tag b { font-weight: 900; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); padding: 8px 15px; border-radius: 999px; font-weight: 800; cursor: pointer; font-size: .9rem; color: var(--text-2); white-space: nowrap; transition: all .25s var(--ease); }
.chip .ic { width: 18px; height: 18px; }
.chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.chip.on { background: var(--brown); border-color: var(--brown); color: #fff; box-shadow: var(--shadow); }
.chip.on .ic { color: var(--gold); --ic-d: rgba(231, 169, 72, .3); }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .ic { width: 18px; height: 18px; color: var(--line); --ic-d: transparent; }
.stars .ic.on { color: var(--gold-2); --ic-d: var(--gold); }
.stars.sm .ic { width: 14px; height: 14px; }

/* ---------- Cartões e secções ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.section { margin: 38px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; }
.h-ic { width: 42px; height: 42px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--gold-soft); color: var(--brown); flex-shrink: 0; }
html[data-theme="noite"] .h-ic { color: var(--gold); }
.h-ic .ic { width: 24px; height: 24px; --ic-d: var(--gold); }
.card h2 .h-ic, .card > h2 { display: flex; align-items: center; gap: 12px; }
.see-all { font-weight: 800; display: inline-flex; align-items: center; gap: 4px; color: var(--terra); border-bottom: 2px solid currentColor; padding-bottom: 1px; }
.see-all .ic { width: 16px; height: 16px; transition: transform .25s; }
.see-all:hover .ic { transform: translateX(3px); }
.page-head { margin: 8px 0 24px; }
.page-head .pill-tag { margin-bottom: 12px; }
.page-head h1 { margin-bottom: 8px; }

/* Revelar ao fazer scroll */
.rv { opacity: 0; transform: translateY(22px) scale(.985); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 34px; min-height: 440px; color: #fff; display: flex; align-items: flex-end; box-shadow: var(--shadow-lg); isolation: isolate; }
.hero-scene, .hero .sh-art svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(34, 18, 8, .88) 0%, rgba(34, 18, 8, .55) 50%, rgba(34, 18, 8, .05) 100%), linear-gradient(0deg, rgba(34, 18, 8, .55), transparent 55%); }
.hero-in { padding: clamp(26px, 5vw, 56px); max-width: 640px; }
.hero h1 { color: #fff; margin: 16px 0 12px; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p { font-size: 1.1rem; opacity: .92; max-width: 540px; }
.hero .row { margin-top: 20px; }
.hero-stats { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--gold); }
.hero-stats span { font-size: .84rem; opacity: .85; font-weight: 700; }
@media (min-width: 900px) { .hero-stats { width: max-content; max-width: calc(100vw - 420px); } }
.hero-stats .hs-live { padding-left: 28px; border-left: 1.5px solid rgba(255, 255, 255, .22); }
.hero-stats .hs-live span { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7DDB77; box-shadow: 0 0 0 0 rgba(125, 219, 119, .6); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(125, 219, 119, 0); } 100% { box-shadow: 0 0 0 0 rgba(125, 219, 119, 0); } }
.hero-scene .sun, .cover-art .sun { transform-origin: center; transform-box: fill-box; animation: sunGlow 5s ease-in-out infinite alternate; }
.hero-scene .birds, .cover-art .birds { animation: birds 14s linear infinite; }
.hero-scene .fire { animation: flicker 1.2s ease-in-out infinite alternate; }
.cover-art .twinkle { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes sunGlow { from { transform: scale(.94); opacity: .85; } to { transform: scale(1.06); opacity: 1; } }
@keyframes birds { from { transform: translateX(-60px); } to { transform: translateX(120px); } }
@keyframes flicker { from { opacity: .6; } to { opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@media (max-width: 640px) {
  .hero { min-height: 520px; border-radius: 28px; }
  .hero::before { background: linear-gradient(0deg, rgba(34, 18, 8, .95) 10%, rgba(34, 18, 8, .55) 55%, rgba(34, 18, 8, .1)); }
  .hero .row .btn { flex: 1 1 auto; }
}

/* Conto de hoje / destaque */
.story-hero { min-height: 400px; }
.story-hero .sh-art { position: absolute; inset: 0; z-index: -2; }
.story-hero .sh-art svg { transform: scale(1.02); animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-2%, -1%); } }
.feature-story { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s; }
.feature-story:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.fs-art { min-height: 280px; overflow: hidden; }
.fs-art svg { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.feature-story:hover .fs-art svg { transform: scale(1.06); }
.fs-body { padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.fs-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 14px 0 10px; }
.fs-body p { color: var(--muted); }
@media (max-width: 760px) { .feature-story { grid-template-columns: 1fr; } .fs-art { min-height: 200px; } }

/* ---------- Explorar categorias ---------- */
.explore { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cat-card { position: relative; display: block; border-radius: 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s; }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.cat-art { height: 150px; overflow: hidden; }
.cat-art svg { width: 100%; height: 100%; transition: transform .9s var(--ease); }
.cat-card:hover .cat-art svg { transform: scale(1.08); }
.cat-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px 16px; }
.cat-body h3 { margin: 0; font-size: 1.15rem; }
.cat-body p { margin: 0; font-size: .84rem; color: var(--muted); }
.cat-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); color: var(--brown); flex-shrink: 0; margin-top: -34px; box-shadow: 0 0 0 4px var(--surface); }
.cat-ic .ic { width: 24px; height: 24px; }
.cat-body .go { margin-left: auto; color: var(--muted); transition: transform .3s var(--spring), color .3s; }
.cat-card:hover .go { transform: translateX(4px); color: var(--terra); }

/* ---------- Funcionalidades ---------- */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { padding: 22px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature h3 { margin: 14px 0 6px; }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; }
.f-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; transition: transform .45s var(--spring); }
.f-ic .ic { width: 30px; height: 30px; }
.feature:hover .f-ic { transform: rotate(-8deg) scale(1.08); }
.f-ic.c1 { background: var(--terra-soft); color: var(--terra); --ic-d: color-mix(in srgb, var(--terra) 30%, transparent); }
.f-ic.c2 { background: #DCEAF2; color: #2B6E8C; --ic-d: #9CC7DC; }
.f-ic.c3 { background: var(--green-soft); color: var(--green); --ic-d: color-mix(in srgb, var(--green) 30%, transparent); }
.f-ic.c4 { background: var(--gold-soft); color: var(--gold-2); }
html[data-theme="noite"] .f-ic.c2 { background: #16283a; color: #7fc0e0; --ic-d: #25455f; }

/* ---------- Cartões de conto ---------- */
.story-card { position: relative; display: flex; flex-direction: column; color: var(--text); background: var(--surface); border-radius: 26px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s; }
.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.story-cover { position: relative; height: 158px; overflow: hidden; }
.story-cover .cover-art { width: 100%; height: 100%; display: block; transition: transform .9s var(--ease); }
.story-card:hover .cover-art { transform: scale(1.08); }
.story-card:hover .cover-art .emblem { animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.read-badge { position: absolute; top: 12px; right: 12px; display: inline-flex; gap: 4px; align-items: center; background: var(--green); color: #fff; font-size: .74rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.read-badge .ic { width: 14px; height: 14px; }
.story-cover .cat { position: absolute; left: 12px; top: 12px; display: inline-flex; gap: 5px; align-items: center; background: rgba(255, 255, 255, .92); color: #3B2415; font-size: .72rem; font-weight: 900; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.story-cover .cat .ic { width: 15px; height: 15px; }
.story-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.story-body h3 { margin: 0; font-size: 1.14rem; }
.story-body p { font-size: .9rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); font-weight: 800; margin-top: auto; padding-top: 8px; }
.story-meta span { display: inline-flex; align-items: center; gap: 4px; }
.story-meta .ic { width: 15px; height: 15px; --ic-d: var(--gold-soft); }
.story-meta .rt { color: var(--gold-2); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 290px); gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.hscroll > * { scroll-snap-align: start; }

/* ---------- Conselheiro (teaser) ---------- */
.advisor-teaser { display: flex; gap: 24px; align-items: center; background: linear-gradient(145deg, var(--gold-soft), var(--surface) 70%); padding: clamp(22px, 4vw, 36px); border-radius: 30px; }
.advisor-teaser h2 { color: var(--gold-2); }
.advisor-teaser .quote { font-size: 1.08rem; color: var(--text-2); }
.at-avatar .avatar { animation: breathe 3s ease-in-out infinite alternate; }
@media (max-width: 640px) { .advisor-teaser { flex-direction: column; text-align: center; } .advisor-teaser .chips { justify-content: center; } }

/* ---------- Provérbio ---------- */
.proverb { display: flex; gap: 20px; align-items: flex-start; padding: clamp(22px, 4vw, 36px); border-radius: 30px; background: var(--brown); color: #F8EAD3; background-image: var(--pattern); position: relative; overflow: hidden; }
.proverb .pv-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--gold); flex-shrink: 0; }
.proverb .pv-ic .ic { width: 32px; height: 32px; --ic-d: rgba(231, 169, 72, .3); }
.proverb q { display: block; font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.3; margin: 14px 0 10px; color: #fff; quotes: "«" "»"; }
.proverb p { margin: 0; opacity: .8; }

/* ---------- Testemunhos, CTA, rodapé ---------- */
.testi { position: relative; }
.testi .q { position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; color: var(--gold-soft); --ic-d: var(--gold-soft); }
.testi p { font-size: 1rem; color: var(--text-2); font-style: italic; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: clamp(22px, 4vw, 40px); border-radius: 30px; background: linear-gradient(120deg, var(--terra), #D56A2F 60%, var(--gold)); color: #fff; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; } .cta-band p { margin: 0; opacity: .92; max-width: 560px; }
.foot { text-align: center; padding: 30px 0 10px; color: var(--muted); }
.foot img { width: 170px; margin: 0 auto 8px; }
.foot .row { gap: 18px; margin: 12px 0; } .foot a { color: var(--text-2); font-weight: 800; font-size: .9rem; }

/* ---------- Início (dashboard) ---------- */
.greet { display: flex; align-items: center; gap: 18px; margin: 6px 0 22px; }
.greet h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.level-card { display: flex; gap: 16px; align-items: center; }
.level-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex-shrink: 0; }
.level-ic .ic { width: 36px; height: 36px; --ic-d: color-mix(in srgb, var(--green) 30%, transparent); }
.pbar { height: 12px; background: var(--track); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.pbar > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--gold)); width: 0; transition: width 1.2s var(--ease); animation: grow 1.4s var(--ease); position: relative; }
.pbar > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shine 2.6s ease-in-out infinite; }
@keyframes grow { from { width: 0; } }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.pbar.thin { height: 6px; margin: 6px 0 0; }
.pbar.big { height: 16px; }
.ring { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-fill { transition: stroke-dashoffset 1.6s var(--ease); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .ring-label b { font-family: var(--display); font-size: 1.6rem; line-height: 1; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-weight: 800; font-size: .9rem; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }
.inp { position: relative; }
.inp > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); --ic-d: var(--gold-soft); pointer-events: none; transition: color .2s; }
.inp input { padding-left: 44px; }
.inp:focus-within > .ic { color: var(--terra); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field.err input, .field.err textarea, .field.err select { border-color: #B23A2B; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.field .err-msg { color: #B23A2B; font-size: .85rem; font-weight: 800; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.seg { display: inline-flex; background: var(--bg-2); padding: 5px; border-radius: 999px; gap: 4px; flex-wrap: wrap; max-width: 100%; }
.seg.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 8px 15px; border-radius: 999px; font-weight: 800; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .25s var(--ease); }
.seg button .ic { width: 18px; height: 18px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg .avatar { --sz: 24px; }

/* ---------- Autenticação ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface); border-radius: 32px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); min-height: 620px; }
.auth-art { position: relative; overflow: hidden; color: #fff; display: flex; align-items: flex-end; isolation: isolate; }
.auth-art .hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(34, 18, 8, .9), rgba(34, 18, 8, .1) 70%); }
.auth-art-in { padding: 34px; }
.auth-art-in img { width: 64px; background: #FDF6E9; border-radius: 20px; padding: 6px; margin-bottom: 16px; }
.auth-art-in h2 { color: #fff; font-size: 2rem; }
.auth-form { padding: clamp(24px, 5vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.auth-form .logo { width: 180px; margin-bottom: 10px; }
.auth-form h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-art { min-height: 190px; } .auth-art-in p { display: none; } .auth-form .logo { display: none; } }

/* ---------- Perfis ---------- */
.profiles { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; }
.profile-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font-weight: 800; color: var(--text); font-size: 1.05rem; }
.profile-tile .avatar { transition: transform .45s var(--spring), box-shadow .3s; }
.profile-tile:hover .avatar { transform: translateY(-6px) scale(1.06) rotate(-3deg); box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--gold), var(--shadow-lg); }
.profile-tile b { font-family: var(--display); font-size: 1.15rem; }
.profile-tile small { color: var(--muted); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; font-size: .82rem; }
.profile-tile small .ic { width: 16px; height: 16px; }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.avatar-pick button { aspect-ratio: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px; cursor: pointer; color: var(--text-2); transition: all .25s var(--spring); }
.avatar-pick button .ic { width: 100%; height: 100%; }
.avatar-pick button:hover { transform: scale(1.08); }
.avatar-pick button.on { border-color: var(--terra); background: var(--terra-soft); color: var(--terra); transform: scale(1.08); }
.color-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.color-pick button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; transition: transform .25s var(--spring); }
.color-pick button.on { box-shadow: 0 0 0 3px var(--text); transform: scale(1.1); }

/* ---------- Biblioteca ---------- */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; padding: 16px; border-radius: 26px; background: var(--surface-2); }
.search { position: relative; }
.search .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); }
.search input { width: 100%; padding: 15px 18px 15px 50px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sel { position: relative; flex: 1; min-width: 150px; }
.sel .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.sel select { width: 100%; appearance: none; padding: 11px 32px 11px 38px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2386695A' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; font-weight: 700; cursor: pointer; }
.result-count { margin: 0 0 12px; font-weight: 800; }

/* ---------- Leitor ---------- */
.reader { max-width: 800px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); margin-bottom: 14px; }
.back-link .ic { width: 18px; height: 18px; transition: transform .25s; }
.back-link:hover .ic { transform: translateX(-3px); }
.reader-cover { position: relative; border-radius: 32px; overflow: hidden; min-height: 380px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-lg); isolation: isolate; }
.rc-art { position: absolute; inset: 0; z-index: -2; }
.rc-art svg { width: 100%; height: 100%; animation: kenburns 20s ease-in-out infinite alternate; }
.reader-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(30, 16, 7, .92) 5%, rgba(30, 16, 7, .35) 55%, transparent); }
.rc-in { padding: clamp(22px, 4vw, 36px); width: 100%; }
.rc-in h1 { color: #fff; margin: 14px 0 12px; }
.rc-meta { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 800; font-size: .88rem; opacity: .92; }
.rc-meta span { display: inline-flex; gap: 6px; align-items: center; }
.rc-meta .ic { width: 18px; height: 18px; --ic-d: rgba(255, 255, 255, .25); }
.rc-rating { margin-top: 12px; font-size: .92rem; }
.rc-rating .muted { color: rgba(255, 255, 255, .7); }
.reader-tools { position: sticky; top: 70px; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; margin: 16px 0 6px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.reader-tools .icon-btn { margin-left: auto; }
.lead { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--text-2); margin: 20px 0; }
.story-text { font-size: var(--reader-fs); line-height: 1.85; }
.story-text p { margin: 0 0 1.1em; padding: 6px 12px; margin-left: -12px; margin-right: -12px; border-radius: 14px; transition: background .4s, box-shadow .4s; }
.story-text p:first-child::first-letter { font-family: var(--display); font-size: 3.6em; float: left; line-height: .85; margin: 8px 10px 0 0; color: var(--terra); font-weight: 800; }
.story-text p.speaking { background: var(--gold-soft); box-shadow: inset 4px 0 0 var(--gold); }
.ornament { display: flex; justify-content: center; align-items: center; gap: 14px; color: var(--gold-2); margin: 24px 0; }
.ornament::before, .ornament::after { content: ""; height: 2px; width: 80px; background: linear-gradient(90deg, transparent, var(--line)); }
.ornament::after { transform: scaleX(-1); }
.ornament .ic { width: 34px; height: 34px; }
.moral { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(145deg, var(--gold-soft), var(--surface)); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.moral .m-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--gold); color: var(--brown); flex-shrink: 0; }
.moral .m-ic .ic { width: 28px; height: 28px; --ic-d: rgba(255, 255, 255, .5); }
.moral p { margin: 0; font-size: 1.08rem; }
.progress-read { position: fixed; top: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--green), var(--gold), var(--terra)); z-index: 60; width: 0; transition: width .1s; border-radius: 0 4px 4px 0; }
.quiz-q { margin-bottom: 20px; }
.quiz-q h4 { font-family: var(--font); font-size: 1.02rem; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.qn { width: 28px; height: 28px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; font-size: .8rem; flex-shrink: 0; }
.quiz-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 11px 14px; margin: 8px 0; cursor: pointer; font-weight: 700; transition: all .25s var(--ease); }
.quiz-opt .ol { width: 28px; height: 28px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; font-weight: 900; font-size: .85rem; flex-shrink: 0; transition: all .25s; }
.quiz-opt:hover:not(:disabled) { border-color: var(--gold); transform: translateX(4px); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.right { border-color: #2E8B57; background: #E6F6EC; color: #1E5C39; animation: pop .4s var(--spring); }
.quiz-opt.right .ol { background: #2E8B57; color: #fff; }
.quiz-opt.wrong { border-color: #B23A2B; background: #FDECEA; color: #8B1E12; animation: shake .35s; }
.quiz-opt.wrong .ol { background: #B23A2B; color: #fff; }
.talk { background: var(--surface-2); background-image: var(--pattern); }
.talk ol { padding-left: 1.3rem; margin: 0; } .talk li { margin: 10px 0; font-weight: 800; font-size: 1.04rem; }
.big-num { font-family: var(--display); font-size: 3rem; font-weight: 800; line-height: 1; }
.rating-bars { margin-top: 10px; }
.rating-bars .bar { display: grid; grid-template-columns: 34px 1fr 26px; gap: 8px; align-items: center; font-size: .84rem; font-weight: 800; margin: 4px 0; }
.rating-bars .bar span:first-child { display: inline-flex; align-items: center; gap: 2px; }
.rating-bars .ic { width: 14px; height: 14px; }
.bar-track { height: 8px; background: var(--track); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 99px; animation: grow 1s var(--ease); }
.star-input { display: inline-flex; gap: 4px; flex-direction: row-reverse; }
.star-input button { background: none; border: 0; cursor: pointer; color: var(--line); padding: 0 2px; transition: transform .25s var(--spring), color .2s; }
.star-input button .ic { width: 38px; height: 38px; --ic-d: var(--bg-2); }
.star-input button:hover, .star-input button:hover ~ button { color: var(--gold-2); transform: scale(1.12); }
.star-input button:hover .ic, .star-input button:hover ~ button .ic, .star-input button.on .ic { --ic-d: var(--gold); }
.star-input button.on { color: var(--gold-2); }
.star-input button.pop { animation: pop .35s var(--spring); }
.review { display: flex; gap: 12px; padding: 14px 0; border-top: 1px dashed var(--line); }
.review p { margin: 4px 0; }

/* Recompensa */
.reward { text-align: center; padding: 8px 4px; }
.reward-ic { width: 110px; height: 110px; margin: 0 auto 10px; border-radius: 34px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--gold-2) 80%, transparent); animation: rewardIn .7s var(--spring); }
.reward-ic .ic { width: 62px; height: 62px; --ic-d: rgba(255, 255, 255, .5); }
.badge-glow { animation: rewardIn .7s var(--spring), glow 1.8s ease-in-out infinite alternate .7s; }
@keyframes rewardIn { from { transform: scale(.3) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes glow { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent); } to { box-shadow: 0 0 0 18px transparent; } }
.reward-pts { font-family: var(--display); font-size: 2.2rem; font-weight: 800; color: var(--green); margin: 4px 0; }
.badge-won { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 18px; background: var(--gold-soft); margin: 10px 0; }
.bw-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; color: var(--gold-2); flex-shrink: 0; }
.bw-ic .ic { width: 28px; height: 28px; }

/* ---------- Mapa ---------- */
.map-wrap { border-radius: 30px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
#map { height: min(66vh, 600px); z-index: 1; background: var(--bg-2); }
.map-off { height: 280px; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); background: var(--surface-2); text-align: center; padding: 20px; }
.map-off .ic { width: 80px; height: 80px; color: var(--gold-2); }
.map-pin { --pc: var(--terra); width: 44px; height: 44px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; background: var(--pc); border: 3px solid #fff; box-shadow: 0 8px 18px -4px rgba(0, 0, 0, .45); transition: transform .3s var(--spring); }
.map-pin span { transform: rotate(45deg); display: grid; place-items: center; color: #fff; }
.map-pin .ic { width: 22px; height: 22px; --ic-d: rgba(255, 255, 255, .35); --ic-w: var(--pc); }
.map-pin:hover { transform: rotate(-45deg) scale(1.15); }
.map-pin.done { border-color: var(--gold); }
.leaflet-popup-content-wrapper { border-radius: 18px !important; }
.pop { display: flex; flex-direction: column; gap: 3px; font-family: var(--font); }
.pop b { font-family: var(--display); font-size: 1.05rem; }
.pop em { color: var(--green); font-style: normal; font-weight: 800; }
.pop a { font-weight: 900; color: var(--terra); }
.country-card h3 { display: flex; gap: 8px; align-items: center; }
.country-link { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 800; color: var(--text); transition: transform .2s; }
.country-link:hover { transform: translateX(4px); color: var(--terra); }
.cl-ic { --pc: var(--terra); width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 18%, var(--surface)); color: var(--pc); flex-shrink: 0; }
.cl-ic .ic { width: 20px; height: 20px; --ic-d: color-mix(in srgb, var(--pc) 25%, transparent); }

/* ---------- Rotas ---------- */
.route-card { display: block; color: var(--text); border-radius: 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s; }
.route-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.route-head { --rc: var(--terra); padding: 22px; color: #fff; display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--rc), color-mix(in srgb, var(--rc) 55%, #1d0f06)); position: relative; overflow: hidden; }
.route-head::after { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .9; mix-blend-mode: overlay; }
.route-head > * { position: relative; z-index: 1; }
.r-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--rc); flex-shrink: 0; box-shadow: var(--shadow-sm); transition: transform .45s var(--spring); }
.r-ic .ic { width: 34px; height: 34px; --ic-d: color-mix(in srgb, var(--rc) 30%, transparent); }
.route-card:hover .r-ic { transform: rotate(-8deg) scale(1.08); }
.route-head h3, .route-head h1 { color: #fff; margin: 0; }
.route-head p { margin: 6px 0 0; opacity: .92; }
.route-body { padding: 16px 22px 20px; }
.route-card.big { margin-bottom: 26px; }
.route-card.big .route-head { padding: 30px; }
.route-card.big .r-ic { width: 76px; height: 76px; }
.route-card.big .r-ic .ic { width: 44px; height: 44px; }
.route-card.big:hover { transform: none; }
.route-badge { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px; border-radius: 18px; background: var(--gold-soft); }
.route-badge > span { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--gold-2); }
.route-badge .ic { width: 26px; height: 26px; }
.trail { list-style: none; padding: 0; margin: 0; position: relative; }
.trail::before { content: ""; position: absolute; left: 31px; top: 30px; bottom: 30px; border-left: 4px dotted var(--line); }
.trail li { position: relative; display: flex; gap: 16px; align-items: center; padding: 8px 0; }
.trail .node { --pc: var(--terra); width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 4px solid var(--line); z-index: 1; flex-shrink: 0; color: var(--pc); transition: transform .35s var(--spring); }
.trail .node .ic { width: 30px; height: 30px; --ic-d: color-mix(in srgb, var(--pc) 25%, transparent); }
.trail li:hover .node { transform: scale(1.08); }
.trail li.done .node { border-color: var(--green); background: var(--green); color: #fff; }
.trail li.done .node .ic { --ic-d: transparent; }
.trail li.next .node { border-color: var(--gold); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 55%, transparent); } 50% { box-shadow: 0 0 0 12px transparent; } }
.trail-card { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .3s var(--ease), box-shadow .3s; }
.trail-card:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.trail-card b { font-family: var(--display); font-size: 1.1rem; }
.trail-card .pill-tag { align-self: flex-start; margin-top: 6px; }

/* ---------- Desafios ---------- */
.time-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.tc-mid { min-width: 240px; }
.tc-mid h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 96px; margin-top: 14px; }
.week-bars div { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: .72rem; font-weight: 900; color: var(--muted); }
.week-bars i { display: block; width: 100%; max-width: 28px; height: var(--h); border-radius: 10px 10px 5px 5px; background: linear-gradient(0deg, var(--green), var(--green-2)); animation: barUp 1s var(--ease) both; transform-origin: bottom; }
.week-bars .today i { background: linear-gradient(0deg, var(--terra), var(--gold)); }
.week-bars .today span { color: var(--terra); }
@keyframes barUp { from { transform: scaleY(0); } }
.timer-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 20px; border-radius: 24px; background: var(--surface-2); min-width: 220px; }
.timer { font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.timer-box.running .timer { color: var(--terra); animation: breathe 2s ease-in-out infinite alternate; }
.challenge { display: flex; flex-direction: column; gap: 10px; position: relative; transition: transform .35s var(--ease), box-shadow .35s; }
.challenge:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.challenge h3 { margin: 0 0 4px; }
.challenge p { margin: 0; color: var(--text-2); }
.c-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; flex-shrink: 0; background: var(--gold-soft); color: var(--brown); transition: transform .45s var(--spring); }
html[data-theme="noite"] .c-ic { color: var(--gold); }
.c-ic .ic { width: 32px; height: 32px; }
.challenge:hover .c-ic { transform: rotate(-8deg) scale(1.06); }
.challenge[data-cat="uniao"] .c-ic { background: var(--terra-soft); color: var(--terra); }
.challenge[data-cat="ciencia"] .c-ic { background: #DCEAF2; color: #2B6E8C; --ic-d: #9CC7DC; }
.challenge[data-cat="cultura"] .c-ic { background: var(--green-soft); color: var(--green); --ic-d: color-mix(in srgb, var(--green) 30%, transparent); }
.c-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; font-weight: 800; color: var(--muted); }
.c-meta span { display: inline-flex; gap: 4px; align-items: center; } .c-meta .ic { width: 15px; height: 15px; }
.challenge details summary { cursor: pointer; font-weight: 900; list-style: none; display: inline-flex; gap: 6px; align-items: center; color: var(--terra); }
.challenge details summary::-webkit-details-marker { display: none; }
.challenge .chev { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.challenge details[open] .chev { transform: rotate(90deg); }
.steps { padding-left: 1.3rem; margin: 8px 0 0; } .steps li { margin: 5px 0; }
.challenge.weekly { border: 2px solid var(--gold); background: linear-gradient(160deg, var(--gold-soft), var(--surface) 55%); padding-top: 30px; }
.weekly-tag { position: absolute; top: -13px; left: 18px; display: inline-flex; gap: 5px; align-items: center; background: var(--gold); color: var(--brown); font-size: .72rem; font-weight: 900; padding: 5px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.weekly-tag .ic { width: 14px; height: 14px; --ic-d: #fff; color: var(--brown); }
.c-foot { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }
.who { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.who-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 30px 6px 6px; border-radius: 999px; border: 1.5px solid var(--line); cursor: pointer; transition: all .2s; }
.who-item input { position: absolute; opacity: 0; }
.who-item .tick { position: absolute; right: 8px; width: 16px; height: 16px; color: var(--green); opacity: 0; transition: opacity .2s; }
.who-item:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.who-item:has(input:checked) .tick { opacity: 1; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border: 0; }
.t-ic { --pc: var(--gold-2); width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 16%, var(--surface)); color: var(--pc); flex-shrink: 0; }
.t-ic .ic { width: 26px; height: 26px; --ic-d: color-mix(in srgb, var(--pc) 28%, transparent); }
.t-title { font-weight: 900; color: var(--text); }

/* ---------- Conquistas ---------- */
.level-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; background: linear-gradient(145deg, var(--surface), var(--gold-soft)); }
.level-hero h2 { margin-bottom: 8px; }
.level-hero .row { margin-bottom: 6px; }
.level-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.level-steps span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--track); color: var(--muted); opacity: .6; transition: all .3s; }
.level-steps span.on { background: var(--green); color: #fff; opacity: 1; --ic-d: rgba(255, 255, 255, .3); }
.level-steps .ic { width: 22px; height: 22px; }
@media (max-width: 700px) { .level-steps { width: 100%; justify-content: space-between; } .level-steps span { width: 34px; height: 34px; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 2px; transition: transform .3s var(--ease); }
.kpi:hover { transform: translateY(-3px); }
.kpi .k-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--brown); margin-bottom: 6px; }
html[data-theme="noite"] .kpi .k-ic { color: var(--gold); }
.kpi .k-ic .ic { width: 22px; height: 22px; }
.kpi b { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; color: var(--text); }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 800; }
.member { display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.member.static { cursor: default; padding: 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.badge { text-align: center; padding: 18px 10px 14px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--spring); }
.badge:hover { transform: translateY(-4px) rotate(-1deg); }
.b-medal { position: relative; width: 74px; height: 74px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; }
.badge.won .b-medal { background: radial-gradient(circle at 30% 25%, #FFE6A6, var(--gold) 60%, var(--gold-2)); color: var(--brown); box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--gold), 0 10px 20px -8px color-mix(in srgb, var(--gold-2) 80%, transparent); --ic-d: rgba(255, 255, 255, .55); }
.badge.won .b-medal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); background-size: 250% 100%; animation: medalShine 3.5s ease-in-out infinite; }
@keyframes medalShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.badge.locked .b-medal { background: var(--track); color: var(--muted); --ic-d: transparent; }
.b-medal .ic { width: 40px; height: 40px; }
.b-lock { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.b-lock .ic { width: 15px; height: 15px; }
.badge b { display: block; font-size: .88rem; line-height: 1.2; }
.badge small { color: var(--muted); font-size: .72rem; display: block; margin-top: 3px; }
.badge.locked b { color: var(--muted); }
.cat-bar { margin: 12px 0; }
.cat-bar b { display: inline-flex; gap: 6px; align-items: center; }
.stamp { display: inline-flex; gap: 5px; align-items: center; padding: 7px 12px; border-radius: 12px; border: 2px dashed var(--terra); color: var(--terra); font-weight: 900; font-size: .85rem; transform: rotate(-2deg); background: var(--terra-soft); }
.stamp:nth-child(2n) { transform: rotate(2deg); border-color: var(--green); color: var(--green); background: var(--green-soft); }
.stamp .ic { width: 15px; height: 15px; }

/* ---------- Conselheiro ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 460px; max-width: 860px; margin: 0 auto; }
@media (min-width: 1024px) { .chat { height: calc(100vh - 130px); } }
.chat-head { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat-head h1 { font-size: 1.6rem; margin: 0; }
.chat-head p { margin: 0; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2E8B57; margin-right: 4px; box-shadow: 0 0 0 0 rgba(46, 139, 87, .6); animation: live 1.6s infinite; }
@keyframes live { to { box-shadow: 0 0 0 8px transparent; } }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 2px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 88%; align-items: flex-end; }
.msg .m-body { padding: 13px 17px; border-radius: 22px; line-height: 1.55; }
.msg.user { align-self: flex-end; }
.msg.user .m-body { background: var(--brown); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant .m-body { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); }
.msg.assistant blockquote { margin: 10px 0; padding: 8px 14px; border-left: 4px solid var(--gold); color: var(--text-2); font-family: var(--display); font-style: italic; background: var(--gold-soft); border-radius: 0 12px 12px 0; }
.msg ol, .msg ul { padding-left: 1.2rem; margin: 6px 0; }
.msg p:last-child { margin: 0; }
.story-link { display: inline-flex; align-items: center; gap: 6px; background: var(--terra-soft); color: var(--terra); padding: 3px 12px; border-radius: 999px; font-weight: 900; font-size: .9rem; margin: 2px 0; }
.story-link .ic { width: 16px; height: 16px; }
.suggestions { padding: 6px 0; }
.chat-input { display: flex; gap: 10px; align-items: flex-end; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.chat-input textarea { flex: 1; resize: none; min-height: 46px; max-height: 140px; padding: 12px 14px; border: 0; background: transparent; outline: none; }
.btn.send { width: 48px; height: 48px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.typing span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Contribuir, definições ---------- */
.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.type-pick label { cursor: pointer; }
.type-pick input { position: absolute; opacity: 0; }
.type-pick span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 18px; border: 1.5px solid var(--line); font-weight: 800; font-size: .85rem; text-align: center; transition: all .25s var(--spring); }
.type-pick .ic { width: 28px; height: 28px; }
.type-pick input:checked + span { border-color: var(--terra); background: var(--terra-soft); color: var(--terra); transform: translateY(-2px); }
.type-pick input:focus-visible + span { outline: 3px solid var(--gold); }
.drop { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 18px; border: 2px dashed var(--line); cursor: pointer; font-weight: 700; color: var(--muted); transition: all .2s; }
.drop:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--text); }
.drop .ic { width: 28px; height: 28px; color: var(--gold-2); }
.settings h2 { display: flex; align-items: center; gap: 12px; }
.theme-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-opt { display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 800; transition: all .25s var(--spring); }
.theme-opt .sw { width: 30px; height: 30px; border-radius: 50%; }
.theme-opt .ic { width: 18px; height: 18px; }
.t-terra .sw { background: linear-gradient(135deg, #FDF8F1 50%, #B84A22 50%); border: 1px solid #EEDFC9; }
.t-savana .sw { background: linear-gradient(135deg, #F5F7EE 50%, #2F5D34 50%); border: 1px solid #DCE5CB; }
.t-noite .sw { background: linear-gradient(135deg, #16100B 50%, #F0B85A 50%); }
.theme-opt.on { border-color: var(--terra); box-shadow: 0 0 0 3px color-mix(in srgb, var(--terra) 25%, transparent); transform: translateY(-2px); }

/* ---------- Modal, toasts, celebração ---------- */
.modal { position: fixed; inset: 0; background: rgba(28, 16, 8, 0); z-index: 80; display: grid; place-items: center; padding: 16px; transition: background .25s; backdrop-filter: blur(0); }
.modal.show { background: rgba(28, 16, 8, .5); backdrop-filter: blur(4px); }
.modal-card { position: relative; background: var(--surface); border-radius: 30px; padding: 28px 24px 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: translateY(30px) scale(.96); opacity: 0; transition: transform .45s var(--spring), opacity .25s; }
.modal.show .modal-card { transform: none; opacity: 1; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-2); cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: transform .3s var(--spring); z-index: 2; }
.modal-x:hover { transform: rotate(90deg); color: var(--text); }
.modal-x .ic { width: 18px; height: 18px; }
.confirm-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); margin-bottom: 12px; }
.confirm-ic .ic { width: 34px; height: 34px; }
@media (max-width: 560px) { .modal { align-items: end; padding: 0; } .modal-card { border-radius: 30px 30px 0 0; max-height: 92vh; transform: translateY(100%); padding-bottom: calc(24px + env(safe-area-inset-bottom)); } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 1024px) { .toasts { bottom: 28px; left: auto; right: 28px; transform: none; } }
.toast { display: flex; gap: 10px; align-items: center; background: var(--brown); color: #fff; padding: 13px 16px; border-radius: 18px; font-weight: 800; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--spring); transition: opacity .4s, transform .4s; }
.toast .ic { width: 22px; height: 22px; color: var(--gold); --ic-d: rgba(231, 169, 72, .3); }
.toast.out { opacity: 0; transform: translateY(10px); }
html[data-theme="noite"] .toast { background: #F7EBD8; color: #241A12; }
.toast.err { background: #A5281B; color: #fff; } .toast.err .ic { color: #fff; --ic-d: rgba(255, 255, 255, .25); }
.toast.ok { background: var(--green); color: #fff; } .toast.ok .ic { color: #fff; --ic-d: rgba(255, 255, 255, .25); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.celebrate i { position: absolute; top: -30px; display: block; animation: fall 2.4s cubic-bezier(.3, .6, .5, 1) forwards; }
.celebrate i.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.celebrate i.strip { width: 7px; height: 16px; border-radius: 2px; background: var(--c); }
.celebrate i.star .ic { width: 26px; height: 26px; color: var(--c); --ic-d: var(--c); }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); opacity: .8; } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .e-ic { width: 90px; height: 90px; margin: 0 auto 12px; border-radius: 30px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); animation: breathe 2.5s ease-in-out infinite alternate; }
.empty .e-ic .ic { width: 50px; height: 50px; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--radius); min-height: 140px; }
.skeleton.hero-sk { min-height: 300px; border-radius: 34px; }
.skeleton.tall { min-height: 300px; }
@keyframes sk { to { background-position: -200% 0; } }

.child-mode .adult-only { display: none !important; }
.child-banner { display: flex; gap: 8px; justify-content: center; align-items: center; background: var(--gold); color: var(--brown); font-weight: 900; padding: 6px; font-size: .85rem; }
.child-banner .ic { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}
@media print {
  .topbar, .sidebar, .dock, .reader-tools, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
}
@media (max-width: 560px) {
  .section-head h2 { font-size: 1.3rem; gap: 10px; }
  .h-ic { width: 36px; height: 36px; border-radius: 12px; }
  .h-ic .ic { width: 20px; height: 20px; }
  .see-all { white-space: nowrap; font-size: .88rem; }
  .pill-tag { letter-spacing: .03em; }
  .hero-stats { gap: 18px; }
  .hero-stats .hs-live { padding-left: 18px; }
  .hero-stats b { font-size: 1.8rem; }
  .card { padding: 18px; }
}
@media (max-width: 560px) {
  .reader-tools { flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 22px; justify-content: center; }
  .reader-tools .seg { padding: 3px; flex-wrap: nowrap; }
  .reader-tools .seg button { padding: 6px 9px; }
  .reader-tools .btn.sm { padding: 8px 12px; }
  .time-card { justify-content: center; }
  .timer-box { width: 100%; }
  .tc-mid { min-width: 0; width: 100%; }
}
@media (max-width: 640px) {
  .story-hero .emblem, .reader-cover .emblem { display: none; }
}

/* Emblema do conto nos heróis (substitui o emblema da capa) */
.story-hero .emblem, .reader-cover .emblem { display: none; }
.hero-emblem { position: absolute; right: clamp(24px, 6vw, 70px); top: 50%; transform: translateY(-50%); width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: var(--brown); box-shadow: 0 0 0 14px rgba(255, 255, 255, .18), 0 20px 50px -10px rgba(0, 0, 0, .5); z-index: 0; animation: floaty 4s ease-in-out infinite alternate; --ic-d: var(--gold); }
.hero-emblem .ic { width: 84px; height: 84px; }
.reader-cover .hero-emblem { top: 32%; width: 120px; height: 120px; }
.reader-cover .hero-emblem .ic { width: 66px; height: 66px; }
@keyframes floaty { from { transform: translateY(-50%) rotate(-4deg); } to { transform: translateY(calc(-50% - 10px)) rotate(4deg); } }
@media (max-width: 900px) { .hero-emblem { display: none; } }

/* =====================================================================
   v2 — Idiomas, acessibilidade, Premium, hora de dormir, jogos, áudio,
   álbum, eventos, palavras, relatório, caderneta, turmas
   ===================================================================== */
/* ---------- Acessibilidade ---------- */
html.dys { --font: "Atkinson Hyperlegible", "Verdana", system-ui, sans-serif; --display: "Atkinson Hyperlegible", "Verdana", system-ui, sans-serif; }
html.dys body { letter-spacing: .02em; word-spacing: .08em; }
html.dys .story-text p { line-height: 1.95; }
html.hc { --text: #000; --text-2: #111; --muted: #333; --line: #555; --bg: #fff; --bg-2: #f1f1f1; --surface: #fff; --surface-2: #f6f6f6; --terra: #8A2A0A; --green: #0B4A12; --gold-soft: #FFE7A8; }
html.hc[data-theme="noite"] { --text: #fff; --text-2: #eee; --muted: #ddd; --line: #bbb; --bg: #000; --bg-2: #111; --surface: #0b0b0b; --surface-2: #151515; --terra: #FF9D6B; --green: #9EEA96; --gold: #FFD27A; }
html.hc a { text-decoration: underline; }
html.hc .card, html.hc .kpi, html.hc .chip { border-width: 2px; }
html.still *, html.still *::before, html.still *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
html.still .rv { opacity: 1; transform: none; }

/* ---------- Topo: idioma e premium ---------- */
.lang-btn { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 900; font-size: .78rem; color: var(--text-2); }
.lang-btn .ic { width: 18px; height: 18px; }
.lang-btn:hover { border-color: var(--gold); }
.premium-chip { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); box-shadow: 0 6px 16px -6px var(--gold-2); }
.premium-chip .ic { width: 20px; height: 20px; }
.lang-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.lang-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: all .2s var(--ease); }
.lang-pick button b { font-family: var(--display); font-size: 1.3rem; color: var(--terra); }
.lang-pick button span { font-size: .85rem; color: var(--muted); font-weight: 700; }
.lang-pick button.on { border-color: var(--terra); background: var(--terra-soft); box-shadow: var(--shadow-sm); }
.lang-pick.big button { padding: 18px; }
.nav a.nav-premium .n-ic { background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); }
.dot-badge { margin-left: auto; background: var(--terra); color: #fff; font-style: normal; font-size: .7rem; font-weight: 900; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--gold-soft); color: var(--text); margin: 12px 0; font-weight: 700; }
.notice.ok { background: var(--green-soft); color: var(--green); }
.notice.err { background: #FDECEA; color: #8B1E12; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .04em; }
.btn.danger { background: #B23A2B; }
.btn.danger.ghost { background: var(--surface); color: #B23A2B; box-shadow: inset 0 0 0 1.5px #E5B8B1; }
.btn.xs { padding: 6px 12px; font-size: .8rem; }
.icon-btn.xs { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; vertical-align: middle; }
.icon-btn.xs .ic { width: 16px; height: 16px; }
.confirm-ic.danger { background: #FDECEA; color: #B23A2B; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 900; background: var(--bg-2); }
.st-paid { background: var(--green-soft); color: var(--green); }
.st-awaiting { background: var(--gold-soft); color: var(--brown-2); }
.st-rejected, .st-cancelled { background: #FDECEA; color: #8B1E12; }

/* ---------- Cadeados e paywall ---------- */
.lock-badge { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); box-shadow: var(--shadow); z-index: 2; }
.lock-badge .ic { width: 18px; height: 18px; }
.story-card .cat { z-index: 1; }
.story-text.faded { -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.paywall-inline { text-align: center; background: linear-gradient(160deg, var(--gold-soft), var(--surface)); border-color: var(--gold); }
.pw-ic { width: 70px; height: 70px; margin: 0 auto 8px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); box-shadow: 0 14px 30px -12px var(--gold-2); }
.pw-ic .ic { width: 38px; height: 38px; }
.paywall { text-align: center; }
.pw-hero { position: relative; height: 130px; border-radius: 22px; overflow: hidden; margin: -6px -6px 14px; }
.pw-hero .hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.pw-gem { position: absolute; left: 50%; bottom: -1px; transform: translate(-50%, 30%); width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); box-shadow: 0 0 0 6px var(--surface); }
.pw-gem .ic { width: 40px; height: 40px; }
.pw-list { list-style: none; padding: 0; margin: 18px 0; text-align: left; display: grid; gap: 10px; }
.pw-list li { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.pw-list .ic { color: var(--terra); width: 22px; height: 22px; }
.premium-hero { min-height: 280px; }
.premium-hero h1 { color: #fff; }
.compare .checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.compare .checks li { display: flex; gap: 10px; align-items: flex-start; }
.compare .checks .ic { color: var(--green); flex-shrink: 0; margin-top: 3px; }
.gold-border { border: 2px solid var(--gold); background: linear-gradient(170deg, var(--gold-soft), var(--surface) 55%); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 22px 20px; border-radius: 22px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; transition: all .25s var(--ease); }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan.on { border-color: var(--terra); box-shadow: 0 0 0 4px color-mix(in srgb, var(--terra) 18%, transparent), var(--shadow); }
.plan.hl { background: linear-gradient(170deg, var(--gold-soft), var(--surface) 70%); }
.plan-tag { position: absolute; top: -12px; right: 16px; background: var(--terra); color: #fff; font-size: .72rem; font-weight: 900; padding: 4px 10px; border-radius: 99px; display: inline-flex; gap: 4px; align-items: center; }
.plan-tag .ic { width: 14px; height: 14px; color: var(--gold); }
.plan-name { font-family: var(--display); font-size: 1.1rem; }
.plan-price { font-family: var(--display); font-size: 2rem; font-weight: 800; color: var(--terra); line-height: 1.1; }
.plan-price small { font-size: .9rem; color: var(--muted); font-family: var(--font); font-weight: 700; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.method { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; transition: all .2s var(--ease); }
.method .ic { width: 28px; height: 28px; color: var(--terra); }
.method:hover { border-color: var(--terra); transform: translateY(-2px); background: var(--surface); }
.pay-box { border: 1.5px dashed var(--gold); border-radius: 18px; padding: 16px; margin: 10px 0; background: var(--surface-2); }
.pay-data { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.pay-data dt { color: var(--muted); font-weight: 700; font-size: .88rem; }
.pay-data dd { margin: 0; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.file-btn { cursor: pointer; }
.premium-teaser { display: flex; gap: 16px; align-items: center; background: linear-gradient(120deg, var(--brown), var(--brown-2)); color: #fff; border: 0; }
.premium-teaser h3, .premium-teaser p { color: #fff; margin: 0; }
.pt-gem { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); flex-shrink: 0; }
.pt-gem .ic { width: 30px; height: 30px; }
.lock-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(3px); border-radius: inherit; z-index: 2; }
.lock-over > span { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: var(--brown); }
.lock-over > span .ic { width: 32px; height: 32px; }
.magic-form, .teaser-lock { position: relative; overflow: hidden; }
.teaser-lock .blurred { filter: blur(4px); min-height: 200px; }

/* ---------- Evento sazonal ---------- */
.event-banner { --ev: var(--terra); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 20px 22px; border-radius: 26px; margin: 0 0 24px; color: #fff;
  background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--ev) 50%, #fff) 0, transparent 40%), linear-gradient(120deg, color-mix(in srgb, var(--ev) 85%, #000), var(--ev)); box-shadow: var(--shadow); }
.event-banner h3, .event-banner p { color: #fff; margin: 4px 0 0; }
.event-banner p { opacity: .92; font-size: .92rem; }
.event-banner .pill-tag { background: rgba(255, 255, 255, .2); color: #fff; }
.ev-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex-shrink: 0; }
.ev-ic .ic { width: 34px; height: 34px; --ic-d: rgba(255, 255, 255, .35); }
.event-banner.live .ev-ic { animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-5px) rotate(-3deg); } }

/* ---------- Palavras ---------- */
.word-card { position: relative; background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.word-card .word, .word-game .word { font-family: var(--display); font-size: 2.1rem; font-weight: 800; color: var(--terra); margin: 10px 0 2px; }
.word-card .meaning { font-weight: 800; font-size: 1.05rem; margin: 0 0 4px; }
.word-card .example { font-style: italic; }
.games-teaser { display: flex; gap: 16px; align-items: center; color: var(--text); }
.gt-art { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 92px; flex-shrink: 0; }
.gt-art .ic { width: 42px; height: 42px; padding: 8px; border-radius: 14px; background: var(--gold-soft); color: var(--brown); }
.gt-art .ic:nth-child(2) { background: var(--terra-soft); }
.gt-art .ic:nth-child(3) { background: var(--green-soft); grid-column: span 2; justify-self: center; }
.magic-teaser { display: flex; gap: 16px; align-items: center; color: var(--text); background: linear-gradient(120deg, #F1E6F7, var(--surface)); }
html[data-theme="noite"] .magic-teaser { background: linear-gradient(120deg, #2E2138, var(--surface)); }
.magic-teaser .ic.big { width: 54px; height: 54px; color: #8E4FA8; }

/* ---------- Hora de dormir ---------- */
body.bt-open { overflow: hidden; }
.bedtime { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; color: #F6E9D2; background: radial-gradient(ellipse at 70% 0%, #2B2250 0, #120E22 55%, #07060D 100%); opacity: 0; transition: opacity .5s, filter 60s linear; }
.bedtime.show { opacity: 1; }
.bedtime.dim { filter: brightness(.45); }
.bedtime.sleep { filter: brightness(.08); }
.bt-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bt-sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }
.bt-moon { position: absolute; top: 70px; right: 6%; width: 64px; height: 64px; border-radius: 50%; box-shadow: -14px 8px 0 0 #F5E3B3; transform: rotate(-20deg); opacity: .35; }
.bt-top { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.bt-top b { font-family: var(--display); font-size: 1.1rem; flex: 1; }
.bt-top .icon-btn { color: #F6E9D2; border-color: rgba(255, 255, 255, .25); }
.bt-timer { font-variant-numeric: tabular-nums; font-weight: 900; opacity: .8; }
.bt-text { position: relative; flex: 1; overflow-y: auto; padding: 10px clamp(18px, 8vw, 120px) 40px; font-size: calc(var(--reader-fs) * 1.12); line-height: 1.9; max-width: 900px; margin: 0 auto; }
.bt-text p { margin: 0 0 1.2em; opacity: .9; transition: opacity .4s, color .4s; }
.bt-text p.speaking { opacity: 1; color: #FFE3A0; }
.bt-end, .bt-lock { text-align: center; opacity: .75; }
.bt-bar { position: relative; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .35); backdrop-filter: blur(10px); }
.bt-sounds, .bt-sleep { display: flex; gap: 6px; align-items: center; }
.bt-sounds button, .bt-sleep button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1.5px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #F6E9D2; border-radius: 16px; padding: 8px 10px; cursor: pointer; font-size: .72rem; font-weight: 800; min-width: 58px; }
.bt-sounds button .ic { width: 24px; height: 24px; --ic-d: rgba(255, 227, 160, .3); }
.bt-sounds button.on, .bt-sleep button.on { background: #F5E3B3; color: #1A1430; border-color: #F5E3B3; }
.bt-sounds button.lock { opacity: .7; }
.bt-sounds button em { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--brown); display: grid; place-items: center; }
.bt-sounds button em .ic { width: 12px; height: 12px; }
.bt-sleep button { min-width: 44px; font-size: .9rem; }
.bt-sleep > span .ic { width: 22px; height: 22px; opacity: .8; }

/* ---------- Vozes ---------- */
.voices { margin: 16px 0; padding: 16px 18px; background: var(--surface-2); }
.voices h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.voice-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.voice-list li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.voice-list li.playing { border-color: var(--green); }
.play-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.play-btn .ic { width: 20px; height: 20px; --ic-d: rgba(255, 255, 255, .4); }
.vbar { height: 4px; border-radius: 9px; background: var(--track); margin-top: 6px; overflow: hidden; }
.vbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s linear; }
.recorder .rec-stage { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 12px 0; padding: 14px; border-radius: 18px; background: var(--bg-2); }
.rec-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--muted); }
.rec-dot.on { background: #D2352A; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(210, 53, 42, .15); } }
.rec-time { font-family: var(--display); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 70px; }
.rec-stage canvas { max-width: 100%; }
.rec-script .story-text { max-height: 220px; overflow-y: auto; }
.recorder audio { width: 100%; margin: 10px 0; }

/* ---------- Jogos ---------- */
.game-card { --gc: var(--terra); display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: transform .3s var(--spring), box-shadow .3s; }
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gc-art { height: 130px; border-radius: 20px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--gc) 40%, #fff), var(--gc)); color: #fff; margin: -6px -6px 6px; }
.gc-art .ic { width: 74px; height: 74px; --ic-d: rgba(255, 255, 255, .3); }
.kiela-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.k-player { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); align-self: flex-start; transition: all .3s; }
.k-player.top { align-self: flex-end; }
.k-player.turn { border-color: var(--terra); box-shadow: 0 0 0 4px color-mix(in srgb, var(--terra) 20%, transparent); }
.k-store { font-family: var(--display); font-weight: 800; font-size: 1.3rem; background: var(--gold-soft); border-radius: 12px; padding: 0 10px; min-width: 42px; text-align: center; }
.board { background: linear-gradient(160deg, #8A5427, #5E3417); border-radius: 36px; padding: 16px; display: grid; gap: 12px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .15), inset 0 -6px 12px rgba(0, 0, 0, .35), var(--shadow-lg); transition: transform .6s var(--ease); }
.board.flip { transform: rotate(180deg); }
.board.flip .pit b { transform: rotate(180deg); }
.row-pits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pit { position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; background: radial-gradient(circle at 50% 35%, #3E220F, #2A170A 70%); box-shadow: inset 0 6px 12px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .12); cursor: default; display: grid; place-items: center; transition: transform .2s var(--spring), box-shadow .3s; }
.pit b { position: absolute; bottom: -2px; right: 4px; font-size: .8rem; color: #F6D9A8; font-weight: 900; }
.pit .seeds { position: relative; width: 60%; height: 60%; }
.pit .seeds i { position: absolute; left: 50%; top: 50%; width: 11px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F4E1B8, #B98C4F); transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))); box-shadow: 0 1px 1px rgba(0, 0, 0, .4); }
.pit.legal { cursor: pointer; box-shadow: inset 0 6px 12px rgba(0, 0, 0, .55), 0 0 0 3px var(--gold); }
.pit.legal:hover { transform: scale(1.06); }
.pit.sown { animation: sown .5s var(--spring); }
.pit.from { box-shadow: inset 0 6px 12px rgba(0, 0, 0, .55), 0 0 0 3px #fff; }
.pit.captured { box-shadow: inset 0 6px 12px rgba(0, 0, 0, .55), 0 0 0 4px #7DDB77; animation: pop .5s var(--spring); }
@keyframes sown { 40% { transform: scale(1.12); } }
@media (max-width: 520px) { .board { padding: 10px; border-radius: 24px; } .row-pits { gap: 6px; } .pit .seeds i { width: 7px; height: 6px; } }
.sona-lv { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; cursor: pointer; color: var(--text); }
.sona-lv.locked { opacity: .55; cursor: not-allowed; }
.sona-lv.done { border-color: var(--green); }
.sona-thumb { width: 100%; height: 120px; color: #8E4FA8; background: #F4E6CF; border-radius: 16px; padding: 8px; }
.done-tag { position: absolute; top: 12px; right: 12px; color: var(--green); }
.sona-play { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.sona-board { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); touch-action: none; }
.sona-svg { width: 100%; height: auto; display: block; touch-action: none; user-select: none; }
.sona-svg .sand { fill: #EBD3A8; }
.sona-svg circle[fill="currentColor"] { color: #3B2415; }
.sona-svg .guide { fill: none; stroke: rgba(59, 36, 21, .22); stroke-width: 6; stroke-dasharray: 2 10; stroke-linecap: round; }
.sona-svg.noguide .guide { stroke: transparent; }
.sona-svg .trace { fill: none; stroke: #8E4FA8; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.sona-svg .trace.done { stroke: #2F5D34; }
.sona-svg .demo { fill: none; stroke: #C8612E; stroke-width: 5; stroke-linecap: round; }
.sona-svg .head { fill: var(--gold); stroke: #fff; stroke-width: 3; animation: pulseHead 1.2s ease-in-out infinite; }
.sona-svg .mirror, .sona-thumb .mirror { stroke: #C8612E; stroke-width: 4; stroke-linecap: round; }
.sona-thumb .mirror { stroke-width: .2; }
@keyframes pulseHead { 50% { r: 14; } }
.quiz-party { display: flex; flex-direction: column; gap: 14px; }
.qp-score { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qp-score span { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 800; }
.qp-score span.cur { border-color: var(--terra); background: var(--terra-soft); }
.qp-turn { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.qp-turn h2 { margin: 0; }
.qp-q { font-size: 1.35rem; }
.qp-timer { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--terra); }
.podium { list-style: none; padding: 0; display: grid; gap: 8px; max-width: 420px; margin: 18px auto; }
.podium li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.podium li b { flex: 1; text-align: left; }
.podium li.p0 { background: var(--gold-soft); border-color: var(--gold); font-size: 1.1rem; }

/* ---------- Família, álbum, notificações ---------- */
.people { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 16px; background: var(--surface-2); }
.code-big { font-size: 2rem; font-weight: 900; letter-spacing: .12em; padding: 14px; margin: 12px 0; border-radius: 16px; background: var(--gold-soft); color: var(--brown); }
.album { columns: 3 220px; column-gap: 14px; }
.ph { break-inside: avoid; margin: 0 0 14px; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: zoom-in; transition: transform .3s var(--ease), box-shadow .3s; }
.ph:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ph img { width: 100%; height: auto; }
.ph figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.ph figcaption small { color: var(--muted); }
.ph-view img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 16px; background: #000; }
.ph-view figcaption { display: flex; flex-direction: column; gap: 2px; margin: 10px 0; }
.photo-drop { min-height: 180px; display: grid; place-items: center; overflow: hidden; }
.photo-drop img { max-height: 260px; width: auto; border-radius: 12px; }
.notif-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.notif-list a { display: flex; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.notif-list a:hover { border-color: var(--gold); }
.notif-list .n-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); flex-shrink: 0; }
.notif-list p { margin: 2px 0; font-size: .92rem; }
.magic-card { display: flex; gap: 14px; align-items: center; color: var(--text); }
.magic-card h3 { margin: 0 0 4px; font-size: 1.05rem; }

/* ---------- Relatório e caderneta ---------- */
.rep-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rep-row:last-child { border: 0; }
.avatar.md { --sz: 44px; }
.booklet { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.bk-head { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 26px; background: linear-gradient(120deg, var(--gold-soft), var(--surface)); border: 1px solid var(--line); }
.bk-head img { width: 130px; }
.bk-head > div { flex: 1; }
.bk-head h1 { font-size: 1.8rem; margin: 0; }
.bk-head p { margin: 4px 0 0; font-weight: 800; }
.bk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bk-kpis div { text-align: center; padding: 14px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.bk-kpis b { font-family: var(--display); font-size: 1.6rem; }
.bk-kpis span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.bk-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }
.bk-skill { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.bk-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex-shrink: 0; }
.bk-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; font-size: .85rem; color: var(--muted); }
.bk-foot i { display: block; height: 50px; border-bottom: 1.5px solid var(--text); }

/* ---------- Turmas ---------- */
.class-card { color: var(--text); }
.code-sm { display: inline-block; padding: 4px 10px; border-radius: 10px; background: var(--gold-soft); font-weight: 900; }
.class-code { display: flex; flex-direction: column; align-items: center; padding: 10px 18px; border-radius: 18px; background: var(--gold-soft); }
.class-code b { font-size: 1.6rem; letter-spacing: .1em; }
.class-box { padding: 14px; border-radius: 18px; background: var(--surface-2); margin: 10px 0; }
.assign { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.assign li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.assign li.done { border-color: var(--green); }
.assign .t-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--pc, var(--gold)) 22%, var(--surface)); flex-shrink: 0; }
.offline-box h3 { margin: 0 0 4px; }

/* ---------- Impressão ---------- */
@media print {
  .topbar, .sidebar, .dock, .no-print, .reader-tools, .back-link, #toasts, .seg, .btn { display: none !important; }
  body { background: #fff; padding: 0; }
  .view { padding: 0; max-width: none; }
  .card, .bk-skill, .bk-kpis div, .bk-head { box-shadow: none !important; break-inside: avoid; }
  .rv { opacity: 1 !important; transform: none !important; }
}
