/* Arcana Felis · O Livro das 78 Chaves
   Livro editorial + herbário + diário de estudo. Interface clara por escolha: não existe modo escuro.
   A barra lateral vinho é a "capa dura" do livro, não um tema escuro. */
/* Fontes (OFL), servidas localmente. */
@font-face{font-family:"Jost";font-style:normal;font-weight:300;font-display:swap;src:url(../assets/fonts/jost-latin-300-normal.woff2) format("woff2")}
@font-face{font-family:"Jost";font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/jost-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Jost";font-style:normal;font-weight:500;font-display:swap;src:url(../assets/fonts/jost-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Jost";font-style:normal;font-weight:600;font-display:swap;src:url(../assets/fonts/jost-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Lora";font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/lora-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Lora";font-style:italic;font-weight:400;font-display:swap;src:url(../assets/fonts/lora-latin-400-italic.woff2) format("woff2")}
@font-face{font-family:"Lora";font-style:normal;font-weight:500;font-display:swap;src:url(../assets/fonts/lora-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Lora";font-style:italic;font-weight:500;font-display:swap;src:url(../assets/fonts/lora-latin-500-italic.woff2) format("woff2")}
@font-face{font-family:"Lora";font-style:normal;font-weight:600;font-display:swap;src:url(../assets/fonts/lora-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Lora";font-style:italic;font-weight:600;font-display:swap;src:url(../assets/fonts/lora-latin-600-italic.woff2) format("woff2")}
@font-face{font-family:"Nothing You Could Do";font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/nothing-you-could-do-latin-400-normal.woff2) format("woff2")}

:root {
  --paper: #F3E3D9;
  --paper-light: #F7EAE2;
  --white: #FFFAF6;
  --blush: #E9B9BC;
  --rose: #D99AA3;
  --divider: #D09A93;
  --berry: #B55A6B;
  --wine: #8E263B;
  --burgundy: #691828;
  --ink: #351018;
  --secondary: #7A4A52;
  --olive: #5F6A3C;
  --olive-soft: #E4E3CC;
  --gold: #A97C38;
  --gold-soft: #F1E2C4;
  --cover: #4A1520;
  --cover-deep: #33101A;
  --line: rgba(53, 16, 24, .13);
  --line-strong: rgba(53, 16, 24, .22);
  --shadow: 0 1px 2px rgba(53, 16, 24, .06), 0 8px 24px -12px rgba(53, 16, 24, .22);
  --shadow-card: 0 2px 6px rgba(53, 16, 24, .10), 0 14px 30px -18px rgba(53, 16, 24, .45);
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --read: "Lora", Georgia, "Times New Roman", serif;
  --script: "Nothing You Could Do", "Segoe Script", cursive;
  --r-sm: 6px;
  --r: 10px;
  --r-book: 6px 6px 18px 18px;
  --side-w: 272px;
  --top-h: 68px;
  --bottom-h: 64px;
  --gut: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--read); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--wine); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--read); font-weight: 500; line-height: 1.12; margin: 0; color: var(--burgundy); text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
svg { width: 1.15em; height: 1.15em; flex: none; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 10px 14px; z-index: 999; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.script { font-family: var(--script); color: var(--wine); font-weight: 400; }
[hidden] { display: none !important; }

/* ---------- tipografia utilitária ---------- */
.eyebrow {
  font-family: var(--display); font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase;
  color: var(--wine); display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; flex: none; }
.eyebrow.plain::before { display: none; }
.label { font-family: var(--display); font-size: 11.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--secondary); }
.muted { color: var(--secondary); }
.small { font-size: 14.5px; }
.lead { font-size: clamp(17px, 2vw, 19.5px); line-height: 1.6; color: var(--secondary); max-width: 62ch; }
.title-xl { font-size: clamp(38px, 6vw, 68px); letter-spacing: -.01em; }
.title-l { font-size: clamp(30px, 4.4vw, 46px); }
.title-m { font-size: clamp(22px, 2.6vw, 28px); }
.title-s { font-size: 20px; }
.ui { font-family: var(--display); }

/* ---------- botões ---------- */
.btn {
  --bg: var(--burgundy); --fg: var(--paper-light);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 11px 22px;
  border-radius: 999px; border: 1px solid var(--bg); background: var(--bg); color: var(--fg);
  font-family: var(--display); font-size: 15px; font-weight: 500; letter-spacing: .02em; text-decoration: none;
  transition: background .2s var(--ease), color .2s, border-color .2s, transform .15s; white-space: nowrap;
}
.btn:hover { --bg: var(--wine); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { --bg: transparent; --fg: var(--burgundy); border-color: var(--divider); }
.btn.ghost:hover { --bg: var(--white); border-color: var(--wine); }
.btn.soft { --bg: var(--blush); --fg: var(--burgundy); border-color: var(--blush); }
.btn.soft:hover { --bg: var(--rose); border-color: var(--rose); }
.btn.cream { --bg: var(--paper-light); --fg: var(--burgundy); border-color: rgba(255,255,255,.6); box-shadow: 0 8px 26px -10px rgba(0,0,0,.55); }
.btn.cream:hover { --bg: var(--white); }
.btn.ai { --bg: transparent; --fg: var(--wine); border: 1.5px dashed var(--berry); }
.btn.ai:hover { --bg: var(--white); }
.btn.sm { min-height: 38px; padding: 7px 15px; font-size: 14px; }
.btn.icon { padding: 0; width: 44px; min-height: 44px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; padding: 6px 0; min-height: 44px; color: var(--wine); font-family: var(--display); font-size: 14.5px; text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; gap: 8px; }
.linkbtn svg { width: 16px; height: 16px; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--burgundy); transition: background .2s, border-color .2s; }
.iconbtn:hover { background: var(--white); border-color: var(--line); }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn[aria-pressed="true"] { background: var(--blush); color: var(--burgundy); }

/* ---------- pílulas, chips, etiquetas ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--display); font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--divider); color: var(--ink); background: transparent; line-height: 1.3; }
.chip.r { background: var(--blush); border-color: var(--blush); color: var(--burgundy); }
.chip.o { background: var(--olive-soft); border-color: #CFCDAE; color: #3E4527; }
button.chip { min-height: 40px; transition: background .2s, border-color .2s; }
button.chip:hover { border-color: var(--wine); }
button.chip[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: var(--paper-light); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--divider); color: var(--secondary); background: var(--paper-light); }
.tag.hist { border-color: #C9B28A; color: #6E5527; background: var(--gold-soft); }
.tag.trad { border-color: #D1A2A6; color: var(--burgundy); background: #F6DADB; }
.tag.esot { border-color: #BDB7D2; color: #4A4266; background: #ECE8F4; }
.tag.par { border-color: #C8C6A4; color: #4A5230; background: var(--olive-soft); }
.tag.felis { border-color: var(--wine); color: var(--white); background: var(--wine); }
.tag.ai { border-style: dashed; border-color: var(--berry); color: var(--wine); background: transparent; }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 12.5px; color: var(--secondary); padding: 4px 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.status svg { width: 14px; height: 14px; }
.status.estudando { background: var(--gold-soft); color: #6E5527; border-color: #E2CDA0; }
.status.conheco { background: var(--olive-soft); color: #3E4527; border-color: #CFCDAE; }
.status.revisar { background: #F6DADB; color: var(--burgundy); border-color: #E7B7BA; }

/* ---------- superfícies ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-book); padding: clamp(18px, 2.4vw, 28px); }
.card.paper { background: var(--paper-light); }
.card.flat { box-shadow: none; }
.card.lift { box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.sheet { background: var(--paper-light); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.callout { background: var(--burgundy); color: var(--paper-light); border-radius: var(--r-book); padding: clamp(22px, 3vw, 34px); }
.callout h2, .callout h3 { color: var(--white); }
.callout p { color: #EBCBC9; }
.rule { height: 1px; background: var(--divider); border: 0; margin: 32px 0; opacity: .7; }
.orn { display: flex; align-items: center; gap: 14px; color: var(--divider); margin: 34px 0 22px; }
.orn::before, .orn::after { content: ""; height: 1px; background: currentColor; flex: 1; opacity: .8; }
.orn svg { width: 18px; height: 18px; color: var(--gold); }
.section-h { display: flex; align-items: center; gap: 16px; margin: 40px 0 18px; }
.section-h h2 { font-family: var(--display); font-size: 14px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.section-h svg { order: 3; width: 22px; height: 22px; color: var(--gold); flex: none; }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .g4.keep2, .g3.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
ul.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
ul.list li { padding-left: 22px; position: relative; }
ul.list li::before { content: ""; position: absolute; left: 0; top: .82em; width: 10px; height: 1px; background: var(--wine); }
.prose { max-width: var(--measure); }
.prose p { color: var(--ink); }

/* ---------- formulários ---------- */
.field { display: grid; gap: 7px; }
.field > span, .field > label { font-family: var(--display); font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--secondary); }
.input, textarea.input, select.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--divider);
  background: var(--paper-light); color: var(--ink); font-family: var(--read); font-size: 17px; line-height: 1.55;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 4px rgba(142, 38, 59, .12); background: var(--white); }
