.ms {
  --bg: #ffffff; --fg: #000000; --muted: #8a8a8e; --hair: #e5e5ea; --fill: #f2f2f7;
  position: relative; display: flex; flex-direction: column;
  height: 100%; min-height: 100vh; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
.ms button { font-family: inherit; }
.ms :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.ms-head { display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 16px 10px; }
.ms-season { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--accent); }
.ms-season-txt { font-size: 13px; font-weight: 590; letter-spacing: -0.01em; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ms-grow { flex: 1; }
.ms-ic { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--fill); color: var(--fg);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; font-size: 14px; font-weight: 600; }
.ms-ic:active { opacity: .55; }
.ms-lang-code { font-size: 12px; font-weight: 700; }

.ms-bar { height: 2px; background: var(--hair); margin: 0 16px; border-radius: 2px; overflow: hidden; }
.ms-bar > i { display: block; height: 100%; background: var(--accent); transition: width .28s cubic-bezier(.22,.61,.36,1); }

.ms-stage { flex: 1; overflow-y: auto; padding: 26px 22px 12px; }
.ms-part { font-size: 11px; font-weight: 680; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ms-title { font-size: 22px; font-weight: 680; letter-spacing: -0.024em; margin: 0 0 20px; }
.ms-label { font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ms-cue { font-size: 15px; line-height: 1.42; color: var(--muted); margin: 0 0 24px; }
.ms-hair { height: 1px; background: var(--hair); margin: 0 0 18px; }
.ms-say p { font-style: italic; font-size: clamp(26px, 7vw, 34px); line-height: 1.22; letter-spacing: -0.03em; font-weight: 590; margin: 0 0 16px; }
.ms-say.long p { font-size: clamp(19px, 5vw, 24px); line-height: 1.34; letter-spacing: -0.02em; }
.ms-say p:last-child { margin-bottom: 0; }
.ms-act { margin-top: 24px; font-size: 14px; line-height: 1.45; color: var(--muted); display: flex; gap: 8px; }
.ms-act svg { flex: none; margin-top: 2px; }
.ms-alt { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hair); }
.ms-alt p { font-size: 14px; line-height: 1.45; color: var(--muted); font-style: italic; margin: 0 0 8px; }
.ms-alt p:last-child { margin: 0; }

/* today page */
.ms-today-k { font-size: 12px; font-weight: 680; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.ms-today-h { font-size: 32px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; margin: 0 0 6px; }
.ms-today-sub { font-size: 16px; color: var(--muted); margin: 0 0 26px; }
.ms-block { margin-bottom: 26px; }
.ms-block h5 { font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.ms-block p { font-size: 16px; line-height: 1.5; margin: 0 0 12px; }
.ms-block p:last-child { margin-bottom: 0; }
.ms-mv { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.ms-mv:last-child { border-bottom: none; }
.ms-mv-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 18px; padding-top: 1px; }
.ms-mv-t { font-size: 16px; font-weight: 590; letter-spacing: -0.015em; }
.ms-mv-d { font-size: 14px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.ms-flags { list-style: none; padding: 0; margin: 0; }
.ms-flags li { font-size: 15px; line-height: 1.45; padding-left: 16px; position: relative; margin-bottom: 7px; }
.ms-flags li:before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ms-src { font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--hair); }

.ms-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); background: var(--bg); }
.ms-back { width: 52px; height: 52px; border-radius: 26px; border: 1px solid var(--hair); background: var(--bg); color: var(--fg); cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ms-back:disabled { opacity: .3; }
.ms-next { flex: 1; height: 52px; border-radius: 26px; border: none; background: var(--fg); color: #fff; font-size: 17px; font-weight: 590; letter-spacing: -0.01em; cursor: pointer; }
.ms-next:disabled { background: var(--fill); color: var(--muted); }
.ms-next:active { opacity: .8; }
.ms-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 46px; text-align: center; }

.ms-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.28); z-index: 30; animation: fade .2s ease; }
.ms-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--bg); border-radius: 16px 16px 0 0; max-height: 84%; display: flex; flex-direction: column; animation: rise .26s cubic-bezier(.22,.61,.36,1); }
@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.ms-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--hair); margin: 8px auto 0; flex: none; }
.ms-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 8px; }
.ms-sheet-head h3 { margin: 0; font-size: 18px; font-weight: 680; letter-spacing: -0.02em; }
.ms-sheet-body { padding: 8px 20px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; }
.ms-sheet-body h4 { font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 20px 0 6px; }
.ms-sheet-body h4:first-child { margin-top: 4px; }
.ms-sheet-body p { font-size: 16px; line-height: 1.48; margin: 0; }
.ms-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--hair); padding: 14px 2px; cursor: pointer; color: var(--fg); }
.ms-row:last-child { border-bottom: none; }
.ms-row-main { flex: 1; min-width: 0; }
.ms-row-t { font-size: 16px; letter-spacing: -0.01em; display: block; }
.ms-row-s { font-size: 13px; color: var(--muted); margin-top: 1px; display: block; }
.ms-row.on .ms-row-t { font-weight: 640; color: var(--accent); }
.ms-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 20px; }
.ms-check { color: var(--accent); }
.ms-grouphead { font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 22px 0 4px; }
.ms-grouphead:first-child { margin-top: 4px; }
.ms-date-input { width: 100%; margin-top: 8px; padding: 12px 14px; font-size: 16px; border: 1px solid var(--hair); border-radius: 12px; background: var(--fill); color: var(--fg); font-family: inherit; }
@media (prefers-reduced-motion: reduce) { .ms * { animation: none !important; transition: none !important; } }

