/* Funil e painel. Usa os tokens de ../styles.css */

[hidden] { display: none !important; }

body.plain { background: var(--bg); min-height: 100vh; }
.plain h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }

/* Top bar simples */
.topbar { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 18px 24px; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-3); }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 74, 34, .12); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.hint { font-size: .8rem; color: var(--ink-3); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--sans); font-size: .8rem; font-weight: 700; display: inline-grid; place-items: center; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.checkout .seg { grid-template-columns: 1fr 1fr 1fr; }
.seg button {
  font: inherit; font-size: .92rem; font-weight: 500; padding: 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2); cursor: pointer;
}
.seg button.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1.25fr .9fr; gap: 24px; max-width: 1000px; margin: 12px auto 80px; padding: 0 24px; align-items: start; }
.checkout-main { display: grid; gap: 18px; }
.pix-box { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 10px; padding: 14px; font-size: .9rem; color: var(--ink-2); }
.bump {
  border: 2px dashed #c9a98a; border-radius: var(--radius); background: #fffaf3; padding: 20px;
  display: grid; grid-template-columns: auto 1fr; gap: 14px; cursor: pointer;
}
.bump input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; }
.bump-head { font-weight: 600; color: var(--ink); }
.bump-head em { font-style: normal; color: var(--accent); }
.bump p { font-size: .9rem; color: var(--ink-2); margin-top: 4px; }
.summary { position: sticky; top: 24px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: .94rem; color: var(--ink-2); padding: 8px 0; }
.summary-line strong { color: var(--ink); font-weight: 600; }
.summary-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.summary-total span:last-child { font-family: var(--serif); font-size: 1.8rem; }
.summary-inst { text-align: right; font-size: .85rem; color: var(--ink-3); margin-bottom: 20px; }
.trust { display: grid; gap: 10px; margin-top: 20px; font-size: .85rem; color: var(--ink-2); }
.trust span { display: flex; gap: 8px; }
.trust span::before { content: "✓"; color: var(--accent); font-weight: 700; }
.plan-switch { font-size: .82rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; background: none; border: 0; font-family: inherit; }
.form-error {
  display: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px;
  background: #fbecea; color: #8a2f22; font-size: .88rem;
}
.form-error.on { display: block; }
.pay-result { text-align: center; }
.pay-result h2 { font-family: var(--serif); font-size: 1.45rem; margin: 8px 0 10px; }
.pay-result p { color: var(--ink-2); font-size: .95rem; }
.qr-wrap { margin: 18px auto; width: 220px; height: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.qr-wrap img { width: 200px; height: 200px; }
.pix-code, .boleto-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; word-break: break-all; text-align: left;
  background: var(--bg); border-radius: 10px; padding: 12px; margin: 12px 0 14px; color: var(--ink-2);
}
.pay-actions { display: grid; gap: 10px; margin-top: 8px; }
.pay-wait { font-size: .85rem; color: var(--ink-3); margin-top: 12px; }

/* Centered single-column screens */
.focus { max-width: 520px; margin: 40px auto 80px; padding: 0 24px; text-align: center; }
.focus .card { text-align: left; margin-top: 28px; }
.check-badge { width: 64px; height: 64px; border-radius: 50%; background: #e7f2ea; color: #2f7a48; display: grid; place-items: center; margin: 0 auto 22px; }
.focus .lead { margin-top: 14px; font-size: 1.02rem; }
.unlock { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 18px; font-size: .9rem; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 8px 16px; width: fit-content; margin-left: auto; margin-right: auto; }

/* Onboarding */
.ob { max-width: 640px; margin: 24px auto 80px; padding: 0 24px; text-align: center; }
.progress { display: flex; gap: 8px; justify-content: center; margin-bottom: 36px; }
.progress i { width: 40px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s ease; }
.progress i.on { background: var(--accent); }
.ob-step { display: none; }
.ob-step.on { display: block; animation: fadeUp .4s ease both; }
.ob h1 { margin-bottom: 10px; }
.ob .sub { margin: 0 auto 32px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.choice {
  font: inherit; text-align: left; cursor: pointer; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; transition: border-color .15s ease, transform .15s ease;
}
.choice:hover { transform: translateY(-1px); border-color: #d2c6b3; }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 74, 34, .12); }
.choice strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--ink); }
.choice span { font-size: .85rem; color: var(--ink-3); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pills button {
  font: inherit; font-size: .9rem; cursor: pointer; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.pills button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.ob-label { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 26px 0 12px; }
.ob-actions { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }
.ob-input { max-width: 440px; margin: 0 auto 16px; text-align: center; font-size: 1.05rem; padding: 14px 18px; border-radius: 999px; }

.generating { display: none; max-width: 420px; margin: 60px auto; text-align: center; }
.generating.on { display: block; animation: fadeUp .4s ease both; }
.generating .gen-error { color: #8a3a2c; margin-top: 22px; }
body.generating-on .shell,
body.generating-on .tabbar { display: none !important; }
body.app-shell .generating.on {
  position: fixed; inset: 0; z-index: 80; max-width: none; margin: 0;
  padding: 12vh 24px 40px; background: var(--bg); overflow: auto;
}
body.app-shell .generating.on .gen-list { max-width: 420px; margin-left: auto; margin-right: auto; }
body.app-shell .generating.on h1 { max-width: 440px; margin-left: auto; margin-right: auto; }
.gen-list { list-style: none; display: grid; gap: 14px; margin-top: 30px; text-align: left; }
.gen-list li { display: flex; gap: 12px; align-items: center; color: var(--ink-3); transition: color .3s ease; }
.gen-list li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .3s ease; }
.gen-list li.doing { color: var(--ink); }
.gen-list li.doing::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.gen-list li.done { color: var(--ink-2); }
.gen-list li.done::before { background: var(--accent); border-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== App shell ===== */
body.app-shell { background: var(--bg); }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: #fcfbf8;
  padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
}
.side .brand { padding: 0 10px 22px; }
.side .brand img { width: 22px; height: 22px; }
.mtop .brand img { width: 20px; height: 20px; }
.side-new { margin: 0 0 18px; }
.side a.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: .93rem; font-weight: 500;
}
.side a.nav-item svg { width: 18px; height: 18px; color: var(--ink-3); }
.side a.nav-item:hover { background: var(--bg-alt); color: var(--ink); }
.side a.nav-item.on { background: var(--accent-soft); color: var(--accent-ink); }
.side a.nav-item.on svg { color: var(--accent); }
.nav-count { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--ink-3); background: var(--bg-alt); border-radius: 999px; padding: 1px 8px; }
.nav-count:empty { display: none; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.side-foot strong { display: block; color: var(--ink); font-weight: 600; font-size: .88rem; line-height: 1.3; }
.side-foot-copy { min-width: 0; color: inherit; text-decoration: none; }
.side-foot-copy:hover strong { color: var(--accent-ink); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  border: 0; padding: 0; font-family: inherit; cursor: pointer;
}
button.avatar:hover { filter: brightness(1.08); }
button.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(122, 74, 34, .18); }
.side-user, .mtop-user { position: relative; flex: none; }
.side-user-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  min-width: 188px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px -16px rgba(40, 32, 24, .35); padding: 6px;
}
.mtop-user .side-user-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); }
.side-user-menu a,
.side-user-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-radius: 8px; padding: 10px 12px; font: inherit; font-size: .9rem;
  font-weight: 500; color: var(--ink); cursor: pointer; text-decoration: none;
}
.side-user-menu a:hover,
.side-user-menu button:hover { background: var(--bg-alt); }
.side-user-menu .signout { color: #a33a2a; }

.content { min-width: 0; }
.mtop { display: none; }
.main { padding: 36px 40px 80px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page { display: none; }
.page.on { display: block; animation: fadeUp .3s ease both; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 2rem; }
.page-head p { color: var(--ink-2); margin-top: 6px; }

/* ----- Início ----- */
.hello { margin-bottom: 22px; }
.hello-date { font-size: .82rem; font-weight: 500; color: var(--ink-3); margin-bottom: 2px; }
.hello h1 { font-size: 2.1rem; }

.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.home-main, .home-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.home-side { position: sticky; top: 24px; }

.ask { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.ask-label { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin: 2px 4px 12px; }
.ask-row {
  display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 16px; color: var(--ink-3); transition: border-color .15s ease, box-shadow .15s ease;
}
.ask-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 74, 34, .12); }
.ask-row input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; color: var(--ink); outline: none; padding: 8px 0; }
.ask-row .btn { flex: none; }