.input::placeholder { color: #A67F84; font-style: italic; }
.hint { font-size: 14px; color: var(--secondary); }
.err { color: var(--wine); font-family: var(--display); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.saved { font-family: var(--display); font-size: 12.5px; color: var(--olive); display: inline-flex; gap: 6px; align-items: center; min-height: 20px; }
.saved svg { width: 14px; height: 14px; }
.seg { display: inline-flex; border: 1px solid var(--divider); border-radius: 999px; padding: 3px; background: var(--paper-light); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 16px; min-height: 40px; border-radius: 999px; font-family: var(--display); font-size: 14px; color: var(--secondary); }
.seg button[aria-pressed="true"] { background: var(--blush); color: var(--burgundy); }

/* ---------- CAPA ---------- */
.cover-stage { position: fixed; inset: 0; background: radial-gradient(120% 90% at 50% 30%, #5B1B28 0%, var(--cover-deep) 70%); display: grid; place-items: center; overflow: hidden; perspective: 2200px; z-index: 50; }
.cover-stage::before { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E"); pointer-events: none; }
.book { position: relative; height: min(92svh, calc(96vw * 1.5)); aspect-ratio: 2 / 3; transform-style: preserve-3d; }
.book .page-under { position: absolute; inset: 0; border-radius: 4px 12px 12px 4px; background: var(--paper-light); box-shadow: inset 18px 0 30px -18px rgba(53,16,24,.35); display: grid; place-items: center; padding: 12%; text-align: center; }
.book .page-under .script { font-size: clamp(22px, 3.4vh, 34px); line-height: 1.25; }
.book .cover-face { position: absolute; inset: 0; border-radius: 4px 12px 12px 4px; overflow: hidden; transform-origin: left center; transition: transform 1.25s var(--ease), box-shadow 1.25s; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04); backface-visibility: hidden; }
.book .cover-face img { width: 100%; height: 100%; object-fit: cover; }
.book .cover-face::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0)); }
.book.opening .cover-face { transform: rotateY(-108deg); box-shadow: 0 30px 60px -20px rgba(0,0,0,0); }
.book .open-cta { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); z-index: 3; transition: opacity .35s; }
.book.opening .open-cta { opacity: 0; pointer-events: none; }
.cover-stage .fade-out { animation: none; }
.cover-stage.leaving { animation: coverLeave .5s var(--ease) forwards; }
@keyframes coverLeave { to { opacity: 0; } }

