:root {
  --plum: #643a56;
  --plum-2: #7f4d6e;
  --plum-deep: #3e2037;
  --rose: #efc9df;
  --rose-2: #f6dcea;
  --blush: #fbeef5;
  --bg: #fff9fc;
  --card: #ffffff;
  --ink: #3b2433;
  --muted: #8b7482;
  --line: #eedde7;
  --gold: #c89f78;
  --ok: #3d8a67;
  --danger: #b73a4c;
  --shadow-sm: 0 1px 2px rgba(64, 33, 58, .06), 0 2px 8px rgba(64, 33, 58, .05);
  --shadow: 0 2px 6px rgba(64, 33, 58, .06), 0 12px 32px -8px rgba(64, 33, 58, .18);
  --shadow-lg: 0 24px 60px -12px rgba(64, 33, 58, .45);
  --radius: 22px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; flex: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------------- Botões ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 20px; border-radius: 16px;
  font-weight: 700; font-size: 16px; letter-spacing: .01em;
  transition: transform .18s var(--ease), box-shadow .2s, background .2s, opacity .2s;
  position: relative; width: 100%;
}
.btn:active { transform: scale(.97); }
.btn.big { min-height: 58px; font-size: 17px; border-radius: 18px; }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--plum-2), var(--plum) 55%, var(--plum-deep));
  box-shadow: 0 10px 24px -8px rgba(100, 58, 86, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn.soft { background: var(--blush); color: var(--plum); }
.btn.light { background: #fff; color: var(--plum); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35); }
.btn.danger-soft { background: #fbe9ec; color: var(--danger); }
.btn.ghost-danger { color: var(--danger); background: transparent; margin-top: 8px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn .spinner {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.btn.loading .spinner { display: block; }
.btn.loading .btn-label, .btn.loading > svg { display: none; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-grid; place-items: center; position: relative;
  transition: transform .18s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.glass { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.icon-btn.soft { background: var(--blush); color: var(--plum); }
.icon-btn.ghost { color: var(--muted); }
.chip-btn {
  height: 36px; padding: 0 14px; border-radius: 999px; background: var(--plum); color: #fff;
  font-weight: 700; font-size: 14px; animation: pop .35s var(--spring);
}
.visually-hidden-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.visually-hidden-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ---------------- Blobs animados ---------------- */
.blobs, .top-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; opacity: .8; background: radial-gradient(circle, var(--c) 0%, transparent 68%); animation: float 16s ease-in-out infinite; will-change: transform; }
.login .b1 { --c: #f4c3de; width: 460px; height: 460px; top: -170px; left: -170px; }
.login .b2 { --c: #dcbcf2; width: 400px; height: 400px; bottom: -110px; right: -170px; animation-delay: -5s; animation-duration: 19s; }
.login .b3 { --c: #ffdccb; width: 340px; height: 340px; top: 38%; left: 45%; opacity: .6; animation-delay: -9s; animation-duration: 22s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, 30px) scale(1.12); }
  66% { transform: translate(-30px, 40px) scale(.92); }
}

/* ---------------- Login ---------------- */
.screen { min-height: 100dvh; }
.login {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: calc(28px + var(--safe-top)) 22px calc(28px + var(--safe-bottom));
  background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--bg) 55%, #fbeaf3 100%);
}
.login-inner { position: relative; width: 100%; max-width: 400px; text-align: center; }
.logo-mark { width: 104px; height: 104px; margin: 0 auto 18px; }
.logo-mark svg {
  width: 100%; height: 100%; border-radius: 30px;
  background: linear-gradient(145deg, #8f5a7c, var(--plum) 55%, var(--plum-deep));
  box-shadow: 0 20px 44px -14px rgba(100, 58, 86, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.logo-mark text { font-family: var(--serif); font-style: italic; font-size: 64px; fill: #fbe7f2; }
.logo-ring { fill: none; stroke: #f3d1e6; stroke-opacity: .45; stroke-width: 1.5; stroke-dasharray: 330; stroke-dashoffset: 330; animation: draw 1.6s .3s var(--ease) forwards; }
.logo-dot { fill: var(--rose); transform-origin: 80px 76px; animation: pop .6s 1.1s var(--spring) both; }
.kicker { text-transform: uppercase; letter-spacing: .22em; font-size: 11px; font-weight: 700; color: var(--plum-2); margin: 0 0 10px; }
.login h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 9vw, 42px); line-height: 1.05; margin: 0 0 14px; color: var(--plum-deep); letter-spacing: -.01em; }
.login h1 em { color: var(--plum-2); }
.lead { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0 0 26px; }
.login-card {
  text-align: left; padding: 20px; border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--shadow);
}
.login-card label { display: block; font-size: 13px; font-weight: 700; color: var(--plum); margin: 0 0 8px 4px; }
.pass-wrap { position: relative; margin-bottom: 6px; }
.pass-wrap input {
  width: 100%; height: 56px; border-radius: 16px; border: 1.5px solid var(--line);
  background: #fff; padding: 0 52px 0 18px; font-size: 17px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.pass-wrap input:focus { border-color: var(--plum-2); box-shadow: 0 0 0 4px rgba(127, 77, 110, .14); }
.pass-wrap .icon-btn { position: absolute; right: 6px; top: 6px; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 20px; margin: 4px 4px 10px; }
.form-error:empty { min-height: 0; margin: 4px; }
.shake { animation: shake .45s var(--ease); }

.install-cta {
  margin-top: 16px; width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, .6);
  border: 1.5px dashed rgba(127, 77, 110, .35); color: var(--plum-deep);
  transition: transform .18s var(--ease), background .2s;
}
.install-cta:active { transform: scale(.98); }
.install-cta strong { display: block; font-size: 15px; }
.install-cta small { color: var(--muted); font-size: 13px; }
.install-cta > span:nth-child(2) { flex: 1; }
.install-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--plum); color: #fff; animation: nudge 2.8s 2s ease-in-out infinite; }
.chev { width: 20px; height: 20px; color: var(--muted); }

.anim-up { opacity: 0; transform: translateY(18px); animation: up .7s calc(var(--d, 0) * 90ms + 100ms) var(--ease) forwards; }

/* ---------------- App ---------------- */
.app { position: relative; }
.top {
  position: sticky; top: 0; z-index: 5;
  color: #fff; overflow: hidden;
  padding: calc(14px + var(--safe-top)) 18px 14px;
  background: linear-gradient(160deg, #87527a 0%, var(--plum) 45%, var(--plum-deep) 100%);
  border-radius: 0 0 30px 30px;
  box-shadow: 0 14px 34px -18px rgba(64, 33, 58, .8);
}
/* No cabeçalho as manchas ficam paradas (economiza bateria e não disputa com a lista). */
.top .blob { animation: none; will-change: auto; }
.top .b1 { --c: #c77aa6; width: 340px; height: 340px; top: -180px; right: -120px; opacity: .6; }
.top .b2 { --c: #9a6ac4; width: 280px; height: 280px; bottom: -160px; left: -100px; opacity: .45; }
.top-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hello { margin: 0; font-size: 14px; opacity: .8; font-weight: 600; }
.title { margin: 2px 0 0; font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -.01em; }
.today-line { position: relative; margin: 6px 0 12px; font-size: 13.5px; opacity: .85; min-height: 18px; }
.today-line strong { font-weight: 800; }

.days-wrap { position: relative; margin: 0 -18px; }
.days {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 18px 6px; scroll-snap-type: x proximity;
  scrollbar-width: none; -ms-overflow-style: none; scroll-padding: 0 18px;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 54px; height: 70px; border-radius: 18px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
  transition: background .25s, transform .25s var(--spring), color .25s;
  position: relative;
}
.day small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; font-weight: 700; }
.day b { font-size: 20px; font-weight: 800; }
.day.today { border-color: rgba(255, 255, 255, .55); }
.day.sel { background: #fff; color: var(--plum); transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .4); }
.day.sel small { opacity: .8; }
.day .dot { position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.day.sel .dot { background: var(--plum-2); }
.day .dot.many { width: 14px; border-radius: 3px; }

.content { padding: 18px 16px 0; max-width: 640px; margin: 0 auto; }
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; }
.day-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--plum-deep); }
.day-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.day-actions { display: flex; gap: 8px; align-items: center; }

/* Banner de notificações */
.banner {
  display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 16px;
  border-radius: var(--radius); background: linear-gradient(135deg, #fff, var(--blush));
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); animation: up .5s var(--ease) both;
}
.banner .b-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--plum); color: #fff; flex: none; animation: ring 2.4s 1s ease-in-out infinite; }
.banner div { flex: 1; min-width: 0; }
.banner strong { display: block; font-size: 15px; color: var(--plum-deep); }
.banner small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.banner .btn { width: auto; min-height: 42px; padding: 0 16px; font-size: 14px; border-radius: 13px; }

/* Próxima cliente */
.next {
  display: block; width: 100%; text-align: left;
  position: relative; overflow: hidden; margin-bottom: 18px; padding: 18px;
  border-radius: 26px; color: #fff;
  background: linear-gradient(135deg, #a0668d, var(--plum) 60%, #4a2742);
  box-shadow: 0 18px 36px -16px rgba(100, 58, 86, .75);
  animation: up .55s var(--ease) both;
}
.next::after {
  content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -60px; top: -70px;
  background: radial-gradient(circle, rgba(255, 214, 236, .45), transparent 70%);
}
.next .n-label { font-size: 12px; text-transform: uppercase; letter-spacing: .16em; opacity: .8; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.next .n-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9ff0c4; box-shadow: 0 0 0 0 rgba(159, 240, 196, .7); animation: live 1.8s infinite; }
.next .n-name { font-family: var(--serif); font-size: 28px; margin: 8px 0 2px; line-height: 1.1; word-break: break-word; }
.next .n-meta { opacity: .85; font-size: 14.5px; }
.next .n-count { position: absolute; right: 18px; bottom: 16px; text-align: right; }
.next .n-count b { display: block; font-size: 30px; font-weight: 800; line-height: 1; }
.next .n-count small { font-size: 12px; opacity: .8; }
.next .n-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; position: relative; z-index: 1; }
.next .n-left { min-width: 0; flex: 1; }
.next .n-count { position: static; flex: none; }

/* Lista */
.list { display: flex; flex-direction: column; gap: 10px; }
.appt {
  width: 100%; display: flex; align-items: stretch; gap: 0; text-align: left;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 1px solid rgba(238, 221, 231, .8); overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s;
  animation: slideIn .5s calc(var(--i, 0) * 60ms) var(--ease) both;
}
.list.static .appt { animation: none; }
.appt:active { transform: scale(.985); }
.appt .a-time {
  flex: none; width: 82px; padding: 14px 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--blush), #f8e4ef); color: var(--plum);
  border-right: 1px solid var(--line);
}
.appt .a-time b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.appt .a-time small { font-size: 11.5px; font-weight: 700; opacity: .75; margin-top: 2px; text-align: center; padding: 0 4px; }
.appt .a-body { flex: 1; min-width: 0; padding: 14px 14px 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.appt .a-name { font-weight: 800; font-size: 17px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt .a-note { color: var(--muted); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt .a-icons { display: flex; align-items: center; gap: 4px; padding-right: 14px; color: var(--plum-2); }
.appt .a-icons svg { width: 19px; height: 19px; }
.appt .a-icons .on-alarm { color: var(--danger); }
.appt.past { opacity: .55; }
.appt.past .a-time { background: #f4eef1; color: var(--muted); }
.appt.now { border-color: var(--plum-2); box-shadow: 0 0 0 3px rgba(127, 77, 110, .15), var(--shadow); }

.empty { text-align: center; padding: 30px 20px 10px; color: var(--muted); animation: up .5s var(--ease) both; }
.empty .e-art { width: 150px; height: 120px; margin: 0 auto 8px; }
.empty .e-art svg { width: 100%; height: 100%; }
.empty h4 { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--plum-deep); margin: 8px 0 6px; }
.empty p { margin: 0; font-size: 15px; line-height: 1.5; }
.e-float { animation: bob 4s ease-in-out infinite; }
.e-spark { animation: twinkle 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.e-spark.s2 { animation-delay: -1.2s; }

.list-spacer { height: calc(150px + var(--safe-bottom)); }

/* Dock */
.dock {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(26px + var(--safe-bottom)); z-index: 10;
  width: min(360px, calc(100% - 32px)); height: 72px; border-radius: 26px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 16px 40px -14px rgba(64, 33, 58, .4);
  animation: dockIn .7s .2s var(--spring) both;
}
.dock-side { width: 84px; height: 56px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--plum); font-size: 12px; font-weight: 700; transition: background .2s, transform .18s; }
.dock-side:active { background: var(--blush); transform: scale(.95); }
.dock-side svg { width: 22px; height: 22px; }
.dock-side .badge-dot { position: absolute; }
.mic-fab {
  position: relative; width: 78px; height: 78px; margin-top: -34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, #a8709a, var(--plum) 55%, var(--plum-deep));
  box-shadow: 0 16px 30px -8px rgba(100, 58, 86, .75), inset 0 2px 0 rgba(255, 255, 255, .25), 0 0 0 6px var(--bg);
  transition: transform .2s var(--spring);
}
.mic-fab:active { transform: scale(.92); }
.mic-fab svg { width: 34px; height: 34px; position: relative; z-index: 1; }
.mic-fab .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(127, 77, 110, .5); animation: ripple 2.6s ease-out infinite; }
.mic-fab .r2 { animation-delay: 1.3s; }
.dock-hint {
  position: fixed; left: 0; right: 0; bottom: calc(6px + var(--safe-bottom)); z-index: 9; margin: 0;
  text-align: center; font-size: 12px; color: var(--muted); pointer-events: none;
}
.dock-hint em { color: var(--plum); }

/* ---------------- Sheets ---------------- */
.backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(40, 18, 34, .5);
  animation: fade .25s ease both;
}
.backdrop.out { animation: fadeOut .25s ease both; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-height: calc(100dvh - 28px - var(--safe-top)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 30px 30px 0 0;
  padding: 8px 18px calc(22px + var(--safe-bottom));
  box-shadow: 0 -20px 50px -20px rgba(40, 18, 34, .45);
  animation: sheetIn .38s var(--ease) both;
  max-width: 640px; margin: 0 auto;
  will-change: transform;
}
.sheet.out { animation: sheetOut .28s var(--ease) both; }
.grabber { width: 44px; height: 5px; border-radius: 3px; background: #e6d3de; margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 25px; color: var(--plum-deep); }

/* Voz */
.voice { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; }
.orb {
  position: relative; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, #b27aa2, var(--plum) 58%, var(--plum-deep));
  color: #fff; box-shadow: 0 16px 34px -12px rgba(100, 58, 86, .75);
  transition: transform .3s var(--spring);
}
.orb:active { transform: scale(.94); }
.orb-glow { position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(239, 201, 223, .7), transparent 65%); opacity: 0; transition: opacity .3s; }
.orb-mic { width: 40px; height: 40px; position: relative; transition: opacity .2s, transform .3s; }
.bars { position: absolute; display: flex; gap: 5px; align-items: center; height: 40px; opacity: 0; transition: opacity .2s; }
.bars i { width: 5px; height: 12px; border-radius: 3px; background: #fff; animation: bar 1s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.8s; }
.bars i:nth-child(3) { animation-delay: -.55s; }
.bars i:nth-child(4) { animation-delay: -.3s; }
.bars i:nth-child(5) { animation-delay: -.15s; }
.voice.listening .orb { animation: breathe 1.6s ease-in-out infinite; }
.voice.listening .orb-glow { opacity: 1; animation: glow 1.6s ease-in-out infinite; }
.voice.listening .orb-mic { opacity: 0; transform: scale(.6); }
.voice.listening .bars { opacity: 1; }
.voice-status { margin: 14px 0 10px; font-weight: 700; color: var(--plum); font-size: 15px; text-align: center; min-height: 22px; }
.voice.listening .voice-status { color: var(--plum-2); }
.said { width: 100%; }
.said textarea {
  width: 100%; resize: none; border: 1.5px dashed #e3c8d7; border-radius: 18px; background: #fff;
  padding: 12px 14px; font-size: 16px; line-height: 1.4; outline: none; color: var(--ink); min-height: 56px;
  font-family: var(--serif); font-style: italic;
  transition: border-color .2s, box-shadow .2s;
}
.said textarea:focus { border-style: solid; border-color: var(--plum-2); box-shadow: 0 0 0 4px rgba(127, 77, 110, .12); }
.said textarea::placeholder { color: #bca8b4; }

.appt-form { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 800; color: var(--plum); margin-left: 4px; letter-spacing: .01em; }
.field .opt { font-weight: 600; color: var(--muted); }
.field input {
  width: 100%; height: 54px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  padding: 0 16px; font-size: 17px; outline: none; min-width: 0;
  transition: border-color .2s, box-shadow .2s, background .3s;
  -webkit-appearance: none; appearance: none;
}
.field input[type="date"], .field input[type="time"] { font-weight: 700; color: var(--plum-deep); }
.field input:focus { border-color: var(--plum-2); box-shadow: 0 0 0 4px rgba(127, 77, 110, .12); }
.field.filled input { animation: filled .8s var(--ease); }
.field.invalid input { border-color: var(--danger); background: #fff6f7; }
.appt-form.thinking .field input { border-color: #dcbad0; }
.voice.thinking .orb-glow { opacity: 1; animation: glow 1.6s ease-in-out infinite; }
.voice.thinking .voice-status { animation: pulseText 1.2s ease-in-out infinite; }
.think-bar { width: 140px; height: 4px; border-radius: 4px; background: #f1dde9; overflow: hidden; margin: -4px auto 10px; opacity: 0; transition: opacity .2s; }
.think-bar i { display: block; width: 45%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #c98bb4, var(--plum)); transform: translateX(-110%); }
.voice.thinking .think-bar { opacity: 1; }
.voice.thinking .think-bar i { animation: thinkSlide 1.1s ease-in-out infinite; }

/* Janela aberta: pausa tudo que anima no fundo (o celular só trabalha na janela). */
body.sheet-open { overflow: hidden; }
body.sheet-open .app .blob,
body.sheet-open .mic-fab .ring,
body.sheet-open .banner .b-ico,
body.sheet-open .e-float,
body.sheet-open .e-spark,
body.sheet-open .next .n-label::before,
body.sheet-open .dock { animation-play-state: paused; }
body.sheet-open .mic-fab .ring { opacity: 0; }
.field-hint { color: var(--plum-2); font-weight: 700; font-size: 12.5px; margin-left: 4px; min-height: 16px; }
.field-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }

.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; }
.switch-row.compact { padding: 10px 0; border: 0; background: transparent; }
.switch-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #fbe9ec; color: var(--danger); flex: none; }
.switch-text { flex: 1; min-width: 0; }
.switch-text strong { display: block; font-size: 15px; }
.switch-text small { color: var(--muted); font-size: 13px; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; width: 54px; height: 32px; border-radius: 999px;
  background: #e7d6e0; position: relative; cursor: pointer; transition: background .25s; margin: 0;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--spring);
}
.switch:checked { background: var(--plum); }
.switch:checked::after { transform: translateX(22px); }
.switch:focus-visible { outline: 3px solid rgba(127, 77, 110, .35); outline-offset: 2px; }

.edit-extras { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--line); }
.edit-extras .btn { min-height: 48px; font-size: 15px; }

/* Configurações */
.set-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.set-title { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; list-style: none; cursor: default; }
details.set-card .set-title { margin-bottom: 0; cursor: pointer; }
details.set-card[open] .set-title { margin-bottom: 14px; }
.set-title::-webkit-details-marker { display: none; }
.set-title > svg { width: 40px; height: 40px; padding: 9px; border-radius: 13px; background: var(--blush); color: var(--plum); }
.set-title strong { display: block; font-size: 16px; color: var(--plum-deep); }
.set-title small { color: var(--muted); font-size: 13px; }
.set-title small.ok { color: var(--ok); font-weight: 700; }
.set-title small.warn { color: var(--danger); font-weight: 700; }
.set-actions { display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-weight: 700; font-size: 14.5px; color: var(--plum); display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--spring);
}
.chip:active { transform: scale(.94); }
.chip.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.chip.on::before { content: '✓'; font-size: 13px; }
.pass-form { display: flex; flex-direction: column; gap: 10px; }
.pass-form input { height: 50px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 14px; font-size: 16px; outline: none; }
.pass-form input:focus { border-color: var(--plum-2); }
.version { text-align: center; color: #bca8b4; font-size: 12px; margin: 10px 0 0; }

/* Instalar */
.steps { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); counter-increment: s; font-size: 15.5px; line-height: 1.4; animation: up .45s calc(var(--i, 0) * 90ms) var(--ease) both; }
.steps li::before { content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--plum); color: #fff; font-weight: 800; }
.steps .kbd { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: var(--blush); color: var(--plum); font-weight: 700; white-space: nowrap; }
.steps .kbd svg { width: 16px; height: 16px; }
.install-note { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.install-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.install-hero img { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow); }
.install-hero strong { display: block; font-size: 17px; color: var(--plum-deep); }
.install-hero small { color: var(--muted); }

/* Relógio do iPhone */
.clock-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.clock-list li { padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 15.5px; }
.clock-list b { color: var(--plum); font-weight: 800; margin-right: 6px; }
.clock-gap { margin-top: 10px; }
.clock-install { margin-bottom: 14px; text-decoration: none; }

/* ---------------- Alarme ---------------- */
.alarm {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 35%, #a15a88, var(--plum) 45%, #2c1227);
  padding: calc(20px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  animation: fade .3s ease both;
}
.alarm-bell { position: relative; }
.alarm-waves span { position: absolute; left: 50%; top: 50%; pointer-events: none; width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; border: 2px solid rgba(255, 220, 238, .5); animation: wave 2.4s ease-out infinite; }
.alarm-waves span:nth-child(2) { animation-delay: .8s; }
.alarm-waves span:nth-child(3) { animation-delay: 1.6s; }
.alarm-inner { position: relative; width: 100%; max-width: 380px; }
.alarm-bell { width: 120px; height: 120px; margin: 0 auto 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3); }
.alarm-bell svg { width: 60px; height: 60px; animation: shakeBell .9s ease-in-out infinite; }
.alarm-when { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; opacity: .85; margin: 0; }
.alarm h2 { font-family: var(--serif); font-weight: 400; font-size: 42px; margin: 8px 0 6px; line-height: 1.05; word-break: break-word; }
.alarm-note { opacity: .85; font-size: 17px; margin: 0 0 40px; min-height: 24px; }

/* ---------------- Sucesso e toasts ---------------- */
.success { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; }
.success-circle { width: 120px; height: 120px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; animation: popOut 1.3s var(--spring) both; }
.success svg { width: 76px; height: 76px; }
.success circle { fill: none; stroke: var(--rose); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s .1s var(--ease) forwards; }
.success path { fill: none; stroke: var(--plum); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .4s var(--ease) forwards; }

.toasts { position: fixed; left: 0; right: 0; top: calc(12px + var(--safe-top)); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  pointer-events: auto; max-width: 440px; width: 100%; padding: 14px 16px; border-radius: 18px;
  background: rgba(46, 22, 40, .94); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.4;
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .5); display: flex; gap: 10px; align-items: center;
  animation: toastIn .45s var(--spring) both;
}
.toast.out { animation: toastOut .3s var(--ease) both; }
.toast.ok { background: rgba(38, 92, 68, .96); }
.toast.err { background: rgba(150, 38, 56, .96); }

/* ---------------- Keyframes ---------------- */
@keyframes up { to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes dockIn { from { transform: translate(-50%, 140%); } to { transform: translate(-50%, 0); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes bar { 0%, 100% { height: 10px; } 50% { height: 34px; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(-10deg); } 90% { transform: rotate(8deg); } }
@keyframes ring { 0%, 80%, 100% { transform: none; } 84% { transform: rotate(-14deg); } 88% { transform: rotate(12deg); } 92% { transform: rotate(-8deg); } 96% { transform: rotate(4deg); } }
@keyframes shakeBell { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-16deg); } 30% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-2deg); } }
@keyframes wave { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(159, 240, 196, .7); } 70% { box-shadow: 0 0 0 10px rgba(159, 240, 196, 0); } 100% { box-shadow: 0 0 0 0 rgba(159, 240, 196, 0); } }
@keyframes filled { 0% { background: #fff; } 30% { background: #fbe3ef; } 100% { background: #fff; } }
@keyframes popOut { 0% { transform: scale(.3); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 75% { transform: scale(1); opacity: 1; } 100% { transform: scale(.8); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes thinkSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(240%); } }
@keyframes pulseText { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes twinkle { 0%, 100% { transform: scale(.6); opacity: .4; } 50% { transform: scale(1.1); opacity: 1; } }

@media (min-width: 700px) {
  .top { border-radius: 0 0 36px 36px; }
  .top-row, .today-line { max-width: 640px; margin-left: auto; margin-right: auto; }
  .days { justify-content: flex-start; max-width: 680px; margin: 0 auto; }
  .sheet { border-radius: 30px; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .anim-up { opacity: 1; transform: none; }
}
