/* ============ Tema ============ */
:root {
  --primary: #ea6a12;
  --primary-strong: #c9560a;
  --primary-soft: #fff1e6;
  --primary-line: #fbd9bf;
  --gold: #c99a3a;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf6f2;
  --line: #efe7df;
  --text: #1f1a17;
  --muted: #7d726a;
  --shadow: 0 1px 2px rgba(60, 30, 10, .04), 0 8px 24px rgba(60, 30, 10, .06);

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --italic: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  --radius: 18px;
  --tabbar-h: 68px;
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #ff8a3d;
  --primary-strong: #ffa466;
  --primary-soft: #2c1d13;
  --primary-line: #4a2e1b;
  --gold: #e0b55a;

  --bg: #121010;
  --surface: #1b1816;
  --surface-2: #221e1b;
  --line: #2e2825;
  --text: #f4eee8;
  --muted: #a3978e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
.it { font-family: var(--italic); font-style: italic; }

.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 26px; height: 26px; }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 18px calc(var(--tabbar-h) + 100px + env(safe-area-inset-bottom));
}
.view { display: none; animation: fade .25s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ Cabeçalho ============ */
.top { margin-bottom: 18px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--italic); font-style: italic; font-weight: 700; font-size: 24px; letter-spacing: .01em;
}
.brand .logo {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary); color: #fff;
}
.brand .logo .i { width: 18px; height: 18px; fill: currentColor; stroke: none; }
[data-theme="dark"] .brand .logo { color: #1b0f06; }
.top h1 {
  font-family: var(--italic); font-style: italic; font-weight: 600;
  font-size: 34px; line-height: 1.05; margin: 0 0 4px;
}
.top .date { color: var(--muted); font-size: 14px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); transition: background .2s, transform .1s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn:active { transform: scale(.94); }

/* ============ Cartões ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.quote {
  background: linear-gradient(135deg, var(--primary-soft), var(--surface));
  border-color: var(--primary-line);
}
.quote p {
  font-family: var(--italic); font-style: italic; font-weight: 500;
  font-size: 20px; line-height: 1.3; margin: 0 0 6px;
}
.quote span { color: var(--muted); font-size: 12.5px; font-weight: 500; }

.card-label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  color: var(--primary); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.card-label .i { width: 14px; height: 14px; }
.quote .card-label .i { fill: currentColor; stroke: none; }

/* Leitura do dia */
.lit-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  transition: border-color .2s, transform .1s;
}
.lit-card:hover { border-color: var(--primary-line); }
.lit-card:active { transform: scale(.99); }
.lit-badge {
  width: 48px; height: 48px; border-radius: 15px; flex: none;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.lit-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lit-body .card-label { margin-bottom: 2px; }
.lit-title { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.15; }
.lit-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12.5px; }
.lit-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15) inset, 0 0 0 1px var(--line);
}
.lit-go { color: var(--muted); }
.lit-card.is-error .lit-badge { background: var(--surface-2); color: var(--muted); }
.lit-card.is-loading { cursor: default; }
.sk {
  display: block; height: 12px; border-radius: 6px; margin-top: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2));
  background-size: 200% 100%; animation: sk 1.2s linear infinite;
}
@keyframes sk { to { background-position: -200% 0; } }