/* ---------- PÁGINA DE ENTRADA / EX-LIBRIS ---------- */
.frontis { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); }
.frontis .plate { background: var(--cover-deep); display: grid; place-items: center; padding: clamp(18px, 4vw, 56px); position: relative; }
.frontis .plate img { max-height: 86svh; width: auto; border-radius: 4px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.7); }
.frontis .leaf { display: grid; align-content: center; padding: clamp(28px, 6vw, 88px) clamp(20px, 6vw, 96px); position: relative; overflow: hidden; }
.frontis .leaf .deco { position: absolute; right: -40px; bottom: -40px; width: 300px; opacity: .9; pointer-events: none; }
.exlibris { border: 1px solid var(--divider); border-radius: var(--r-book); padding: clamp(22px, 3.4vw, 40px); background: var(--white); max-width: 460px; position: relative; z-index: 1; }
.exlibris .ex-h { text-align: center; margin-bottom: 22px; }
.exlibris .ex-h .label { letter-spacing: .4em; }
.exlibris .ex-h .script { font-size: 28px; display: block; margin-top: 4px; }
@media (max-width: 860px) {
  .frontis { grid-template-columns: 1fr; }
  .frontis .plate { padding: 22px 16px 30px; }
  .frontis .plate img { max-height: 46svh; }
  .frontis .leaf { padding: 26px 16px 48px; }
  .frontis .leaf .deco { width: 180px; right: -30px; bottom: -30px; opacity: .55; }
}

/* ---------- ESTRUTURA DO LIVRO ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100svh; }
.side {
  position: sticky; top: 0; height: 100svh; overflow: hidden auto; background: linear-gradient(180deg, var(--cover) 0%, #3D111B 100%);
  color: #F2D9D8; display: flex; flex-direction: column; padding: 22px 16px 0; border-right: 1px solid #2A0B12;
  scrollbar-width: thin; scrollbar-color: #6E2836 transparent;
}
.side .brand { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; padding: 4px 8px 22px; }
.side .brand .arch { width: 58px; height: 74px; border-radius: 29px 29px 6px 6px; overflow: hidden; border: 1px solid #C79A6E; box-shadow: 0 0 0 3px rgba(199,154,110,.15); flex: none; }
.side .brand .arch img { width: 100%; height: 100%; object-fit: cover; }
.side .brand b { display: block; font-family: var(--read); font-weight: 500; font-size: 25px; line-height: .98; color: #F6E3DF; letter-spacing: .02em; }
.side .brand small { display: block; margin-top: 8px; font-family: var(--display); font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: #D7A9A6; line-height: 1.5; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 9px 14px; border-radius: 8px; color: #F2D9D8; text-decoration: none; font-family: var(--display); font-size: 15.5px; transition: background .2s, color .2s; border: 1px solid transparent; }
.nav a svg { width: 21px; height: 21px; flex: none; color: #E2B5B2; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { background: linear-gradient(90deg, #A9475A, #8C3448); color: #FFF4F1; border-color: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.nav a[aria-current="page"] svg { color: #FFF4F1; }
.nav .sep { height: 1px; background: rgba(255,255,255,.1); margin: 12px 8px; }
.nav .group { font-family: var(--display); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: #C99491; padding: 8px 14px 4px; }
.side .bookmark { margin: 18px 6px 0; padding: 16px; border-radius: 10px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.07); display: grid; gap: 6px; text-decoration: none; color: inherit; position: relative; }
.side .bookmark::before { content: ""; position: absolute; top: -1px; right: 18px; width: 14px; height: 30px; background: var(--rose); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.side .bookmark .label { color: #D7A9A6; font-size: 10px; }
.side .bookmark b { font-family: var(--read); font-weight: 500; font-size: 15.5px; color: #FBE9E6; line-height: 1.3; padding-right: 22px; }
.side .bookmark span { font-family: var(--display); font-size: 12.5px; color: #D7A9A6; }
.side .side-deco { margin-top: auto; padding-top: 20px; pointer-events: none; display: flex; justify-content: center; }
.side .side-deco img { width: 210px; margin-bottom: -12px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 var(--gut); background: rgba(243, 227, 217, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--secondary); }
.topbar .search input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--divider); background: var(--paper-light); padding: 0 14px 0 42px; font-family: var(--display); font-size: 15px; }
.topbar .search input:focus { outline: none; border-color: var(--wine); background: var(--white); box-shadow: 0 0 0 4px rgba(142,38,59,.1); }
.topbar .who { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 4px 6px 4px 4px; border-radius: 999px; }
.topbar .who:hover { background: var(--paper-light); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--wine); color: var(--paper-light); display: grid; place-items: center; font-family: var(--read); font-size: 19px; border: 2px solid var(--blush); flex: none; }
.topbar .who b { font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; display: block; line-height: 1.2; }
.topbar .who small { font-family: var(--display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--secondary); }
.topbar .mobile-brand { display: none; font-family: var(--read); font-size: 21px; color: var(--burgundy); text-decoration: none; letter-spacing: .02em; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--olive); display: inline-block; }
.sync-dot.pending { background: var(--gold); }
.sync-dot.off { background: var(--divider); }
.page { flex: 1; padding: clamp(24px, 4vw, 52px) var(--gut) 120px; width: 100%; max-width: 1240px; margin: 0 auto; position: relative; }
.page.narrow { max-width: 900px; }
.page-head { position: relative; margin-bottom: 30px; }
.page-head .deco { position: absolute; right: -10px; top: -30px; width: clamp(140px, 22vw, 260px); pointer-events: none; opacity: .95; }
.page-head .lead { margin-top: 14px; }
.crumbs { font-family: var(--display); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { color: var(--wine); }
.crumbs svg { width: 14px; height: 14px; color: var(--secondary); }
.bottomnav { display: none; }
.more-sheet .nav a { color: var(--ink); }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { height: 60px; padding: 0 12px 0 16px; }
  .topbar .mobile-brand { display: block; }
  .topbar .search { display: none; }
  .topbar .who b, .topbar .who small { display: none; }
  .page { padding: 22px 16px calc(var(--bottom-h) + 110px); }
  .page-head .deco { width: 120px; top: -16px; right: -8px; opacity: .55; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 250, 246, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .bottomnav a, .bottomnav button { display: grid; justify-items: center; gap: 2px; padding: 7px 2px; min-height: 54px; border: 0; background: none; text-decoration: none; color: var(--secondary); font-family: var(--display); font-size: 11px; letter-spacing: .02em; border-radius: 8px; }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav [aria-current="page"] { color: var(--wine); }
  .bottomnav [aria-current="page"] svg { color: var(--wine); }
}

/* ---------- MODO FOCO ---------- */
body.focus .side, body.focus .bottomnav, body.focus .deco, body.focus .side-deco, body.focus .page-head .deco, body.focus .decor { display: none !important; }
body.focus .shell { grid-template-columns: 1fr; }
body.focus .topbar .search { visibility: hidden; }
body.focus .page { max-width: 860px; }
body.focus .guide-fab { transform: scale(.85); opacity: .8; }
.focus-banner { display: none; }
body.focus .focus-banner { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 40; background: var(--burgundy); color: var(--paper-light); border-radius: 999px; padding: 6px 8px 6px 18px; align-items: center; gap: 12px; font-family: var(--display); font-size: 14px; box-shadow: var(--shadow); }
body.focus .focus-banner button { background: var(--paper-light); color: var(--burgundy); border: 0; border-radius: 999px; min-height: 36px; padding: 0 14px; font-family: var(--display); }