.scroller { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroller::-webkit-scrollbar { display: none; }
#ask-chips { margin-top: 12px; padding: 0 2px; }
#ask-chips button, .filters button {
  flex: none; font: inherit; font-size: .85rem; cursor: pointer; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); white-space: nowrap;
}
#ask-chips button:hover, .filters button:hover { border-color: #d2c6b3; color: var(--ink); }
.filters button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.next-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 26px; position: relative; overflow: hidden; }
.next-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 138, .22), transparent 70%); pointer-events: none;
}
.next-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.next-card .label { color: #a59e92; margin: 0; text-transform: uppercase; }
.badge-soft { flex: none; font-size: .76rem; font-weight: 600; color: #f1e6d8; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px 10px; }
.next-card h2 { font-size: 1.9rem; color: #fff; }
.next-sub { color: #c9c2b6; margin-top: 4px; font-size: .95rem; }
.prog { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: .8rem; color: #c9c2b6; }
.prog-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: #d9b994; border-radius: 6px; transition: width .6s ease; }
.prog-bar.sm { height: 4px; background: var(--bg-alt); max-width: 70px; }
.prog-bar.sm i { background: var(--accent); }
.steps-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 16px; font-size: .86rem; color: #a59e92; }
.steps-list li { display: flex; align-items: center; gap: 8px; }
.steps-list li.done { color: #e8e2d8; }
.tick { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #5a544b; display: grid; place-items: center; flex: none; }
.steps-list li.done .tick { background: #d9b994; border-color: #d9b994; color: var(--ink); }
.tick svg { width: 11px; height: 11px; }
.next-actions { display: flex; gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.next-card .btn-light:hover { background: #f1ece3; }
.btn-outline-light { border: 1px solid rgba(255, 255, 255, .25); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.panel-head h2 { font-size: 1.2rem; }
.panel-head a { font-size: .85rem; color: var(--accent); font-weight: 500; }

.planner { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px 10px 10px; border-radius: 14px; background: var(--bg); }
.slot-date { text-align: center; line-height: 1.1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 0; }
.slot-date strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.slot-date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.slot.filled .slot-date { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.slot-body { display: grid; gap: 1px; min-width: 0; font: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.slot-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-meta { font-size: .82rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-empty .slot-title { color: var(--ink-3); font-weight: 500; }
.slot-add { width: 30px; height: 30px; border-radius: 50%; border: 1px dashed #c9bfae; color: var(--ink-3); display: grid; place-items: center; }
.slot-add svg { width: 15px; height: 15px; }
.slot:has(.slot-empty):hover { background: var(--accent-soft); }

.cards { padding-bottom: 2px; }
.mini {
  flex: none; width: 210px; display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: 14px;
  background: var(--bg); border: 1px solid transparent; transition: border-color .15s ease, transform .15s ease;
}
.mini:hover { border-color: var(--line); transform: translateY(-1px); }
.mini .status { justify-self: start; margin-bottom: 8px; }
.mini strong { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; line-height: 1.25; }
.mini-ref { font-size: .82rem; color: var(--ink-3); }
.mini-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .78rem; color: var(--ink-3); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; display: grid; gap: 2px; }
.stat-tile strong { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; line-height: 1; }
.stat-tile span { font-size: .74rem; color: var(--ink-3); line-height: 1.3; }
.stat-tile.accent { background: var(--accent-soft); border-color: transparent; }
.stat-tile.accent strong { color: var(--accent-ink); }

.wod { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.wod .greek { font-family: var(--serif); font-size: 2rem; color: var(--ink); display: block; line-height: 1.2; }
.wod .translit { font-size: .85rem; color: var(--accent); font-weight: 500; display: block; margin: 4px 0 10px; }
.wod p:not(.label) { font-size: .9rem; color: var(--ink-2); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.dates { display: grid; gap: 4px; }
.date-row {
  font: inherit; text-align: left; background: none; border: 0; cursor: pointer; color: inherit;
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 12px;
}
.date-row:hover { background: var(--bg); }
.date-days { text-align: center; font-size: .68rem; color: var(--ink-3); line-height: 1.1; text-transform: uppercase; letter-spacing: .04em; }
.date-days strong { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.date-body strong { display: block; font-size: .93rem; font-weight: 600; }
.date-body span { font-size: .8rem; color: var(--ink-3); }
.date-go { color: var(--ink-3); }
.date-go svg { width: 16px; height: 16px; }

@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake { animation: shake .3s ease; border-color: #c0533f !important; }

/* ----- Biblioteca ----- */
.lib-tools { display: grid; gap: 12px; margin-bottom: 16px; }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 0 14px; color: var(--ink-3); max-width: 420px;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 74, 34, .12); }
.search input { flex: 1; border: 0; background: none; font: inherit; color: var(--ink); padding: 12px 0; outline: none; }
.item-main { min-width: 0; }
.item-main .item-title, .item-main .item-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 40px 0 14px; }
.section-title h2 { font-size: 1.3rem; }
.section-title a { font-size: .88rem; color: var(--accent); }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item:hover { background: #fdfcfa; }
.item-title { font-weight: 600; color: var(--ink); }
.item-meta { font-size: .84rem; color: var(--ink-3); }
.item-actions { display: flex; gap: 4px; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--ink-3); display: grid; place-items: center; }
.icon-btn:hover { background: var(--bg-alt); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

.status { font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status.rascunho { background: #f1ece3; color: var(--ink-2); }
.status.pronto { background: #e7eef8; color: #2f5b8f; }
.status.pregado { background: #e7f2ea; color: #2f7a48; }

.empty { text-align: center; padding: 48px 24px; color: var(--ink-3); }
.empty strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.2rem; color: var(--ink); margin-bottom: 6px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; }
.toolbar .input { max-width: 360px; }
.toolbar .select { width: auto; }

.new-card { max-width: 640px; }
.new-card .seg { grid-template-columns: repeat(3, 1fr); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ----- Séries e ocasiões ----- */
.plan-page { display: grid; gap: 28px; }
.plan-block .section-title { margin: 0 0 14px; }
.plan-block .section-title .hint { margin: 0; }

.plan-soon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.soon {
  font: inherit; text-align: left; cursor: pointer; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px;
  display: grid; gap: 6px; align-content: start; transition: border-color .15s ease, transform .15s ease;
}
.soon:hover { border-color: #d2c6b3; transform: translateY(-1px); }
.soon.featured {
  background: var(--ink); color: #fff; border-color: transparent;
  box-shadow: 0 16px 36px -18px rgba(28, 24, 20, .55);
}
.soon-days { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.soon.featured .soon-days { color: #d9b994; }
.soon h3 { font-size: 1.28rem; line-height: 1.2; }
.soon-meta { font-size: .88rem; color: var(--ink-2); }
.soon-ref { font-size: .82rem; color: var(--ink-3); }
.soon.featured .soon-meta, .soon.featured .soon-ref { color: rgba(255, 255, 255, .68); }

.grid-occ { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.occ {
  font: inherit; text-align: left; cursor: pointer; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; display: grid; gap: 4px; transition: border-color .15s ease, transform .15s ease;
}
.occ:hover { border-color: #d2c6b3; transform: translateY(-1px); }
.occ em { font-style: normal; font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.occ strong { font-family: var(--serif); font-weight: 500; font-size: 1.08rem; color: var(--ink); }
.occ span { font-size: .84rem; color: var(--ink-3); }

.plan-cal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cal-row {
  font: inherit; width: 100%; text-align: left; cursor: pointer; color: inherit; background: none; border: 0;
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.cal-row:last-child { border-bottom: 0; }
.cal-row:hover { background: var(--bg); }
.cal-body { display: grid; gap: 2px; min-width: 0; }
.cal-body strong { font-size: .95rem; font-weight: 600; }
.cal-body span { font-size: .82rem; color: var(--ink-3); }
.cal-go { font-size: .82rem; font-weight: 500; color: var(--accent); }

.grid-series { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.series { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; }
.series-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.series h3 { font-size: 1.18rem; }
.series-top p { font-size: .88rem; color: var(--ink-3); margin-top: 4px; }
.series-count {
  flex: none; font-size: .75rem; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  background: var(--bg-alt); color: var(--ink-2);
}
.series ol, .year-weeks { list-style: none; display: grid; gap: 6px; }
.series ol { margin-top: auto; }
.series li button, .series li a, .year-weeks li button, .year-weeks li a {
  font: inherit; width: 100%; text-align: left; background: var(--bg); border: 0; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; color: var(--ink-2); display: flex; gap: 12px; align-items: flex-start;
}
.series li a, .year-weeks li a { color: inherit; }
.series li button:hover, .series li a:hover, .year-weeks li button:hover, .year-weeks li a:hover {
  background: var(--accent-soft); color: var(--accent-ink);
}
.week-n { flex: none; font-size: .75rem; font-weight: 600; color: var(--ink-3); min-width: 44px; padding-top: 2px; }
.week-body { display: grid; gap: 2px; min-width: 0; }
.week-body strong { font-size: .9rem; font-weight: 600; color: var(--ink); }
.week-body em { font-style: normal; font-size: .75rem; color: var(--ink-3); }
.series li.done button, .series li.done a, .year-weeks li.done a { background: #f4f7f0; }
.series li.done .week-n { color: #4a6b3a; }

.plan-year {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
}
.plan-year h3 { font-size: 1.3rem; margin: 4px 0 6px; }
.plan-year > div > p:not(.plan-kicker) { font-size: .9rem; color: var(--ink-2); }
.plan-year .year-weeks { margin-top: 14px; grid-template-columns: repeat(2, 1fr); }
.plan-year.locked { border-style: dashed; background: #fffaf3; }
.plan-year.locked .btn { flex: none; }

.settings { max-width: 560px; }
.danger { color: #a33a2a; background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; margin-top: 8px; text-decoration: underline; text-underline-offset: 3px; }

/* ----- Conta ----- */
.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; max-width: 640px; }
.privacy-btn {
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  cursor: pointer; display: grid; place-items: center; flex: none;
}
.privacy-btn:hover { border-color: #d2c6b3; color: var(--ink); }
.privacy-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.privacy-btn svg { width: 20px; height: 20px; display: block; }
.privacy-btn .eye-on { display: none; }
.privacy-btn[aria-pressed="true"] .eye-off { display: none; }
.privacy-btn[aria-pressed="true"] .eye-on { display: block; }
.page[data-page="conta"].privacy-on #acct-lead { color: var(--ink-3); }
.page[data-page="conta"].privacy-on .acct-veil > * {
  filter: blur(16px);
  pointer-events: none;
  user-select: none;
}
body.privacy-on #side-name,
body.privacy-on #side-plan,
body.privacy-on #side-avatar,
body.privacy-on #m-avatar {
  filter: blur(10px);
  user-select: none;
}

.acct-veil { max-width: 640px; display: grid; gap: 14px; }
.account { display: grid; gap: 14px; }

.acct-card { padding: 22px 24px; }
.acct-card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.acct-card .field:last-child { margin-bottom: 0; }
.acct-plan-status {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 500; line-height: 1.2;
}

.check-list { display: grid; gap: 0; margin-top: 4px; border-top: 1px solid var(--line); }
.check-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 0;
  font-size: .9rem; color: var(--ink-2); cursor: pointer; border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; padding-bottom: 0; }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

.acct-actions { padding: 2px 0 4px; }

.plan-kicker { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.plan-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.2; margin-bottom: 6px; }
.plan-copy { font-size: .88rem; color: var(--ink-2); margin-bottom: 16px; }
.plan-facts { display: grid; gap: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.plan-facts div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.plan-facts dt { color: var(--ink-3); }
.plan-facts dd { color: var(--ink); font-weight: 500; text-align: right; }
.plan-actions { display: grid; gap: 8px; }

.acct-foot {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  margin: 8px 0 0; padding: 0 2px 8px;
}
.acct-foot button {
  background: none; border: 0; padding: 0; font: inherit; font-size: .85rem;
  color: var(--ink-3); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.acct-foot button:hover { color: var(--ink); }
.acct-foot .danger { color: #a33a2a; margin: 0; }

/* Mobile tab bar */
.tabbar { display: none; }

/* ===== Sermon editor ===== */
.editor-top {
  position: sticky; top: 0; z-index: 20; background: rgba(250, 248, 244, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.editor-top-inner { display: flex; align-items: center; gap: 16px; padding: 12px 24px; max-width: 1400px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.back:hover { color: var(--ink); }
.editor-ref { font-size: .9rem; color: var(--ink-3); margin-left: 4px; }
.editor-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.saved { font-size: .8rem; color: var(--ink-3); margin-right: 6px; }

.editor { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: 0; max-width: 1400px; margin: 0 auto; min-height: calc(100vh - 62px); }
.pane { padding: 28px 32px 80px; }
.pane-left { border-right: 1px solid var(--line); background: #fcfbf8; }
.tabs { display: flex; gap: 4px; background: var(--bg-alt); padding: 4px; border-radius: 10px; width: fit-content; margin-bottom: 22px; }
.tabs button { font: inherit; font-size: .88rem; font-weight: 500; padding: 7px 14px; border-radius: 7px; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

.context-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: .92rem; color: var(--ink-2); margin-bottom: 22px; }
.passage h2 { font-size: 1.5rem; margin-bottom: 14px; }
.passage p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; color: var(--ink); margin-bottom: 10px; }
.passage sup { font-family: var(--sans); font-size: .7rem; color: var(--accent); font-weight: 600; margin-right: 4px; }
.w { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; border-bottom: 2px solid #d9b994; display: inline; }
.w:hover, .w.on { background: var(--accent-soft); }
.passage p.tap-hint, .passage p.hint { font-family: var(--sans); font-size: .82rem; line-height: 1.5; color: var(--ink-3); }
.passage p.tap-hint { margin-bottom: 14px; }
.passage p.hint { margin-top: 16px; }

.word-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.word-chip {
  font: inherit; text-align: left; cursor: pointer;
  display: grid; gap: 2px; max-width: 100%;
  padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.word-chip:hover, .word-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.word-chip .orig { font-size: 1.05rem; line-height: 1.2; }
.word-chip .gloss { font-family: var(--sans); font-size: .75rem; color: var(--ink-3); }
.word-peek {
  background: var(--card); border: 1px solid var(--accent); border-radius: 12px;
  padding: 14px 16px; margin: 0 0 14px;
}
.word-peek .greek { font-size: 1.35rem; display: block; }
.word-peek .translit { font-family: var(--sans); font-size: .8rem; color: var(--ink-3); display: block; margin: 2px 0 8px; }
.word-peek .gloss { font-weight: 600; margin: 0 0 6px; }
.word-peek p { font-family: var(--sans); font-size: .9rem; color: var(--ink-2); margin: 0; }

.mark-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.mark-toggle {
  font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer;
}
.mark-toggle.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.mark-bar-hint { font-family: var(--sans); font-size: .78rem; color: var(--ink-3); }
.mark-clear {
  margin-left: auto; font: inherit; font-size: .78rem; color: #a33a2a; background: none; border: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.mark-swatch {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .08);
  padding: 0; cursor: pointer; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
  display: inline-block; vertical-align: middle;
}
.mark-swatch.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.mark-swatch.mark-ouro, .mark.mark-ouro { background: #f0c56e; }
.mark-swatch.mark-vinho, .mark.mark-vinho { background: #e8b4b8; }
.mark-swatch.mark-oliva, .mark.mark-oliva { background: #c5d49a; }
.mark-swatch.mark-oceano, .mark.mark-oceano { background: #b7d0e4; }
mark.mark {
  color: inherit; padding: .05em .12em; border-radius: 3px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  cursor: pointer; font: inherit;
}
mark.mark.pulse { box-shadow: 0 0 0 4px rgba(122, 74, 34, .22); }
.passage.marking { cursor: text; }
.passage.marking .w { cursor: pointer; }

.mark-legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.mark-legend li { min-width: 0; }
.mark-legend button {
  font: inherit; width: 100%; max-width: 100%; box-sizing: border-box; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; cursor: pointer;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 2px; align-items: start;
}
.mark-legend button:hover { border-color: #d2c6b3; }
.mark-legend i.mark-swatch { grid-column: 1; grid-row: 1; margin-top: 3px; }
.mark-legend span {
  grid-column: 2; grid-row: 1; min-width: 0;
  font-family: var(--serif); font-size: .92rem; color: var(--ink); line-height: 1.45;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.mark-legend em {
  grid-column: 2; grid-row: 2; font-style: normal; font-size: .75rem; color: var(--ink-3);
}

.mark-pop {
  position: fixed; z-index: 120; display: none; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #1c1a17; color: #fff; padding: 8px 10px; border-radius: 999px;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, .45);
}
.mark-pop.on { display: flex !important; }
.mark-pop-label { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #c9a98a; margin: 0 4px 0 6px; }
.mark-pop .mark-swatch { width: 18px; height: 18px; }
.mark-pop-off {
  width: 22px; height: 22px; border-radius: 50%; border: 0; background: #3a342c; color: #e9e3d8;
  font: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
}
.mark-note {
  width: 160px; font: inherit; font-size: .8rem; border: 0; border-radius: 999px;
  padding: 6px 10px; background: #2a2620; color: #fff; outline: none;
}
.slide mark.mark { color: inherit; }

.word-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 12px; }
.word-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 74, 34, .1); }
.word-card .greek { font-size: 1.6rem; }
.word-card .gloss { font-weight: 600; color: var(--ink); margin: 6px 0 4px; }
.word-card p { font-size: .9rem; color: var(--ink-2); }

.comment { border-left: 2px solid var(--accent-soft); padding: 2px 0 2px 16px; margin-bottom: 20px; }
.comment strong { display: block; color: var(--ink); }
.comment em { font-size: .82rem; color: var(--ink-3); font-style: normal; display: block; margin-bottom: 6px; }
.comment p { font-size: .92rem; color: var(--ink-2); }
.comment-note { font-size: .8rem; color: var(--ink-3); margin-top: 20px; }

.demo-banner { background: #fffaf3; border: 1px dashed #c9a98a; border-radius: 12px; padding: 14px 16px; font-size: .88rem; color: var(--ink-2); margin-bottom: 20px; }

.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font-size: .78rem; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }

.ed-title { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; outline: none; border-radius: 6px; }
.ed-idea { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--accent-ink); margin: 12px 0 28px; outline: none; border-radius: 6px; }
[contenteditable]:hover { background: rgba(122, 74, 34, .04); }
[contenteditable]:focus { background: rgba(122, 74, 34, .06); box-shadow: 0 0 0 4px rgba(122, 74, 34, .06); }

.pt { border-top: 1px solid var(--line); padding: 22px 0; display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.pt-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.pt-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pt-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; outline: none; border-radius: 6px; }
.pt-verses { font-size: .82rem; color: var(--ink-3); }
.pt-min { font-size: .78rem; color: var(--ink-3); margin-left: auto; }
.pt-text { color: var(--ink-2); margin-top: 8px; outline: none; border-radius: 6px; }
.pt-app { margin-top: 10px; padding: 10px 14px; background: var(--bg-alt); border-radius: 10px; font-size: .93rem; color: var(--ink); outline: none; }
.pt-app::before { content: "Aplicação · "; font-weight: 600; color: var(--accent); }

.block { border-top: 1px solid var(--line); padding: 22px 0; }
.block .label { margin-bottom: 10px; }
.block-text { color: var(--ink-2); outline: none; border-radius: 6px; min-height: 1.6em; }
.block-text:empty::before { content: attr(data-placeholder); color: var(--ink-3); }
.sources-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sources-list span { font-size: .8rem; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; color: var(--ink-2); background: var(--card); }
.sources-list span::before { content: "↗ "; color: var(--accent); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(28, 26, 23, .5);
  display: none; align-items: center; justify-content: center; padding: 24px;
  isolation: isolate;
}
.modal.on { display: flex; }
.modal-box {
  background: var(--card); border-radius: 18px; width: 100%; max-width: 560px; max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: fadeUp .2s ease both;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.2rem; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-body pre { font-family: var(--sans); white-space: pre-wrap; font-size: .92rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
body.modal-open { overflow: hidden; }

/* Slides: visor */
.slides { position: fixed; inset: 0; z-index: 200; background: #12100d; display: none; grid-template-columns: 0 1fr; grid-template-rows: 1fr auto; color: #e9e3d8; }
.slides.on { display: grid; }
.slides.config-on { grid-template-columns: 340px 1fr; }
.s-main { grid-column: 2; grid-row: 1; display: flex; min-height: 0; min-width: 0; }
.slides-stage { flex: 1; min-width: 0; min-height: 0; display: grid; place-items: center; padding: 28px; container-type: size; cursor: pointer; }
.slides-stage > .slide { width: min(100cqw, 100cqh * 16 / 9); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.slides.full .slides-stage { padding: 0; }
.slides.full .slides-stage > .slide { border-radius: 0; box-shadow: none; }
.slides.full .slides-bar { opacity: 0; transition: opacity .25s ease; }
.slides.full .slides-bar:hover { opacity: 1; }

.slides-bar { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 16px; color: #a59e92; font-size: .88rem; overflow-x: auto; }
.slides-bar button { background: #2a2620; color: #fff; border: 0; border-radius: 999px; padding: 9px 15px; font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.slides-bar button:hover:not(:disabled) { background: #3a342c; }
.slides-bar button:disabled { opacity: .35; cursor: default; }
.slides-bar button.on { background: #e9e3d8; color: #1c1a17; }
.slides-bar #s-count { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.s-sep { width: 1px; height: 22px; background: #2f2a23; margin: 0 4px; flex: none; }

/* Painel de personalização */
.s-config { grid-column: 1; grid-row: 1; overflow-y: auto; background: #1a1713; border-right: 1px solid #2a2620; padding: 18px 18px 30px; display: none; }
.slides.config-on .s-config { display: block; }
.s-config-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.s-config-head strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: #fff; }
.s-x { background: none; border: 0; color: #a59e92; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.s-label { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8a8275; margin: 22px 0 10px; }
.s-label span { letter-spacing: 0; text-transform: none; font-weight: 500; color: #c9a98a; }
.s-presets { display: grid; gap: 8px; }
.s-preset { text-align: left; background: #221e19; border: 1px solid #2f2a23; border-radius: 12px; padding: 11px 13px; color: #e9e3d8; font: inherit; cursor: pointer; display: grid; gap: 3px; }
.s-preset strong { font-size: .92rem; font-weight: 600; }
.s-preset span { font-size: .78rem; color: #a59e92; line-height: 1.45; }
.s-preset:hover { border-color: #4a4237; }
.s-preset.on { border-color: #c9a98a; background: #2b241c; box-shadow: 0 0 0 3px rgba(201, 169, 138, .14); }
.s-custom { font-size: .8rem; color: #c9a98a; margin-top: 2px; }
.s-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.s-swatch { background: none; border: 0; padding: 0; cursor: pointer; display: grid; gap: 5px; justify-items: center; color: #a59e92; font: inherit; font-size: .7rem; }
.s-swatch i { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background: var(--s-bg); border: 2px solid transparent; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.s-swatch i::after { content: ""; position: absolute; left: 22%; right: 22%; top: 44%; height: 12%; border-radius: 4px; background: var(--s-accent); }
.s-swatch.on i { border-color: #fff; }
.s-swatch.on { color: #fff; }
.s-seg { display: flex; gap: 6px; }
.s-seg button { flex: 1; background: #221e19; border: 1px solid #2f2a23; border-radius: 10px; padding: 8px 6px; color: #e9e3d8; font: inherit; font-size: .82rem; cursor: pointer; }
.s-seg button.on { border-color: #c9a98a; background: #2b241c; color: #fff; }
.s-checks { display: grid; gap: 2px; }
.s-check { display: flex; gap: 10px; align-items: flex-start; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: .86rem; color: #e9e3d8; }
.s-check:hover { background: #221e19; }
.s-check input { margin-top: 3px; accent-color: #c9a98a; width: 15px; height: 15px; flex: none; }
.s-check small { display: block; font-size: .74rem; color: #8a8275; margin-top: 1px; }
.s-group { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #c9a98a; margin: 16px 0 6px; }
.s-group:first-child { margin-top: 4px; }
.s-themes { grid-template-columns: repeat(5, 1fr); }

/* Modo apresentador */
.s-presenter { display: none; width: 320px; flex: none; border-left: 1px solid #2a2620; background: #1a1713; padding: 18px; overflow-y: auto; }
.slides.presenter-on .s-presenter { display: block; }
.s-presenter .s-label:first-of-type { margin-top: 18px; }
.s-timer { display: flex; align-items: baseline; gap: 8px; }
.s-timer span { font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; cursor: pointer; }
.s-timer span.near { color: #e8b04b; }
.s-timer span.late { color: #e0705a; }
.s-timer small { color: #8a8275; font-size: .85rem; }
.s-next-wrap .slide { width: 100%; border-radius: 8px; }
.s-end { aspect-ratio: 16 / 9; border: 1px dashed #3a342c; border-radius: 8px; display: grid; place-items: center; color: #8a8275; font-size: .85rem; }
.s-note { font-size: .95rem; line-height: 1.6; color: #e9e3d8; white-space: pre-line; }

/* Visão geral */
.s-grid {
  grid-column: 1 / -1; grid-row: 1; display: none; overflow-y: auto;
  background: #12100d; z-index: 4; padding: 26px 26px 20px;
  position: relative;
}
.s-grid.on { display: block; }
.s-grid-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; max-width: 1400px; margin: 0 auto; }
.s-thumb, .s-next-wrap {
  width: 100%; min-width: 0; container-type: inline-size; container-name: thumb;
}
.s-thumb {
  background: none; border: 0; padding: 0; cursor: pointer; display: grid; gap: 6px;
  color: #8a8275; font: inherit; font-size: .78rem; text-align: left;
}
.s-thumb .slide, .s-next-wrap .slide {
  container-type: normal;
  width: 100%;
  border-radius: 8px;
}
.s-thumb .slide { outline: 2px solid transparent; outline-offset: 3px; }
.s-thumb:hover .slide { outline-color: #4a4237; }
.s-thumb.on .slide { outline-color: #c9a98a; }
.s-thumb.on { color: #fff; }

.s-blackout { position: fixed; inset: 0; background: #000; z-index: 5; display: none; cursor: pointer; }
.s-blackout.on { display: block; }

/* Slide */
.slide {
  --s-bg: #1c1a17; --s-ink: #fbf8f2; --s-accent: #d9b48c; --s-muted: #a59e92; --fs: 1;
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; container-type: inline-size;
  background-color: var(--s-bg);
  background-image: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .07), transparent 62%);
  color: var(--s-ink); border-radius: 12px;
  display: flex; flex-direction: column; justify-content: center; padding: 6.5cqw 9cqw;
  font-family: var(--serif); text-align: center;
}
.theme-noite { --s-bg: #1c1a17; --s-ink: #fbf8f2; --s-accent: #d9b48c; --s-muted: #a59e92; }
.theme-claro { --s-bg: #ffffff; --s-ink: #1c1a17; --s-accent: #7a4a22; --s-muted: #6f675b; }
.theme-pergaminho { --s-bg: #f4ecdd; --s-ink: #2a2016; --s-accent: #8a5326; --s-muted: #7d6f5d; }
.theme-vinho { --s-bg: #4a1620; --s-ink: #fff5ee; --s-accent: #f0c27b; --s-muted: #d9b3b0; }
.theme-oceano { --s-bg: #0f2a44; --s-ink: #f2f7fb; --s-accent: #7fc4e8; --s-muted: #9db4c8; }
.theme-oliva { --s-bg: #2e3a24; --s-ink: #f6f3e7; --s-accent: #d6c46a; --s-muted: #b6b99a; }
.theme-contraste { --s-bg: #000000; --s-ink: #ffffff; --s-accent: #ffd400; --s-muted: #d0d0d0; }
.theme-carvao { --s-bg: #141414; --s-ink: #f3f1ec; --s-accent: #e8c39e; --s-muted: #9a9590; }
.theme-areia { --s-bg: #e8d9c0; --s-ink: #2c2218; --s-accent: #8b4e2a; --s-muted: #6e5d4a; }
.theme-aurora { --s-bg: #1a2438; --s-ink: #f6f0e6; --s-accent: #f0a36b; --s-muted: #b7c0ce; }
.slide.theme-contraste { background-image: none; }
.size-grande { --fs: 1.14; }
.size-extra { --fs: 1.3; }
.density-compacto { padding: 5cqw 7cqw; }
.density-compacto .s-inner { gap: 1.1cqw; }
.density-amplo { padding: 8.5cqw 11cqw; }
.density-amplo .s-inner { gap: 2.4cqw; }

.s-inner { display: flex; flex-direction: column; align-items: center; gap: 1.6cqw; max-width: 100%; position: relative; z-index: 1; }
.align-left { text-align: left; }
.align-left .s-inner { align-items: flex-start; }
.s-sub { font-family: var(--sans); font-size: calc(1.55cqw * var(--fs)); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--s-accent); }
.s-title { font-size: calc(4.6cqw * var(--fs)); line-height: 1.16; text-wrap: balance; }
.len-m .s-title { font-size: calc(3.8cqw * var(--fs)); }
.len-l .s-title { font-size: calc(3.2cqw * var(--fs)); line-height: 1.24; }
.len-xl .s-title { font-size: calc(2.7cqw * var(--fs)); line-height: 1.3; }
.s-body { font-family: var(--sans); font-size: calc(2.1cqw * var(--fs)); line-height: 1.55; color: var(--s-muted); max-width: 72cqw; text-wrap: pretty; }
.s-cite { font-family: var(--sans); font-size: calc(1.5cqw * var(--fs)); color: var(--s-accent); letter-spacing: .04em; }
.font-sans, .font-sans .s-title { font-family: var(--sans); }
.font-sans .s-title { font-weight: 600; letter-spacing: -.02em; }
.hl { color: var(--s-accent); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .14em; }
.gap { color: var(--s-accent); letter-spacing: .05em; }
.hl.reveal { text-decoration: none; background: var(--s-accent); color: var(--s-bg); padding: 0 .18em; border-radius: .12em; }

.s-foot { position: absolute; left: 4cqw; right: 4cqw; bottom: 2.6cqw; display: flex; justify-content: space-between; font-family: var(--sans); font-size: 1.25cqw; color: var(--s-muted); opacity: .8; }
.s-progress { position: absolute; left: 0; right: 0; bottom: 0; height: .55cqw; background: rgba(127, 127, 127, .18); }
.s-progress i { display: block; height: 100%; background: var(--s-accent); transition: width .35s ease; }

.slide.cover .s-title { font-size: calc(6cqw * var(--fs)); }
.slide.cover .s-inner::after { content: ""; width: 7cqw; height: .45cqw; border-radius: 1cqw; background: var(--s-accent); margin-top: 1.2cqw; }
.slide.cover .s-sub { order: 2; }
.slide.question::before { content: "?"; position: absolute; right: 4cqw; bottom: -8cqw; font-family: var(--serif); font-size: 42cqw; line-height: 1; color: var(--s-accent); opacity: .09; }
.slide.verse .s-title, .slide.idea .s-title, .slide.quote .s-title { font-style: italic; }
.slide.verse .s-sub { order: 2; letter-spacing: .1em; }
.slide.idea .s-title::before { content: "“"; color: var(--s-accent); }
.slide.idea .s-title::after { content: "”"; color: var(--s-accent); }
.slide.point .s-num { font-family: var(--serif); font-size: calc(13cqw * var(--fs)); line-height: .9; color: var(--s-accent); }
.slide.point .s-sub { color: var(--s-muted); letter-spacing: .1em; }
.slide.point .s-title { font-size: calc(5cqw * var(--fs)); }
.slide.explain .s-title { font-size: calc(3.6cqw * var(--fs)); }
.slide.apply .s-title { border-left: .55cqw solid var(--s-accent); padding-left: 2.6cqw; text-align: left; }
.slide.word .s-title { font-size: calc(9cqw * var(--fs)); line-height: 1.05; font-style: normal; }
.slide.word .s-sub { order: 2; letter-spacing: .06em; text-transform: none; font-size: calc(2.2cqw * var(--fs)); }
.slide.word .s-body { order: 3; }
.slide.word .s-cite { order: 4; color: var(--s-muted); }
.slide.illustration .s-title { font-size: calc(3.3cqw * var(--fs)); line-height: 1.3; }
.slide.context .s-body { font-family: var(--serif); font-size: calc(3cqw * var(--fs)); line-height: 1.4; color: var(--s-ink); }
.slide.blank .s-title { font-size: calc(4.4cqw * var(--fs)); }
.slide.call .s-title { font-size: calc(4.8cqw * var(--fs)); }

.s-list { list-style: none; display: grid; gap: 1.5cqw; text-align: left; margin-top: .6cqw; }
.s-list li { display: flex; align-items: center; gap: 2cqw; font-size: calc(3.2cqw * var(--fs)); line-height: 1.2; transition: opacity .3s ease; }
.s-list b { flex: none; width: 5cqw; height: 5cqw; border-radius: 50%; display: grid; place-items: center; font-family: var(--sans); font-size: calc(2.1cqw * var(--fs)); border: .25cqw solid var(--s-accent); color: var(--s-accent); }
.s-list li.on b { background: var(--s-accent); color: var(--s-bg); }
.s-list li.off { opacity: .38; }
.s-list li.done { opacity: .55; }
.s-list li.done b { background: transparent; }
.slide.week .s-list b { border-radius: 1cqw; }
.slide.agenda.map .s-sub { font-size: calc(1.8cqw * var(--fs)); }

.s-cue {
  font-family: var(--sans); font-size: calc(1.35cqw * var(--fs)); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--s-bg);
  background: var(--s-accent); padding: .45cqw 1.4cqw; border-radius: 999px;
}
.s-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw; width: 100%; text-align: left; margin-top: 1cqw; }
.s-split > div { background: rgba(127, 127, 127, .1); border-radius: 1.4cqw; padding: 2.2cqw 2.4cqw; }
.s-split small { display: block; font-family: var(--sans); font-size: calc(1.35cqw * var(--fs)); letter-spacing: .12em; text-transform: uppercase; color: var(--s-accent); margin-bottom: 1cqw; }
.s-split p { font-size: calc(2.4cqw * var(--fs)); line-height: 1.3; text-wrap: balance; }
.s-split > div:last-child { box-shadow: inset 0 0 0 .2cqw var(--s-accent); }

.slide.tension .s-title { font-size: calc(4.2cqw * var(--fs)); }
.slide.read .s-title { font-style: italic; font-size: calc(3.8cqw * var(--fs)); }
.slide.mantra .s-title { font-size: calc(6.2cqw * var(--fs)); line-height: 1.12; }
.slide.echo .s-title { font-style: italic; font-size: calc(4.2cqw * var(--fs)); }
.slide.repeat .s-title { font-size: calc(5cqw * var(--fs)); }
.slide.loop .s-sub { text-transform: none; letter-spacing: 0; font-size: calc(2cqw * var(--fs)); line-height: 1.35; max-width: 70cqw; }
.slide.oneword .s-title { font-size: calc(10cqw * var(--fs)); line-height: 1; letter-spacing: -.03em; }
.slide.silence { justify-content: center; }
.slide.silence .s-title { font-size: calc(3.2cqw * var(--fs)); letter-spacing: .28em; text-transform: uppercase; font-weight: 400; color: var(--s-muted); }
.slide.silence .s-inner::after { content: ""; width: 8cqw; height: .35cqw; background: var(--s-accent); margin-top: 2cqw; opacity: .5; }

.slide.enter .s-inner > * { animation: sIn .5s cubic-bezier(.2, .7, .2, 1) both; }
.slide.enter .s-inner > *:nth-child(2) { animation-delay: .08s; }
.slide.enter .s-inner > *:nth-child(3) { animation-delay: .16s; }
.slide.enter .s-inner > *:nth-child(4) { animation-delay: .24s; }
.slide.enter .s-list li { animation: sIn .5s cubic-bezier(.2, .7, .2, 1) both; }
.slide.enter .s-list li:nth-child(2) { animation-delay: .12s; }
.slide.enter .s-list li:nth-child(3) { animation-delay: .24s; }
.slide.enter .hl.reveal { animation: sReveal .7s .25s ease both; }
@keyframes sIn { from { opacity: 0; transform: translateY(1.4cqw); } to { opacity: 1; transform: none; } }
@keyframes sReveal { from { background: transparent; color: var(--s-accent); } to { background: var(--s-accent); color: var(--s-bg); } }
@media (prefers-reduced-motion: reduce) {
  .slide.enter .s-inner > *, .slide.enter .s-list li, .slide.enter .hl.reveal { animation: none; }
}

@media (max-width: 860px) {
  .slides.config-on { grid-template-columns: 0 1fr; }
  .s-config { position: fixed; inset: 0 0 64px 0; z-index: 3; border-right: 0; }
  .slides-stage { padding: 12px; }
  .slides.presenter-on .s-presenter { display: none; }
  .slides-bar { justify-content: flex-start; }
}

.print-slides { display: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 300; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .9rem; transition: all .3s ease; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 960px) {
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .editor { grid-template-columns: 1fr; }
  .pane-left { border-right: 0; border-top: 1px solid var(--line); order: 2; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mtop {
    display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 30;
    padding: 10px 18px; padding-top: max(10px, env(safe-area-inset-top));
    background: rgba(250, 248, 244, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .mtop .brand { font-size: 1.05rem; }
  .mtop .avatar { width: 34px; height: 34px; }
  .main { padding: 20px 16px 120px; }
  .page-head h1 { font-size: 1.7rem; }
  .hello h1 { font-size: 1.75rem; }
  .home { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .home-main, .home-side { display: contents; }
  .home > * > * { min-width: 0; }
  #ask { order: 1; }
  .kpis { order: 2; }
  #next { order: 3; }
  .panel-planner { order: 4; }
  .wod { order: 5; }
  .panel-recent { order: 6; }
  .panel-dates { order: 7; }
  .next-card { padding: 22px; border-radius: 20px; }
  .next-card h2 { font-size: 1.6rem; }
  .next-actions .btn { flex: 1; }
  .panel, .wod { padding: 18px 16px; border-radius: 16px; }
  .cards { margin: 0 -16px; padding: 0 16px 2px; scroll-snap-type: x mandatory; }
  .mini { scroll-snap-align: start; width: 72%; max-width: 240px; }
  .grid-3 { grid-template-columns: 1fr; }
  .plan-soon, .grid-occ, .grid-series { grid-template-columns: 1fr 1fr; }
  .soon.featured { grid-column: 1 / -1; }
  .plan-year { grid-template-columns: 1fr; }
  .plan-year .year-weeks { grid-template-columns: 1fr; }
  .plan-year .btn { width: 100%; }
  .acct-head { align-items: flex-start; flex-wrap: wrap; }
  .search { max-width: none; }
  .filters { margin: 0 -16px; padding: 0 16px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(252, 251, 248, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 8px 6px max(12px, env(safe-area-inset-bottom));
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; font-size: .68rem; font-weight: 500; color: var(--ink-3); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--accent); }
  .tabbar .tab-fab span {
    width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
    margin-top: -26px; box-shadow: 0 8px 20px -6px rgba(122, 74, 34, .7), 0 0 0 5px var(--bg);
  }
  .tabbar .tab-fab.on span { background: var(--accent-ink); }
  .editor-top-inner { flex-wrap: wrap; padding: 10px 16px; }
  .editor-actions { margin-left: 0; width: 100%; }
  .pane { padding: 22px 18px 60px; }
  .item { grid-template-columns: 1fr auto; }
  .item .status { display: none; }
}

@media (max-width: 560px) {
  .checkout .seg { font-size: .82rem; }
  .row, .row-3, .choices { grid-template-columns: 1fr; }
  .new-card .seg { grid-template-columns: 1fr 1fr 1fr; }
  .ed-title { font-size: 1.7rem; }
  .mark-bar-hint { display: none; }
  .mark-note { width: 120px; }
  .plan-soon, .grid-occ, .grid-series { grid-template-columns: 1fr; }
  .soon.featured { grid-column: auto; }
  .cal-go { display: none; }
}

@media print {
  body * { visibility: hidden; }
  .print-slides, .print-slides * { visibility: visible; }
  .print-slides { display: block; position: absolute; inset: 0; }
  .print-slides .slide { width: 100vw; border-radius: 0; box-shadow: none; page-break-after: always; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: landscape; margin: 0; }
}