/* Progresso do dia */
.progress-card { display: flex; gap: 18px; align-items: center; }
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--primary-soft); }
.ring .bar { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.ring .center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.ring .pct { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.ring .pct small { font-size: 13px; font-weight: 600; }
.progress-info { flex: 1; min-width: 0; }
.progress-info h3 { margin: 0 0 2px; font-size: 16px; }
.progress-info .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
}
.chip .i { width: 15px; height: 15px; color: var(--primary); }

.xpbar { height: 8px; background: var(--primary-soft); border-radius: 99px; overflow: hidden; }
.xpbar > div {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.xp-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Semana */
.week { display: flex; align-items: center; gap: 6px; margin: 4px 0 18px; }
.week .nav { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.week .nav:hover { color: var(--primary); background: var(--primary-soft); }
.days { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 0 7px; border-radius: 14px; border: 1px solid transparent;
  transition: background .15s;
}
.day:hover { background: var(--surface-2); }
.day .wd { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.day .dn { font-size: 15px; font-weight: 700; }
.day .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--p, 0) * 1%), var(--primary-soft) 0);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle, transparent 5px, #000 5.5px);
}
.day.is-empty .dot { background: var(--line); }
.day.is-today { border-color: var(--primary-line); }
.day.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.day.is-selected .wd { color: rgba(255, 255, 255, .85); }
.day.is-selected .dot { background: conic-gradient(#fff calc(var(--p, 0) * 1%), rgba(255, 255, 255, .35) 0); }

.back-today {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  margin: -8px 0 14px;
}

/* Lista de tarefas */
.group { margin-bottom: 18px; }
.group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 4px 8px;
}
.group-title .i { width: 16px; height: 16px; color: var(--primary); }
.group-title .count { margin-left: auto; font-weight: 600; letter-spacing: 0; }

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px;
  transition: border-color .2s, background .2s, opacity .2s;
}
.task:hover { border-color: var(--primary-line); }
.check {
  position: relative;
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  border: 2px solid var(--primary-line); display: grid; place-items: center;
  color: transparent; transition: all .2s;
}
.check:hover { border-color: var(--primary); }
.check .i { width: 17px; height: 17px; stroke-width: 3; }
.task.done .check { background: var(--primary); border-color: var(--primary); color: #fff; animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }

.task-body { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.task-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; transition: color .2s; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--primary-line); }
.task.done { background: var(--surface-2); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 12.5px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-meta .i { width: 14px; height: 14px; }
.task-meta .cat .i { color: var(--primary); }
.task .edit { color: var(--muted); opacity: .7; padding: 6px; border-radius: 8px; }
.task .edit:hover { color: var(--primary); opacity: 1; background: var(--primary-soft); }

.empty {
  text-align: center; padding: 34px 20px; color: var(--muted);
  border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.empty .badge {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.empty h3 { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 24px; color: var(--text); margin: 0 0 4px; }
.empty p { margin: 0 0 16px; font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px;
  font-weight: 600; font-size: 15px; transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); }
[data-theme="dark"] .btn-primary { color: #1b0f06; }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { color: #d33a2c; background: transparent; border: 1px solid var(--line); }
.btn-danger:hover { background: rgba(211, 58, 44, .08); }
.btn-block { width: 100%; }

.footer-note {
  text-align: center; color: var(--muted); margin-top: 26px;
  font-family: var(--italic); font-style: italic; font-size: 17px;
}

/* ============ FAB e tabbar ============ */
.fab {
  position: fixed; z-index: 20;
  right: max(18px, calc(50% - 262px));
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 20px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(234, 106, 18, .35);
  transition: transform .15s, background .2s, opacity .2s;
}
.fab .i { width: 26px; height: 26px; stroke-width: 2.4; }
.fab:hover { background: var(--primary-strong); }
.fab:active { transform: scale(.94); }
.fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }
[data-theme="dark"] .fab { color: #1b0f06; }

.tabbar {
  position: fixed; z-index: 15; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: center; gap: 8px;
}
.tab {
  width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 12px; font-weight: 600;
  transition: color .2s;
}
.tab .i { width: 22px; height: 22px; }
.tab.is-active { color: var(--primary); }
.tab.is-active .i { stroke-width: 2.4; }

/* ============ Sheet (formulário) ============ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 10, 4, .45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: bd .2s ease;
}
.sheet-backdrop[hidden] { display: none; }
@keyframes bd { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 640px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 26px; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h2 { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 28px; margin: 0; }
.sheet .msg { color: var(--muted); margin: -6px 0 18px; }

.field { margin-bottom: 16px; }
.field > label, .field > .label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px;
}
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surface-2); outline: none; transition: border-color .2s, background .2s;
}
.input:focus { border-color: var(--primary); background: var(--surface); }
.input::placeholder { color: var(--muted); opacity: .7; }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--line);
  color: var(--text); transition: all .15s;
}
.cat-opt .i { color: var(--primary); margin-top: 1px; }
.cat-opt b { display: block; font-size: 13.5px; font-weight: 600; }
.cat-opt small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; margin-top: 2px; }
@media (max-width: 360px) { .cat-grid { grid-template-columns: 1fr; } }
.hint { margin: -3px 0 8px; color: var(--muted); font-size: 12px; opacity: .85; }
.cat-opt:hover { border-color: var(--primary-line); }
.cat-opt.is-on { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }

.row { display: flex; gap: 10px; align-items: center; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface-2);
}
.switch-row .lbl { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.switch-row .lbl .i { color: var(--primary); }
.switch-row small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.switch {
  position: relative; width: 48px; height: 28px; border-radius: 99px; flex: none;
  background: var(--line); transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s;
}
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.wd-pick[hidden] { display: none; }
.wd-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.wd-pick button {
  height: 38px; border-radius: 11px; border: 1.5px solid var(--line);
  font-weight: 700; font-size: 13px; color: var(--muted);
}
.wd-pick button.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .wd-pick button.is-on { color: #1b0f06; }

.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions.stack { flex-direction: column; }

/* ============ Perfil ============ */
.profile-head { text-align: center; padding: 26px 18px 20px; }
.avatar {
  position: relative; width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  color: #fff; display: grid; place-items: center;
  font-family: var(--italic); font-style: italic; font-weight: 700; font-size: 40px;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--primary-line);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .cam {
  position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); color: var(--primary); border: 1px solid var(--line);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.avatar .cam .i { width: 16px; height: 16px; }
.profile-head h2 { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 32px; margin: 0; line-height: 1.1; }
.profile-head .patron { color: var(--muted); font-size: 13.5px; margin-top: 4px; display: inline-flex; gap: 6px; align-items: center; }
.profile-head .patron .i { width: 15px; height: 15px; color: var(--primary); }
.profile-head .motto { font-family: var(--italic); font-style: italic; font-size: 19px; margin: 12px 0 0; color: var(--text); }
.profile-head .edit-profile { margin-top: 16px; }

.level-card .lvl-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lvl-badge {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: var(--primary-soft); color: var(--primary); display: grid; place-items: center;
}
.lvl-badge .i { width: 26px; height: 26px; }
.level-card .lvl-name { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 26px; line-height: 1; }
.level-card .lvl-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow);
}
.stat .i { color: var(--primary); margin-bottom: 8px; }
.stat b { display: block; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; }

.section-title {
  display: flex; align-items: center; gap: 8px; margin: 22px 4px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.section-title .i { width: 16px; height: 16px; color: var(--primary); }
.section-title .count { margin-left: auto; letter-spacing: 0; font-weight: 600; }

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 130px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-col .b {
  width: 100%; max-width: 30px; flex: 1; border-radius: 9px; background: var(--primary-soft);
  position: relative; overflow: hidden;
}
.bar-col .b > div {
  position: absolute; left: 0; right: 0; bottom: 0; border-radius: 9px;
  background: linear-gradient(0deg, var(--primary), var(--gold)); transition: height .6s;
}
.bar-col span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.bar-col.is-today span { color: var(--primary); }

.achievements { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach {
  text-align: center; padding: 14px 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.ach .medal {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--gold)); color: #fff;
}
.ach b { display: block; font-size: 12.5px; line-height: 1.25; }
.ach span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.3; }
.ach.locked .medal { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
.ach.locked b { color: var(--muted); }

.settings { padding: 6px 0; }
.setting {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 18px; text-align: left;
}
.setting + .setting { border-top: 1px solid var(--line); }
.setting .i { color: var(--primary); }
.setting .txt { flex: 1; font-weight: 600; }
.setting .txt small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.setting.danger .i, .setting.danger .txt { color: #d33a2c; }

/* ============ Toasts ============ */
.toasts {
  position: fixed; z-index: 60; top: 14px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg);
  padding: 12px 16px; border-radius: 16px; max-width: 92vw;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
  animation: tin .3s cubic-bezier(.2, .8, .2, 1);
}
.toast .ic { width: 34px; height: 34px; border-radius: 11px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.toast b { display: block; font-size: 14px; }
.toast span { font-family: var(--italic); font-style: italic; font-size: 16px; opacity: .85; }
.toast.out { animation: tout .25s ease forwards; }
@keyframes tin { from { transform: translateY(-16px); opacity: 0; } }
@keyframes tout { to { transform: translateY(-16px); opacity: 0; } }

.xp-float {
  position: fixed; z-index: 50; pointer-events: none;
  font-weight: 700; font-size: 13px; color: var(--primary);
  animation: float .9s ease forwards;
}
@keyframes float { to { transform: translateY(-34px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ Leitor da liturgia ============ */
.sheet.is-tall { height: 92vh; display: flex; flex-direction: column; }
.lit-info { display: flex; flex-direction: column; gap: 4px; margin: -6px 0 14px; }
.lit-info b { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.2; }
.lit-info span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; flex: none;
}
.seg button {
  flex: 1 0 auto; padding: 8px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: all .15s;
}
.seg button.is-on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.lit-content { flex: 1; overflow-y: auto; padding: 18px 2px 8px; }
.lit-h { font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
.lit-ref { margin-bottom: 14px; }
.lit-refrao {
  background: var(--primary-soft); border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0; padding: 10px 14px; margin-bottom: 14px;
  font-family: var(--italic); font-style: italic; font-size: 18px; line-height: 1.35;
}
.lit-refrao b { font-family: var(--sans); font-style: normal; color: var(--primary); font-size: 13px; margin-right: 4px; }
.lit-text p { margin: 0 0 12px; font-size: 16px; line-height: 1.7; }
.lit-text sup { color: var(--primary); font-weight: 700; font-size: 10.5px; margin-right: 2px; }
.lit-or {
  display: flex; align-items: center; gap: 10px; margin: 18px 0;
  font-family: var(--italic); font-style: italic; color: var(--muted); font-size: 17px;
}
.lit-or::before, .lit-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.lit-src { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 11px; flex: none; }

/* ============ Notificações ============ */
.install-card, .notif-cta { display: flex; gap: 14px; align-items: flex-start; }
.notif-cta { flex-wrap: wrap; align-items: center; }
.notif-cta .txt { flex: 1; min-width: 0; }
.notif-cta .txt b, .install-card b { display: block; font-weight: 600; }
.notif-cta .txt span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.notif-cta .btn { margin-top: 4px; }
.install-card p { margin: 4px 0 10px; color: var(--muted); font-size: 13.5px; }
.install-card ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.install-card ol .i { width: 16px; height: 16px; color: var(--primary); vertical-align: -3px; }
.notif-empty { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13.5px; }
.notif-empty .i { color: var(--primary); }
.notif-list .setting { cursor: default; padding: 11px 14px; gap: 10px; }
.notif-list .setting .switch { cursor: pointer; }
.mini-time, .mini-select {
  height: 34px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface-2);
  padding: 0 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); outline: none;
}
.mini-time { width: 86px; }
.mini-select { max-width: 112px; }
.mini-time:focus, .mini-select:focus { border-color: var(--primary); }
.mini-time:disabled, .mini-select:disabled { opacity: .45; }
.notif-actions { display: flex; gap: 10px; margin: 10px 0 0; }
.notif-actions .btn { flex: 1; height: 42px; font-size: 14px; }
@media (max-width: 380px) {
  .notif-list .setting > .i:first-child { display: none; }
}
.app { padding-top: max(20px, env(safe-area-inset-top)); }