/* ---------- CARTAS (miniaturas) ---------- */
.tarot { position: relative; border-radius: 9px; overflow: hidden; background: var(--paper-light); box-shadow: var(--shadow-card); aspect-ratio: 962 / 1635; }
.tarot img { width: 100%; height: 100%; object-fit: cover; }
.tarot.reversed img { transform: rotate(180deg); }
.tarot.hidden-name::after { content: ""; position: absolute; left: 5%; right: 5%; bottom: 3%; height: 11.5%; background: #F6E6DA; border-radius: 0 0 6px 6px; box-shadow: inset 0 0 0 1px rgba(53,16,24,.08); }
.tarot.hidden-name.reversed::after { top: 3%; bottom: auto; border-radius: 6px 6px 0 0; }
.tarot.hidden-name::before { content: ""; position: absolute; left: 32%; right: 32%; top: 1.6%; height: 4.4%; background: #F6E6DA; border-radius: 4px; z-index: 1; }
.tarot.hidden-name.reversed::before { top: auto; bottom: 1.6%; }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
@media (max-width: 560px) { .deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; } }
.deck-item { display: grid; gap: 10px; text-decoration: none; color: var(--ink); padding: 10px 10px 12px; border-radius: 12px; background: rgba(255,250,246,.55); border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s, background .2s; }
.deck-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--white); }
.deck-item .nm { text-align: center; font-family: var(--read); font-size: 15.5px; line-height: 1.25; }
.deck-item .nm small { display: block; font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--secondary); margin-top: 3px; }
.deck-item .status { justify-self: center; }
.deck-list { display: grid; gap: 8px; }
.deck-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.deck-row .tarot { border-radius: 5px; }
.deck-row b { font-weight: 500; display: block; }
.deck-row span { font-size: 14.5px; color: var(--secondary); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); overflow-x: auto; scrollbar-width: none; margin: 0 0 22px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex: none; border: 0; background: none; padding: 12px 16px; min-height: 48px; font-family: var(--read); font-size: 16.5px; color: var(--secondary); border-bottom: 2.5px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--burgundy); border-bottom-color: var(--wine); font-weight: 500; }
.tabs button:hover { color: var(--burgundy); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .input { min-height: 44px; font-family: var(--display); font-size: 15px; }
.toolbar .search-in { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.toolbar .search-in svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--secondary); }
.toolbar .search-in .input { padding-left: 36px; }