/* ---- PWA additions ---------------------------------------------- */
html, body { margin: 0; padding: 0; height: 100%; background: #fff; overscroll-behavior: none; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
#app { height: 100%; }
.ms { user-select: none; }
.ms-say, .ms-read-text { user-select: text; }

/* readings */
.ms-read-ref { font-size: 13px; font-weight: 640; letter-spacing: -0.01em; margin: 0 0 10px; }
.ms-read-text { font-size: 17px; line-height: 1.55; margin: 0 0 18px; white-space: pre-wrap; }
.ms-read-text p { margin: 0 0 12px; }
.ms-read-resp { font-style: italic; font-weight: 590; font-size: clamp(21px, 5.5vw, 27px); line-height: 1.28; letter-spacing: -0.02em; margin: 0 0 16px; }
.ms-read-state { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0 0 18px; }
.ms-read-more { background: none; border: none; padding: 0; margin: 0 0 20px; font-size: 14px; font-weight: 590; color: var(--accent); cursor: pointer; }
.ms-read-src { font-size: 11px; line-height: 1.45; color: var(--muted); margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--hair); }
.ms-read-src a { color: var(--muted); }
.ms-collapsed { max-height: 210px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.ms-offline { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.ms-offline i { width: 6px; height: 6px; border-radius: 50%; background: #c8952c; display: inline-block; }
.ms-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--hair); }
.ms-toggle-t { font-size: 16px; }
.ms-switch { width: 51px; height: 31px; border-radius: 16px; border: none; background: var(--hair); position: relative; cursor: pointer; flex: none; transition: background .18s; }
.ms-switch.on { background: var(--accent); }
.ms-switch:after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.ms-switch.on:after { transform: translateX(20px); }

/* ---- correções ---------------------------------------------------- */
.ms-mv-t, .ms-mv-d { display: block; }
.ms-mv-d { margin-top: 2px; }
@media (min-width: 700px) {
  .ms { max-width: 620px; margin: 0 auto; border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
}

/* ---- correções ---------------------------------------------------- */
.ms-mv-t, .ms-mv-d { display: block; }
.ms-mv-d { margin-top: 2px; }
@media (min-width: 700px) {
  .ms { max-width: 620px; margin: 0 auto; border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
}
.ms-read-head { font-size: 15px; line-height: 1.4; color: var(--muted); font-style: italic; margin: -4px 0 12px; }
.ms-today-read { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.ms-today-read:last-child { border-bottom: none; }
.ms-today-read-k { font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 108px; flex: none; }
.ms-today-read-v { font-size: 16px; font-weight: 590; letter-spacing: -0.01em; }

/* ---- viewport mobile: rodapé sempre fixo -------------------------- */
html, body { height: 100%; margin: 0; overflow: hidden; }
#app { height: 100%; }
.ms { height: 100%; min-height: 0; }
.ms-head, .ms-bar, .ms-foot { flex: 0 0 auto; }
.ms-stage { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@supports (height: 100dvh) { .ms { height: 100dvh; } }