/* ---------- FICHA ---------- */
.ficha-top { display: grid; grid-template-columns: minmax(220px, 330px) minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.ficha-top .tarot { max-width: 330px; }
.ficha-top .name { font-size: clamp(42px, 7vw, 76px); letter-spacing: .01em; text-transform: uppercase; color: var(--burgundy); line-height: .95; }
.ficha-top .orig { font-family: var(--display); font-size: 15px; letter-spacing: .34em; text-transform: uppercase; color: var(--ink); margin-top: 10px; }
.ficha-top .essence { font-style: italic; font-size: clamp(18px, 2.2vw, 21px); color: var(--secondary); line-height: 1.55; margin: 22px 0; max-width: 46ch; }
.corr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 26px 0 8px; }
.corr button { display: grid; justify-items: center; gap: 4px; text-align: center; background: transparent; border: 0; padding: 6px 2px; border-radius: 10px; min-height: 44px; }
.corr button:hover { background: var(--paper-light); }
.corr .ic { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--divider); display: grid; place-items: center; color: var(--wine); background: var(--paper-light); }
.corr .ic svg { width: 24px; height: 24px; }
.corr .k { font-family: var(--display); font-size: 12.5px; color: var(--ink); }
.corr .v { font-size: 14.5px; color: var(--secondary); line-height: 1.25; }
@media (max-width: 640px) { .corr { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.fact { border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 14px; display: grid; gap: 6px; align-content: start; }
.fact .label { font-size: 10.5px; color: var(--wine); }
.fact b { font-weight: 400; font-size: 16px; line-height: 1.3; }
@media (max-width: 1100px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ficha-top { grid-template-columns: 1fr; } .ficha-top .tarot { max-width: 260px; margin: 0 auto; } }
.blk { margin-bottom: 18px; }
.blk-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.blk-h .n { font-family: var(--display); font-size: 12px; color: var(--berry); letter-spacing: .1em; }
.blk-h h3 { font-family: var(--display); font-size: 13.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--burgundy); }
.blk-h svg { width: 18px; height: 18px; color: var(--wine); }
.blk-h .tag { margin-left: auto; }
.sym { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sym:last-child { border-bottom: 0; }
.sym .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--wine); font-family: var(--display); font-size: 13px; }
.sym b { font-weight: 600; color: var(--burgundy); }
.sym .seen { color: var(--secondary); font-size: 15.5px; }
.sym .idea { grid-column: 2; }
.ladder { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-book); overflow: hidden; background: var(--white); }
.ladder > div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: baseline; }
.ladder > div:last-child { border-bottom: 0; background: #FBEFEB; }
.ladder .label { color: var(--wine); }
@media (max-width: 560px) { .ladder > div { grid-template-columns: 1fr; gap: 4px; } }
.tension { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tension:last-child { border-bottom: 0; }
.tension span:first-child { text-align: right; }
.tension i { font-style: normal; color: var(--berry); font-family: var(--display); }
.energy { border-left: 3px solid var(--rose); padding-left: 16px; }
.energy.pot { border-color: var(--olive); }
.energy.sh { border-color: var(--secondary); }
.energy.bl { border-color: var(--gold); }
.energy.ex { border-color: var(--wine); }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-grid .fact b { font-size: 15.5px; }
@media (max-width: 1000px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .mini-grid { grid-template-columns: 1fr; } }
.pos-table { display: grid; }
.pos-table > div { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.pos-table b { font-family: var(--display); font-weight: 500; font-size: 14px; color: var(--wine); letter-spacing: .04em; }
@media (max-width: 560px) { .pos-table > div { grid-template-columns: 1fr; gap: 2px; } }
.combo { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.combo:hover { background: var(--paper-light); }
.combo .tarot { border-radius: 5px; }
.issue-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--secondary); padding: 10px 14px; background: var(--paper-light); border: 1px dashed var(--divider); border-radius: 8px; margin-top: 14px; max-width: 330px; }
.issue-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--gold); }
.tab-next { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.quick { background: var(--burgundy); color: var(--paper-light); border-radius: var(--r-book); padding: 24px; }
.quick .label { color: var(--blush); }
.quick ul.list li { color: #F4DCD9; }
.quick ul.list li::before { background: var(--blush); }

/* ---------- FORMAÇÃO ---------- */
.journey { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.fcard { display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-book); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; position: relative; }
.fcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.fcard .art { aspect-ratio: 4 / 3; background: var(--paper-light); display: grid; place-items: center; overflow: hidden; }
.fcard .art img { width: 82%; height: auto; }
.fcard .body { padding: 16px 18px 18px; display: grid; gap: 6px; align-content: start; }
.fcard .num { font-family: var(--display); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--wine); }
.fcard h3 { font-size: 21px; }
.fcard p { font-size: 15px; color: var(--secondary); margin: 0; }
.ribbon { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 12.5px; color: var(--secondary); margin-top: 6px; }
.ribbon .marks { display: flex; gap: 3px; flex-wrap: wrap; }
.ribbon .marks i { width: 7px; height: 14px; background: var(--line); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%); }
.ribbon .marks i.on { background: var(--wine); }
.lesson-list { display: grid; gap: 8px; }
.lrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, background .2s; }
.lrow:hover { border-color: var(--rose); }
.lrow .no { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--divider); display: grid; place-items: center; font-family: var(--display); font-size: 14px; color: var(--wine); }
.lrow.done .no { background: var(--wine); color: var(--white); border-color: var(--wine); }
.lrow.current { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(142,38,59,.08); }
.lrow b { font-weight: 500; display: block; line-height: 1.3; }
.lrow span { font-size: 14.5px; color: var(--secondary); display: block; }
.lrow .meta { font-family: var(--display); font-size: 13px; color: var(--secondary); white-space: nowrap; }
.lrow .thumbcard { width: 40px; }

/* ---------- AULA ---------- */
.stepper { display: flex; gap: 0; align-items: center; margin: 18px 0 28px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.stepper::-webkit-scrollbar { display: none; }
.stepper button { flex: none; display: grid; justify-items: center; gap: 6px; background: none; border: 0; padding: 4px 6px; min-width: 64px; color: var(--secondary); font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.stepper .c { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--divider); display: grid; place-items: center; font-size: 12.5px; letter-spacing: 0; background: var(--paper-light); }
.stepper .done .c { border-color: var(--wine); color: var(--wine); }
.stepper .cur .c { background: var(--burgundy); border-color: var(--burgundy); color: var(--white); }
.stepper .cur { color: var(--burgundy); }
.stepper .ln { flex: 1; min-width: 14px; height: 1px; background: var(--divider); margin-bottom: 20px; }
.step-body { min-height: 40vh; animation: stepIn .35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-kicker { font-family: var(--display); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--wine); margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.abrir { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 320px); gap: 28px; align-items: center; }
.abrir .big { font-size: clamp(23px, 3.2vw, 32px); line-height: 1.38; color: var(--burgundy); font-family: var(--read); }
@media (max-width: 760px) { .abrir { grid-template-columns: 1fr; } .abrir img { max-width: 220px; margin: 0 auto; } }
.obs-cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 8px 0 22px; }
.obs-cards .tarot { width: clamp(130px, 22vw, 230px); }
.obs-cards.many .tarot { width: clamp(110px, 16vw, 170px); }
.hints { display: grid; gap: 8px; }
.hint-btn { justify-self: start; }
.learn-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.learn-sec:last-child { border-bottom: 0; }
.learn-sec h3 { font-size: 22px; margin-bottom: 10px; }
details.deeper { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-light); margin-top: 18px; }
details.deeper summary { cursor: pointer; padding: 14px 18px; min-height: 48px; font-family: var(--display); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); display: flex; align-items: center; gap: 10px; list-style: none; }
details.deeper summary::-webkit-details-marker { display: none; }
details.deeper summary svg { width: 16px; height: 16px; transition: transform .2s; }
details.deeper[open] summary svg { transform: rotate(90deg); }
details.deeper > div { padding: 0 18px 16px; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--divider); flex-wrap: wrap; }
.page-no { font-family: var(--display); font-size: 12.5px; letter-spacing: .2em; color: var(--secondary); text-transform: uppercase; }
.reveal { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-book); background: #FBF1EC; padding: 20px; animation: stepIn .35s var(--ease); }
.reveal h4 { font-family: var(--display); font-size: 12.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--wine); margin-bottom: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px 16px; min-height: 52px; border-radius: 10px; border: 1px solid var(--divider); background: var(--paper-light); margin-bottom: 10px; font-family: var(--read); font-size: 16.5px; line-height: 1.45; transition: border-color .2s, background .2s; }
.opt:hover { border-color: var(--wine); }
.opt .mk { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--divider); display: grid; place-items: center; margin-top: 1px; }
.opt.sel { border-color: var(--wine); background: #F6DADB; }
.opt.right { border-color: var(--olive); background: var(--olive-soft); }
.opt.right .mk { border-color: var(--olive); background: var(--olive); color: white; }
.opt.wrong { border-color: var(--berry); }
.opt .why { display: block; font-size: 15px; color: var(--secondary); margin-top: 6px; }
.sort-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); margin-bottom: 10px; }
.sort-item p { margin-bottom: 10px; }
.done-mark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 13px; color: var(--olive); }
.done-mark svg { width: 16px; height: 16px; }

/* ---------- TIRAGENS ---------- */
.spread-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.spread-card { display: grid; gap: 10px; text-decoration: none; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-book); padding: 18px; transition: transform .25s var(--ease), box-shadow .25s; }
.spread-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.spread-card h3 { font-size: 20px; }
.spread-card p { font-size: 15px; color: var(--secondary); margin: 0; }
.mini-layout { display: grid; gap: 4px; height: 76px; align-content: center; justify-content: start; }
.mini-layout i { width: 20px; height: 32px; border-radius: 3px; background: var(--blush); border: 1px solid var(--rose); }
.mini-layout i.cross { transform: rotate(90deg); background: var(--rose); }
.layout { display: grid; gap: clamp(8px, 1.6vw, 18px); justify-content: center; margin: 10px 0 24px; }
.slot { position: relative; width: clamp(92px, 13vw, 150px); display: grid; gap: 8px; justify-items: center; }
.slot .ph { width: 100%; aspect-ratio: 962 / 1635; border: 1.5px dashed var(--rose); border-radius: 9px; background: rgba(255,250,246,.6); display: grid; place-items: center; text-align: center; color: var(--wine); font-family: var(--display); font-size: 13px; padding: 8px; gap: 4px; transition: background .2s, border-color .2s; }
.slot .ph svg { width: 22px; height: 22px; }
.slot button.ph:hover { background: var(--white); border-color: var(--wine); }
.slot .pos { font-family: var(--display); font-size: 12px; letter-spacing: .06em; color: var(--ink); text-align: center; line-height: 1.25; }
.slot .pos b { color: var(--wine); font-weight: 500; }
.slot.cross { z-index: 2; }
.slot.cross .tarot, .slot.cross .ph { transform: translateY(34%) rotate(90deg) scale(.8); }
.slot .acts { display: flex; gap: 4px; }
.slot .acts button { min-height: 32px; font-size: 12px; padding: 4px 10px; }
.layout.compact .slot { width: clamp(64px, 11vw, 120px); }
@media (max-width: 560px) { .layout.wide { overflow-x: auto; justify-content: start; padding-bottom: 8px; } }
.patterns { display: grid; gap: 10px; }
.pattern { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); }
.pattern .ic { width: 36px; height: 36px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--wine); }
.pattern .ic svg { width: 18px; height: 18px; }
.pattern b { font-weight: 500; display: block; }
.assist-steps { counter-reset: s; display: grid; gap: 16px; }
.astep { border: 1px solid var(--line); background: var(--white); border-radius: var(--r-book); padding: clamp(16px, 2.4vw, 24px); }
.astep > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.astep > header .c { width: 34px; height: 34px; border-radius: 50%; background: var(--burgundy); color: var(--white); display: grid; place-items: center; font-family: var(--display); font-size: 14px; flex: none; }
.astep > header h3 { font-size: 21px; }
.astep.locked { opacity: .55; }
.pos-read { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-top: 1px dashed var(--line); }
@media (max-width: 560px) { .pos-read { grid-template-columns: 64px 1fr; gap: 12px; } }

/* ---------- PICKER / MODAL / SHEET ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(53, 16, 24, .45); display: grid; place-items: center; padding: 16px; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(920px, 100%); max-height: min(88svh, 900px); background: var(--paper); border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; }
.modal > header { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--paper-light); }
.modal > header h2 { font-size: 22px; flex: 1; }
.modal .mbody { padding: 18px; overflow: auto; }
.modal > footer { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--paper-light); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.picker-grid button { border: 2px solid transparent; background: none; padding: 4px; border-radius: 10px; display: grid; gap: 6px; text-align: center; font-family: var(--display); font-size: 12px; line-height: 1.25; color: var(--ink); }
.picker-grid button:hover { border-color: var(--rose); }
.picker-grid button[aria-pressed="true"] { border-color: var(--wine); background: var(--white); }
.picker-grid .tarot { border-radius: 6px; box-shadow: 0 2px 6px rgba(53,16,24,.15); }
@media (max-width: 640px) {
  .overlay { padding: 0; align-items: end; }
  .modal { max-height: 92svh; border-radius: 16px 16px 0 0; }
  .picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- GUIA ---------- */
.guide-fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: 22px; z-index: 45; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 18px 6px 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: var(--burgundy); color: var(--paper-light); font-family: var(--display); font-size: 14.5px; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 14px 34px -12px rgba(53,16,24,.65); transition: transform .2s, background .2s, opacity .2s; }
.guide-fab:hover { background: var(--wine); transform: translateY(-2px); }
.guide-fab .face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--blush); }
.guide-fab .face img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .guide-fab { bottom: calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom)); padding: 4px; } .guide-fab .lbl { display: none; } }
.guide-panel { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); border-left: 1px solid var(--line); box-shadow: -20px 0 50px -30px rgba(53,16,24,.5); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .35s var(--ease); }
.guide-panel.open { transform: none; }
.guide-panel > header { padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); background: var(--paper-light); display: flex; align-items: center; gap: 12px; }
.guide-panel > header .face { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid var(--blush); flex: none; }
.guide-panel > header .face img { width: 100%; height: 100%; object-fit: cover; }
.guide-panel > header h2 { font-size: 21px; }
.guide-panel > header small { font-family: var(--display); font-size: 12px; color: var(--secondary); display: block; }
.guide-ctx { margin: 12px 16px 0; font-family: var(--display); font-size: 12.5px; color: var(--secondary); display: flex; gap: 8px; align-items: flex-start; }
.guide-log { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; padding: 12px 14px; border-radius: 12px; font-size: 16px; line-height: 1.55; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: var(--white); border: 1.5px dashed var(--rose); border-radius: 4px 14px 14px 14px; }
.msg.me { align-self: flex-end; background: var(--burgundy); color: var(--paper-light); border-radius: 14px 4px 14px 14px; }
.msg.sys { align-self: center; background: transparent; color: var(--secondary); font-family: var(--display); font-size: 13.5px; text-align: center; }
.msg .actions { display: flex; gap: 6px; margin-top: 8px; }
.quick-acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.quick-acts button { font-family: var(--display); font-size: 13px; padding: 7px 12px; min-height: 38px; border-radius: 999px; border: 1px solid var(--divider); background: var(--paper-light); color: var(--burgundy); text-align: left; }
.quick-acts button:hover { border-color: var(--wine); background: var(--white); }
.guide-form { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper-light); }
.guide-form textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 640px) {
  .guide-panel { top: auto; height: 88svh; width: 100%; border-radius: 18px 18px 0 0; transform: translateY(105%); border-left: 0; }
  .guide-panel.open { transform: none; }
}
.scrim { position: fixed; inset: 0; background: rgba(53,16,24,.32); z-index: 65; animation: fadeIn .2s; }

/* ---------- ÁUDIO ---------- */
.listen { display: inline-flex; align-items: center; gap: 8px; }
.player { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 46; background: var(--ink); color: var(--paper-light); border-radius: 999px; padding: 6px 8px 6px 16px; display: flex; gap: 6px; align-items: center; box-shadow: var(--shadow); font-family: var(--display); font-size: 13.5px; max-width: calc(100% - 32px); }
.player .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.player button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: inherit; display: grid; place-items: center; }
.player button svg { width: 18px; height: 18px; }
@media (max-width: 960px) { .player { bottom: calc(var(--bottom-h) + 80px); } }
.rec { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 22px; border-radius: var(--r-book); background: var(--white); border: 1px solid var(--line); }
.rec .time { font-family: var(--display); font-size: 40px; font-weight: 300; color: var(--burgundy); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.rec .recbtn { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--wine); color: white; display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(142,38,59,.12); }
.rec .recbtn svg { width: 30px; height: 30px; }
.rec .recbtn.on { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(142,38,59,.06); } }
.rec audio { width: 100%; max-width: 420px; }

/* ---------- HOME ---------- */
.hero-home { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.continue { position: relative; overflow: hidden; border-radius: var(--r-book); background: linear-gradient(110deg, #F6DCDA 0%, #EDB9BC 100%); border: 1px solid #E3A9AE; padding: clamp(20px, 3vw, 32px); padding-right: clamp(150px, 26%, 260px); min-height: 220px; display: grid; align-content: center; gap: 8px; }
.continue img { position: absolute; right: -6px; bottom: -14px; width: clamp(150px, 30%, 270px); }
.continue h2 { font-size: clamp(24px, 3vw, 31px); }
@media (max-width: 860px) { .hero-home { grid-template-columns: 1fr; } .continue { padding-right: 130px; } .continue img { width: 150px; } }
@media (max-width: 420px) { .continue { padding: 20px 20px 150px; } .continue img { width: 150px; right: 50%; transform: translateX(50%); } }
.tile { display: grid; gap: 8px; align-content: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-book); padding: 18px; text-decoration: none; color: var(--ink); transition: border-color .2s, transform .25s var(--ease); position: relative; overflow: hidden; }
a.tile:hover { border-color: var(--rose); transform: translateY(-2px); }
.tile .label { color: var(--wine); }
.tile b { font-weight: 500; font-size: 18px; line-height: 1.3; color: var(--burgundy); }
.tile .row .tarot { width: 46px; }
.quote { font-style: italic; color: var(--secondary); text-align: center; margin: 40px auto 0; max-width: 52ch; font-size: 17px; }

/* ---------- MÉTODO (como usar) ---------- */
.method { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.method > div { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 18px 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-book); }
.method .ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--wine); }
.method .ic svg { width: 26px; height: 26px; }
.method b { font-family: var(--display); font-weight: 500; letter-spacing: .26em; font-size: 13.5px; color: var(--burgundy); }
.method span { font-size: 14.5px; color: var(--secondary); line-height: 1.4; }
@media (max-width: 860px) { .method { grid-template-columns: 1fr; } .method > div { grid-template-columns: 56px 1fr; text-align: left; justify-items: start; align-items: center; } .method > div span { grid-column: 2; } .method > div b { grid-column: 2; } .method .ic { grid-row: span 2; } }

/* ---------- DIÁRIO ---------- */
.entry { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.entry:hover { border-color: var(--rose); }
.entry .fan { display: flex; }
.entry .fan .tarot { width: 38px; margin-left: -14px; border: 2px solid var(--white); border-radius: 5px; }
.entry .fan .tarot:first-child { margin-left: 0; }
.entry b { font-weight: 500; display: block; }
.entry time { font-family: var(--display); font-size: 12.5px; color: var(--secondary); white-space: nowrap; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 34px 16px; color: var(--secondary); }
.empty img { width: 200px; }

/* ---------- PRÁTICA ---------- */
.pcard { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; text-decoration: none; color: var(--ink); padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s; }
.pcard:hover { border-color: var(--rose); }
.pcard .tarot { border-radius: 5px; }
.pcard b { font-weight: 500; display: block; line-height: 1.3; }
.pcard span.k { font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--wine); }

/* ---------- REVISÃO ---------- */
.review-q { max-width: 760px; margin: 0 auto; }
.review-q .tarot { width: min(240px, 60vw); margin: 0 auto 20px; }

/* ---------- TOAST ---------- */
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 100; background: var(--ink); color: var(--paper-light); padding: 12px 18px; border-radius: 10px; font-family: var(--display); font-size: 14.5px; box-shadow: var(--shadow); animation: fadeIn .2s; max-width: calc(100% - 32px); }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--secondary); font-family: var(--display); gap: 12px; }
.loading .moon { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset -10px 0 0 0 var(--wine); animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err-page { max-width: 560px; margin: 60px auto; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .book .cover-face { transition: opacity .4s !important; }
  .book.opening .cover-face { transform: none; opacity: 0; }
}
@media print { .side, .topbar, .bottomnav, .guide-fab, .guide-panel { display: none !important; } .shell { display: block; } }
.slot.cross { align-self: start; pointer-events: none; }
.slot.cross > * { pointer-events: auto; }
.slot.cross .pos { display: none; }
.slot.cross .acts { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); }

/* ajustes */
.hint svg, p svg, .ribbon svg, .status svg, .label svg, .muted svg, .guide-ctx svg { width: 1.05em; height: 1.05em; vertical-align: -.16em; flex: none; }
.continue, .tile, .fcard, .spread-card, .deck-item, .entry, .lrow, .pcard, .combo, .deck-row { text-decoration: none; }
.continue * { text-decoration: none; }
@media (max-width: 560px) {
  .page-head .deco { display: none; }
  .step-nav .page-no { display: none; }
  .step-nav .btn { flex: 1; padding-inline: 14px; }
  .title-xl { font-size: clamp(34px, 10vw, 44px); }
}
@media (max-width: 560px) {
  .section-h h2 { white-space: normal; line-height: 1.5; letter-spacing: .2em; }
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
  .entry { grid-template-columns: auto minmax(0, 1fr); }
  .entry time { grid-column: 2; }
  .lrow { grid-template-columns: 40px minmax(0, 1fr); }
  .lrow .meta { grid-column: 2; white-space: normal; }
  .tab-next .btn { width: 100%; }
  .bottomnav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
}
.bottomnav > * { min-width: 0; }
.astep { min-width: 0; overflow-wrap: anywhere; }
.astep .row { min-width: 0; }
.pos-read > * { min-width: 0; }
@media (max-width: 560px) {
  .pos-read[style*="auto 1fr"] { grid-template-columns: 1fr !important; }
  .astep .chips .chip { padding: 6px 11px; }
  .astep .seg { width: 100%; }
}
.slot:has(+ .slot.cross) .pos { margin-top: 34px; }

/* ---------- CAPA: versões desktop (paisagem) e mobile (retrato) ---------- */
.book .cover-face picture { display: block; width: 100%; height: 100%; }
@media (orientation: landscape) and (min-width: 900px) {
  .book { height: 100svh; width: 100vw; aspect-ratio: auto; }
  .book .cover-face, .book .page-under { border-radius: 0; }
  .book .cover-face img { object-position: center 40%; }
  .book .cover-face::after { width: 22px; }
  .book .open-cta { bottom: 5.5%; }
}
@media (max-width: 560px) and (orientation: portrait) {
  .book { height: 100svh; width: 100vw; aspect-ratio: auto; }
  .book .cover-face, .book .page-under { border-radius: 0; }
  .book .cover-face img { object-position: center 30%; }
  .book .open-cta { bottom: calc(6% + env(safe-area-inset-bottom)); }
}
