.tap-bpm-balloon {
  position: fixed;
  left: 50%;
  bottom: calc(190px + env(safe-area-inset-bottom));
  z-index: 15;
  pointer-events: none;
  user-select: none;
  color: #7ee9a9;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: .025em;
  white-space: nowrap;
  text-shadow: 0 1px 0 #b6ffd133, 0 3px 7px #062e1c55;
  animation: tap-bpm-rise 2.2s ease-out both;
}
@keyframes tap-bpm-rise {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.94) rotate(-2deg); }
  15% { opacity: .68; }
  100% { opacity: 0; transform: translate(-50%, calc(-1 * min(160px, 24vh))) scale(1.06) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .tap-bpm-balloon { animation-name: tap-bpm-fade; }
}
@keyframes tap-bpm-fade {
  0%, 100% { opacity: 0; transform: translateX(-50%); }
  20%, 55% { opacity: .68; transform: translateX(-50%); }
}

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #09090b;
  --surface: #18181b;
  --surface-2: #27272a;
  --border: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #f4f4f5;
  --accent-text: #111827;
  --danger: #ff5b62;
  --danger-soft: rgb(255 91 98 / 0.10);
  --danger-border: rgb(255 91 98 / 0.72);
  --danger-strong: #ff434d;
  --danger-strong-soft: rgb(255 67 77 / 0.18);
  --success: #5ee99b;
  --success-soft: rgb(94 233 155 / 0.08);
  --info: #5eb4e9;
  --neutral-action: #e4e4e7;
  --warning: #f7b155;
  --warning-soft: rgb(247 177 85 / 0.10);
  --warning-border: rgb(247 177 85 / 0.45);
}

/* Informações públicas e primeiro aceite compartilham a tipografia do app. */
.information-page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.information-page h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.15; margin-bottom: 20px; }
.information-page h2 { margin-bottom: 12px; line-height: 1.35; }
.information-page p { color: var(--muted); }
.information-page section { margin-top: 32px; scroll-margin-top: 20px; }
.information-page a, .policies-link { color: var(--muted); text-underline-offset: 4px; }
.information-page a:focus-visible, .policies-link:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.information-back { display: inline-block; margin-bottom: 28px; padding: 8px 0; }
.information-meta { font-size: 0.85rem; }
.information-index { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; }
.policies-link { display: inline-block; font-size: 0.8rem; padding: 10px 0; }
.terms-screen { max-width: 560px; }
.terms-choice { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0; line-height: 1.5; cursor: pointer; }
.terms-choice input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.terms-screen button { width: 100%; }
.terms-screen button:disabled { opacity: 0.45; cursor: default; }
.terms-pending #app-shell, .terms-pending #lock-screen, .terms-pending #privacy-shield,
.terms-pending #update-toast, .terms-pending #toast { display: none !important; }

* {
  box-sizing: border-box;
}

/* Garante que o atributo HTML `hidden` prevaleça sobre regras de layout como display:flex/grid. */
[hidden] {
  display: none !important;
}

/* Elementos opcionais para um futuro modo de interface mais limpa.
   Remover a classe .clean-mode do <body> volta a exibi-los quando o próprio
   componente não estiver marcado com [hidden]. */
.clean-mode .clean-optional {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(255 255 255 / 0.45);
  outline-offset: 2px;
}

.app-shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(96px, env(safe-area-inset-bottom));
}

.app-header,
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-header {
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
}

h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1;
}

h2 {
  font-size: 1.4rem;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 2rem;
  line-height: 1;
}

.icon-button.secondary {
  background: var(--surface-2);
  color: var(--text);
}

.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dialog-header-actions { display: flex; align-items: center; gap: 8px; }

.notice {
  margin-top: 34px;
  margin-bottom: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.youtube-easter-egg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}
.youtube-easter-egg.is-visible { opacity: .52; }
.youtube-easter-egg.local-background { transition: none; }
.youtube-easter-egg.local-background.is-ending { transition: opacity 2s ease; }
.youtube-easter-egg iframe,
.youtube-easter-egg video {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: max(100vw, calc(100vh * 9 / 16));
  height: max(100vh, calc(100vw * 16 / 9));
  border: 0;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.youtube-easter-egg-active #app-shell { position: relative; z-index: 1; }
.youtube-easter-egg-active .drink-card,
.youtube-easter-egg-active .notice,
.youtube-easter-egg-active .occasion-context,
.youtube-easter-egg-active .occasion-card,
.youtube-easter-egg-active .agenda-row,
.youtube-easter-egg-active .occasion-reminder,
.youtube-easter-egg-active .settings-card,
.youtube-easter-egg-active .bottom-nav {
  background: rgb(15 15 19 / .62);
  border-color: rgb(210 210 225 / .28);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 8px 28px rgb(0 0 0 / .28);
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
}
.youtube-easter-egg-active .drink-card.waiting {
  background: linear-gradient(90deg, rgb(255 91 98 / .20), rgb(15 15 19 / .62) 46%);
  box-shadow: inset 4px 0 0 var(--danger), 0 8px 28px rgb(0 0 0 / .28);
}
.youtube-easter-egg-active .drink-card.danger {
  background: linear-gradient(90deg, rgb(255 67 77 / .25), rgb(15 15 19 / .62) 58%);
  box-shadow: inset 6px 0 0 var(--danger-strong), 0 8px 28px rgb(0 0 0 / .28);
}
.youtube-easter-egg-active .drink-card.completed {
  background: linear-gradient(90deg, rgb(94 233 155 / .16), rgb(15 15 19 / .62) 46%);
  box-shadow: inset 4px 0 0 rgb(94 233 155 / .55), 0 8px 28px rgb(0 0 0 / .28);
}
@media (prefers-reduced-motion: reduce) {
  .youtube-easter-egg { transition: none; }
}

.drink-list {
  display: grid;
  gap: 12px;
}

.drink-group-separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.drink-group-separator::before,
.drink-group-separator::after {
  height: 1px;
  background: var(--border);
  content: "";
}


/* V1.8.6 — footer no final da viewport quando há pouco conteúdo */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100dvh;
}

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Evita seleção no rodapé durante toques repetidos nos easter eggs. */
.app-footer,
.app-footer *,
.browser-gate-footer,
.browser-gate-footer * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.app-footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 34px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  color: #52525b;
  text-align: center;
}

.app-footer-disclaimer {
  font-size: 0.56rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.025em;
  opacity: 0.68;
}

.app-footer-meta {
  font-size: 0.6rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.035em;
  opacity: 0.58;
}


.drink-card {
  --card-actions-width: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--card-actions-width);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.drink-card.waiting {
  border-color: var(--danger-border);
  background: linear-gradient(90deg, var(--danger-soft), var(--surface) 42%);
  box-shadow: inset 4px 0 0 var(--danger);
}

.drink-card.danger {
  border: 2px solid var(--danger-strong);
  background: linear-gradient(90deg, var(--danger-strong-soft), var(--surface) 58%);
  box-shadow: inset 6px 0 0 var(--danger-strong), 0 0 0 1px rgb(255 67 77 / 0.14);
}

.drink-card.completed {
  background: linear-gradient(90deg, var(--success-soft), var(--surface) 42%);
  box-shadow: inset 4px 0 0 rgb(94 233 155 / 0.55);
}

.drink-main {
  grid-column: 1;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "icon content"
    "time time";
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 17px 16px 17px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.drink-main:active {
  background: rgb(255 255 255 / 0.04);
}

.drink-icon {
  display: grid;
  grid-area: icon;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 2rem;
}

.drink-icon-symbol {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.drink-icon.is-reorder-handle {
  touch-action: manipulation;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.drink-icon.is-reorder-handle.is-reorder-pressing {
  border-color: rgb(161 161 170 / 0.55);
  touch-action: none;
  transform: scale(0.94);
}

.drink-icon.is-reorder-handle.is-dragging {
  border-color: rgb(161 161 170 / 0.75);
  color: var(--muted);
  touch-action: none;
}

.drink-card.is-drink-drag-source {
  opacity: 0.2;
}

.drink-reorder-ghost {
  position: fixed;
  z-index: 1100;
  top: 0;
  left: 0;
  margin: 0;
  pointer-events: none;
  opacity: 0.94;
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.42);
  transform-origin: top left;
}

.drink-reorder-ghost .drink-icon-symbol {
  font-size: 0;
}

.drink-reorder-ghost .drink-icon-symbol::after {
  font-size: 2rem;
  content: "⠿";
}

@media (prefers-reduced-motion: reduce) {
  .drink-icon.is-reorder-handle,
  .drink-reorder-ghost {
    transition: none;
  }
}

.waiting .drink-icon {
  border-color: rgb(255 91 98 / 0.6);
  background: rgb(255 91 98 / 0.12);
}

.danger .drink-icon {
  border-color: var(--danger-strong);
  background: rgb(255 67 77 / 0.2);
  box-shadow: 0 0 0 3px rgb(255 67 77 / 0.08);
}

.completed .drink-icon {
  border-color: rgb(94 233 155 / 0.32);
}

.drink-content {
  grid-area: content;
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
}

.drink-state {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waiting .drink-state,
.waiting .drink-time {
  color: var(--danger);
}

.danger .drink-state {
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  overflow: visible;
  border-radius: 6px;
  background: var(--danger-strong);
  color: #fff;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.danger .drink-status {
  color: #ffc4c7;
  line-height: 1.35;
}

.danger .drink-time {
  color: #ff7f86;
}

.completed .drink-state {
  color: var(--success);
}

.drink-name {
  overflow: hidden;
  font-size: 1.08rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drink-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.drink-time {
  grid-area: time;
  display: block;
  width: 100%;
  margin-top: 0;
  color: var(--neutral-action);
  font-variant-numeric: tabular-nums;
  font-size: 1.28rem;
  font-weight: 850;
  line-height: 1.15;
}

.completed .drink-time {
  color: var(--success);
}

.card-actions {
  grid-column: 2;
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid var(--border);
}

.card-actions button {
  min-height: 50px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
}

.drink-history-button {
  color: var(--muted);
}

.more-button {
  border-top: 1px solid var(--border) !important;
  color: var(--text);
  font-size: 1.35rem !important;
  line-height: 1;
}

.card-actions button:active {
  background: var(--surface-2);
}


/* V1.6.2 — linguagem de alerta revisada e interface de anotação */
.drink-main {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 140ms ease, transform 140ms ease;
}

.drink-main.is-awaiting-second-tap {
  background: rgb(255 255 255 / 0.045);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.11);
  transform: scale(0.996);
}

.drink-history-button {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.drink-menu-actions {
  display: grid;
  gap: 8px;
}

.drink-menu-action {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #09090b;
  color: var(--text);
  font-weight: 760;
  text-align: left;
}

.drink-menu-action:active {
  background: var(--surface-2);
}

.drink-menu-action.danger {
  border-color: var(--danger-border);
  color: #ff9da2;
}

.drink-menu-action-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.15rem;
}

.drink-menu-action.danger .drink-menu-action-icon {
  color: #ff9da2;
}

.drink-menu-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .drink-menu-dialog {
    width: min(calc(100% - 20px), 520px);
    margin: auto auto max(10px, env(safe-area-inset-bottom));
    border-radius: 20px;
  }

  .drink-menu-dialog form {
    gap: 14px;
    padding: 16px;
  }
}

.empty-state {
  padding: 52px 20px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  text-align: center;
}

.empty-state p {
  color: var(--muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 2rem;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 750;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.danger-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--danger-strong);
  border-radius: 12px;
  background: rgb(255 67 77 / 0.12);
  color: #ff9da2;
  font-weight: 800;
}

.danger-button:active {
  background: rgb(255 67 77 / 0.22);
}

.dialog {
  width: min(calc(100% - 24px), 520px);
  max-height: min(90dvh, 760px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
}

.dialog::backdrop {
  background: rgb(0 0 0 / 0.76);
}

.dialog form {
  display: grid;
  gap: 20px;
  padding: 20px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > span,
.field legend,
.field-label,
.duration-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 0.76rem;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #09090b;
  color: var(--text);
}

.field input:focus {
  border-color: #a1a1aa;
}

.icon-picker {
  min-width: 0;
}

.icon-options {
  display: grid;
  grid-template-rows: repeat(2, 72px);
  grid-auto-flow: column;
  grid-auto-columns: 72px;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 3px 9px;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.icon-options::-webkit-scrollbar {
  height: 5px;
}

.icon-options::-webkit-scrollbar-track {
  background: transparent;
}

.icon-options::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: var(--border);
}

.icon-option {
  position: relative;
  width: 72px;
  height: 72px;
  scroll-snap-align: start;
}

.icon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.icon-option span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #09090b;
  font-size: 1.6rem;
  cursor: pointer;
  user-select: none;
}

.icon-option input:focus-visible + span {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
}

.icon-option input:checked + span {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.icon-scroll-hint {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.duration-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.duration-field {
  display: grid;
  gap: 7px;
}

.form-error {
  margin: -8px 0 0;
  color: var(--danger);
  font-size: 0.88rem;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.danger-eyebrow {
  color: var(--danger);
}

.warning-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--danger-strong);
  border-radius: 16px;
  background: var(--danger-strong-soft);
}

.warning-hero-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgb(255 67 77 / 0.18);
  font-size: 1.7rem;
}

.warning-hero div {
  display: grid;
  gap: 4px;
}

.warning-hero strong {
  font-size: 1.05rem;
}

.warning-hero span:last-child {
  color: #ffc4c7;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.warning-context {
  margin: -6px 0 0;
  padding: 11px 13px;
  border-left: 4px solid var(--danger-strong);
  border-radius: 8px;
  background: rgb(255 67 77 / 0.09);
  color: #ffd5d7;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.warning-copy {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.warning-actions {
  display: grid;
  gap: 9px;
}

.warning-actions .primary-button {
  min-height: 52px;
}

.warning-actions .danger-button {
  min-height: 46px;
}

.active-warning {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--danger-border);
  border-radius: 14px;
  background: var(--danger-soft);
  color: #ffd5d7;
  font-size: 0.84rem;
  line-height: 1.4;
}

.active-warning strong {
  color: var(--danger);
}

.quick-log-section {
  display: grid;
  gap: 9px;
}

.quick-log-section .field-label {
  margin: 0;
}

.quick-time-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-time-button {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #09090b;
  color: var(--text);
  font-weight: 700;
}

.quick-time-button.primary {
  grid-column: 1 / -1;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 28px), 520px);
  padding: 13px 14px;
  border: 1px solid #52525b;
  border-radius: 14px;
  background: #27272a;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.42);
  color: var(--text);
  font-size: 0.86rem;
}

.toast-message,
#toast-message {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.toast[hidden] {
  display: none;
}

.toast button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
}

/* V1.5.1 — reordenação visual dos cards (FLIP) */
.drink-list.is-reordering {
  position: relative;
}

.drink-card.is-reordering-card {
  position: relative;
  will-change: transform;
  pointer-events: none;
}

.drink-card.is-reordering-focus {
  z-index: 3;
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.36);
}

@media (prefers-reduced-motion: reduce) {
  .drink-main {
    transition: none;
  }

  .drink-card.is-reordering-card {
    will-change: auto;
  }
}

@media (max-width: 420px) {
  .toast {
    width: calc(100% - 24px);
    gap: 10px;
    padding: 12px;
    font-size: 0.82rem;
  }

  .app-shell {
    padding-inline: 11px;
  }

  .icon-options {
    grid-template-rows: repeat(2, 64px);
    grid-auto-columns: 64px;
  }

  .icon-option {
    width: 64px;
    height: 64px;
  }

  .drink-card {
    --card-actions-width: 76px;
    grid-template-columns: minmax(0, 1fr) var(--card-actions-width);
  }

  .drink-main {
    column-gap: 12px;
    row-gap: 9px;
    padding-inline: 14px 10px;
  }

  .drink-icon {
    width: 52px;
    height: 52px;
  }

  .drink-state {
    font-size: 0.62rem;
  }

  .drink-time {
    font-size: 1.16rem;
  }

  .card-actions button {
    padding-inline: 5px;
    font-size: 0.68rem;
  }
}


/* V1.3 — histórico */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-text-button,
.back-button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
}

.header-text-button {
  padding: 0 14px;
}

.back-button {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  padding: 0;
  font-size: 1.7rem;
  line-height: 1;
}

.header-text-button:active,
.back-button:active {
  background: var(--surface-2);
}

.history-header {
  justify-content: flex-start;
}

.history-header-copy {
  min-width: 0;
}

.history-intro {
  margin-bottom: 22px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.history-intro > div {
  display: grid;
  gap: 4px;
}

.history-intro strong {
  font-size: 0.95rem;
}

.history-intro span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.history-empty-state {
  margin-top: 8px;
}

.history-list {
  display: grid;
  gap: 26px;
}

.history-show-more:not([hidden]) {
  display: block;
  margin: 20px auto 0;
}

.history-day {
  display: grid;
  gap: 10px;
}

.history-day-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.history-timeline {
  position: relative;
  display: grid;
  gap: 8px;
}

.history-timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 96px;
  width: 1px;
  background: var(--border);
}

.history-event {
  position: relative;
  display: grid;
  grid-template-columns: 78px 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.history-event-time {
  padding-top: 15px;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: right;
}

.history-event-mobile-time {
  display: none;
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.history-marker {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin: 20px auto 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: #71717a;
  box-shadow: 0 0 0 1px var(--border);
}

.history-event-body {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 12px 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.history-event:active .history-event-body,
.history-event.is-reacting .history-event-body {
  background: var(--surface-2);
}


.history-event-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.history-event-heading strong {
  overflow: hidden;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-event-identity {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.history-event-identity strong {
  min-width: 0;
}

.history-event-identity .history-dose-badge {
  flex: 0 0 auto;
}

.history-event-icon {
  font-size: 1.18rem;
}

.history-event-chevron {
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
}

.history-event-detail {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.4;
}

.history-event-elapsed {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.45;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.history-event-elapsed.is-within-interval {
  border-color: rgb(255 91 98 / 0.28);
  background: rgb(255 91 98 / 0.13);
  color: #ff9da2;
}

.history-event-elapsed.is-after-interval {
  border-color: rgb(94 233 155 / 0.24);
  background: rgb(94 233 155 / 0.11);
  color: #8df2bb;
}

.history-event-time,
.history-event-mobile-time {
  white-space: nowrap;
}

.history-event-alert {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgb(255 67 77 / 0.16);
  color: #ff9da2;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.35;
}

.history-event.violation .history-marker {
  background: var(--danger-strong);
  box-shadow: 0 0 0 3px rgb(255 67 77 / 0.12);
}

.history-event.violation .history-event-time {
  color: #ff9da2;
}

.history-event.violation .history-event-body {
  border-color: var(--danger-border);
  background: linear-gradient(90deg, rgb(255 67 77 / 0.12), var(--surface) 62%);
  box-shadow: inset 3px 0 0 var(--danger-strong);
}

.event-datetime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.event-snapshot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #09090b;
}

.event-snapshot span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.event-snapshot strong {
  flex: 0 0 auto;
  font-size: 0.9rem;
}

.event-help {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.delete-event-button {
  min-height: 46px;
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  background: transparent;
  color: #ff9da2;
  font-weight: 750;
}

.delete-event-button:active {
  background: var(--danger-soft);
}

.event-warning {
  margin: 0;
}

@media (max-width: 520px) {
  .history-header {
    margin-bottom: 24px;
  }

  .history-intro {
    margin-bottom: 26px;
    padding: 12px 14px;
  }

  .history-list {
    gap: 30px;
  }

  .history-day {
    gap: 12px;
  }

  .history-timeline {
    gap: 10px;
  }

  .history-timeline::before {
    top: 24px;
    bottom: 24px;
    left: 8px;
  }

  .history-event {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
  }

  .history-event-time {
    display: none;
  }

  .history-marker {
    grid-column: 1;
    margin-top: 20px;
  }

  .history-event-body {
    grid-column: 2;
    padding: 13px 13px 14px;
    border-radius: 16px;
  }

  .history-event-heading {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .history-event-mobile-time {
    display: inline;
  }

  .history-event.violation .history-event-mobile-time {
    color: #ff9da2;
  }

  .history-event-alert {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .header-actions {
    gap: 7px;
  }

  .header-text-button {
    min-height: 42px;
    padding-inline: 11px;
    font-size: 0.82rem;
  }

  .app-header .icon-button {
    width: 44px;
    height: 44px;
  }

  .event-datetime-grid {
    grid-template-columns: 1fr;
  }
}


/* V1.4 — edição e exclusão de bebidas */
.editor-danger-zone {
  display: grid;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.editor-delete-button {
  min-height: 46px;
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  background: transparent;
  color: #ff9da2;
  font-weight: 780;
}

.editor-delete-button:active {
  background: var(--danger-soft);
}

.edit-interval-note {
  padding: 9px 10px;
  border-left: 3px solid #71717a;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.035);
  line-height: 1.4;
}

.delete-choice-warning {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--danger-border);
  border-radius: 14px;
  background: var(--danger-soft);
}

.delete-choice-warning strong {
  color: #ffd5d7;
  font-size: 0.96rem;
}

.delete-choice-warning span {
  color: #ffb8bc;
  font-size: 0.84rem;
  line-height: 1.45;
}

.delete-choice-actions {
  display: grid;
  gap: 9px;
}

.delete-choice-actions button {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  line-height: 1.25;
}

.delete-keep-button {
  border: 1px solid #71717a;
  border-radius: 12px;
  background: #27272a;
  color: var(--text);
  font-weight: 780;
}

.delete-keep-button:active {
  background: #3f3f46;
}

.history-event-deleted {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid #52525b;
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.35;
}

.deleted-drink-note {
  padding: 11px 13px;
  border: 1px solid #52525b;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.035);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* V1.4.4 — contador compacto */
.waiting .drink-time,
.danger .drink-time {
  white-space: nowrap;
}

/* V1.4.5 — unidade de hora discreta e wheel picker de duração */
.time-unit {
  display: inline-block;
  margin-left: 1px;
  color: currentColor;
  font-size: 0.68em;
  font-weight: 600;
  line-height: 1;
  opacity: 0.58;
  vertical-align: 0.08em;
}

.wheel-duration-inputs {
  gap: 14px;
}

.wheel-picker-shell {
  position: relative;
  height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #09090b;
}

.wheel-picker {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: none;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.wheel-picker::-webkit-scrollbar {
  display: none;
}

.wheel-picker-track {
  padding-block: 88px;
}

.wheel-picker-item {
  display: grid;
  height: 44px;
  place-items: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  color: #71717a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  transition: color 120ms ease, font-size 120ms ease, opacity 120ms ease;
}

.wheel-picker-item.is-selected {
  color: var(--text);
  font-size: 1.48rem;
  font-weight: 850;
}

.wheel-picker-selection {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 10px;
  left: 10px;
  height: 44px;
  transform: translateY(-50%);
  border-top: 1px solid #52525b;
  border-bottom: 1px solid #52525b;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.035);
  pointer-events: none;
}

.wheel-picker-shell::before,
.wheel-picker-shell::after {
  position: absolute;
  z-index: 3;
  right: 0;
  left: 0;
  height: 74px;
  content: "";
  pointer-events: none;
}

.wheel-picker-shell::before {
  top: 0;
  background: linear-gradient(to bottom, #09090b 12%, rgb(9 9 11 / 0));
}

.wheel-picker-shell::after {
  bottom: 0;
  background: linear-gradient(to top, #09090b 12%, rgb(9 9 11 / 0));
}

.wheel-picker:focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: -3px;
  border-radius: 15px;
}

.wheel-picker.is-disabled {
  overflow-y: hidden;
  opacity: 0.38;
  touch-action: none;
  cursor: not-allowed;
}

.wheel-picker.is-disabled + .wheel-picker-selection {
  opacity: 0.38;
}

@media (max-width: 420px) {
  .wheel-picker-shell {
    height: 198px;
  }

  .wheel-picker-track {
    padding-block: 77px;
  }
}


/* V1.4.6 — editor mobile em altura total com ações sempre visíveis */
.drink-dialog-scroll {
  display: grid;
  gap: 20px;
  min-width: 0;
}

@media (max-width: 600px) {
  #drink-dialog {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }

  #drink-dialog form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    width: 100%;
    height: 100%;
    padding: 0;
  }

  #drink-dialog .drink-dialog-scroll {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 0;
    padding: 16px 14px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  #drink-dialog .dialog-header {
    gap: 12px;
  }

  #drink-dialog .dialog-header .icon-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }

  #drink-dialog .eyebrow {
    margin-bottom: 4px;
  }

  #drink-dialog h2 {
    font-size: 1.32rem;
  }

  #drink-dialog .field {
    gap: 6px;
  }

  #drink-dialog .field input[type="text"] {
    min-height: 46px;
  }

  #drink-dialog .icon-options {
    grid-template-rows: repeat(2, 54px);
    grid-auto-columns: 54px;
    gap: 7px;
    padding: 2px 2px 6px;
  }

  #drink-dialog .icon-option {
    width: 54px;
    height: 54px;
  }

  #drink-dialog .icon-option span {
    border-radius: 11px;
    font-size: 1.45rem;
  }

  #drink-dialog .icon-scroll-hint {
    margin-top: 0;
    font-size: 0.72rem;
  }

  #drink-dialog .wheel-duration-inputs {
    gap: 10px;
  }

  #drink-dialog .duration-field {
    gap: 5px;
  }

  :is(#drink-dialog, #log-dialog) .wheel-picker-shell {
    height: 156px;
    border-radius: 14px;
  }

  :is(#drink-dialog, #log-dialog) .wheel-picker-track {
    padding-block: 56px;
  }

  :is(#drink-dialog, #log-dialog) .wheel-picker-shell::before,
  :is(#drink-dialog, #log-dialog) .wheel-picker-shell::after {
    height: 56px;
  }

  #drink-dialog .editor-danger-zone {
    padding-top: 12px;
  }

  :is(#drink-dialog .drink-dialog-actions, #log-dialog .log-dialog-actions) {
    position: relative;
    z-index: 10;
    gap: 10px;
    padding: 11px 14px max(11px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgb(24 24 27 / 0.98);
    box-shadow: 0 -12px 28px rgb(0 0 0 / 0.32);
    backdrop-filter: blur(10px);
  }

  :is(#drink-dialog .drink-dialog-actions, #log-dialog .log-dialog-actions) button {
    min-height: 48px;
  }
}

@media (max-height: 700px) and (max-width: 600px) {
  #drink-dialog .drink-dialog-scroll {
    gap: 11px;
    padding-top: 12px;
  }

  #drink-dialog .icon-options {
    grid-template-rows: repeat(2, 50px);
    grid-auto-columns: 50px;
  }

  #drink-dialog .icon-option {
    width: 50px;
    height: 50px;
  }

  :is(#drink-dialog, #log-dialog) .wheel-picker-shell {
    height: 144px;
  }

  :is(#drink-dialog, #log-dialog) .wheel-picker-track {
    padding-block: 50px;
  }
}




/* V1.6.2 — card em duas linhas e diálogo de anotação em tela cheia no mobile */
.log-dialog-scroll {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

#log-dialog .quick-log-section + .interval-fieldset {
  margin-top: 20px;
}

#log-dialog .wheel-duration-inputs {
  gap: 12px;
}

@media (max-width: 600px) {
  #log-dialog {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
  }

  #log-dialog form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    min-height: 100%;
    padding: 0;
  }

  #log-dialog .log-dialog-scroll {
    gap: 16px;
    padding: 16px 16px 12px;
    overflow: auto;
  }

  #log-dialog .dialog-header {
    margin-bottom: 2px;
  }

  #log-dialog .quick-log-section {
    gap: 10px;
  }

  #log-dialog .quick-time-grid {
    gap: 10px;
  }

  #log-dialog .quick-time-button {
    min-height: 50px;
  }
}

@media (max-height: 700px) and (max-width: 600px) {
  #log-dialog .log-dialog-scroll {
    gap: 12px;
    padding-top: 12px;
  }
}

/* V1.5.0 — dose inteira/meia */
.setting-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.025);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.setting-toggle-copy {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 730;
  line-height: 1.3;
}

.setting-toggle-control {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
}

.setting-toggle-control input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.setting-toggle-track {
  position: absolute;
  inset: 0;
  border: 1px solid #52525b;
  border-radius: 999px;
  background: #27272a;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.setting-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d4d4d8;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  transition: transform 140ms ease, background-color 140ms ease;
}

.setting-toggle-control input:checked + .setting-toggle-track {
  border-color: var(--success);
  background: rgb(94 233 155 / 0.22);
}

.setting-toggle-control input:checked + .setting-toggle-track span {
  transform: translateX(18px);
  background: var(--success);
}

.setting-toggle-control input:focus-visible + .setting-toggle-track {
  outline: 3px solid rgb(255 255 255 / 0.38);
  outline-offset: 3px;
}

.dose-size-dialog {
  width: min(calc(100% - 28px), 390px);
}

.dose-size-dialog form {
  gap: 16px;
}

.dose-size-header h2 {
  overflow: hidden;
  max-width: 265px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dose-choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dose-choice-button {
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #09090b;
  color: var(--text);
  font-size: 1rem;
}

.dose-choice-button strong {
  font-weight: 820;
}

.dose-choice-button.is-selected {
  border-color: var(--success);
  background: rgb(94 233 155 / 0.09);
  box-shadow: inset 0 0 0 1px rgb(94 233 155 / 0.16);
}

.dose-choice-button:active {
  background: var(--surface-2);
}

.history-dose-badge {
  width: fit-content;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid #52525b;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.035);
  color: #d4d4d8;
  font-size: 0.69rem;
  font-weight: 780;
  line-height: 1.35;
}

.history-dose-badge.half {
  border-color: rgb(161 161 170 / 0.75);
  color: #e4e4e7;
}

.history-dose-badge.full {
  color: #a1a1aa;
}

.history-reaction-badge {
  position: absolute;
  right: 10px;
  bottom: -14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.history-reaction-badge.is-empty {
  color: var(--muted);
}

.history-reaction-badge svg {
  width: 18px;
  height: 18px;
}

.history-event.is-reaction-pressing {
  opacity: 0.6;
}

.reaction-picker-popover {
  position: fixed;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 6px 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
}

.reaction-picker-popover[hidden] {
  display: none;
}

.reaction-picker-heading {
  margin: 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.reaction-picker-options {
  display: flex;
  gap: 4px;
}

.reaction-picker-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 120ms ease, background-color 120ms ease;
}

.reaction-picker-button:active {
  background: rgb(255 255 255 / 0.08);
}

.reaction-picker-button.is-selected {
  background: rgb(94 233 155 / 0.16);
  box-shadow: inset 0 0 0 2px var(--success);
  transform: scale(1.08);
}

/* Emoji efêmero ao escolher uma reação - mesma técnica do balão "N BPM" do easter
   egg (.tap-bpm-balloon), só mais sutil e rápido (ver justificativa no módulo que o cria). */
.reaction-pop {
  position: fixed;
  z-index: 5000;
  pointer-events: none;
  user-select: none;
  font-size: 2.8rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: reaction-pop-rise 1500ms ease-out both;
}

@keyframes reaction-pop-rise {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 52px)) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reaction-pop { animation-name: reaction-pop-fade; }
}

@keyframes reaction-pop-fade {
  0%, 100% { opacity: 0; }
  30% { opacity: 1; }
}

.event-dose-field {
  gap: 8px;
}

.event-dose-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.event-dose-options label {
  position: relative;
  min-width: 0;
}

.event-dose-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.event-dose-options span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #09090b;
  color: var(--muted);
  font-weight: 760;
  cursor: pointer;
}

.event-dose-options input:checked + span {
  border-color: var(--success);
  background: rgb(94 233 155 / 0.08);
  color: var(--text);
}

.event-dose-options input:focus-visible + span {
  outline: 3px solid rgb(255 255 255 / 0.38);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  #drink-dialog .setting-toggle {
    min-height: 50px;
    padding-block: 8px;
  }

  #drink-dialog .setting-toggle-copy {
    font-size: 0.8rem;
  }
}

@media (max-height: 700px) and (max-width: 600px) {
  #drink-dialog .drink-dialog-scroll {
    gap: 9px;
  }

  #drink-dialog .setting-toggle {
    min-height: 46px;
    padding-block: 6px;
  }
}


/* V1.6.3 — anotação por duplo toque */
@media (prefers-reduced-motion: reduce) {
  .drink-main.is-awaiting-second-tap {
    transform: none;
  }
}


/* V1.7.0 — atualização controlada da PWA */
.update-toast {
  position: fixed;
  z-index: 120;
  right: 16px;
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 82px));
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(560px, calc(100% - 32px));
  margin-inline: auto;
  padding: 13px 14px;
  border: 1px solid rgb(94 233 155 / 0.38);
  border-radius: 15px;
  background: rgb(18 24 21 / 0.97);
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.42);
  backdrop-filter: blur(12px);
}

.update-toast[hidden] {
  display: none !important;
}

.update-toast-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.update-toast-copy strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.25;
}

.update-toast-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.update-toast-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.update-toast-actions button {
  border: 0;
  font-weight: 800;
}

.update-dismiss {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px !important;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
}

.update-apply {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px !important;
  background: var(--success);
  color: #07120c;
}

.update-apply:disabled {
  opacity: 0.58;
}

@media (max-width: 520px) {
  .update-toast {
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .update-toast-copy span {
    max-width: 240px;
  }

  .update-toast-actions {
    gap: 5px;
  }

  .update-dismiss {
    width: 30px;
    height: 36px;
  }

  .update-apply {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 0.78rem;
  }
}

/* V1.8.0 — Configurações, privacidade e bloqueio do aplicativo */
.boot-pending > :not(#startup-screen) { display: none !important; }
.startup-screen { max-width: 420px; margin: 15vh auto; padding: 24px; text-align: center; }
.startup-screen small { display: block; margin-top: 24px; }
.startup-screen #startup-retry:not([hidden]) { display: block; min-height: 44px; margin: 12px auto 0; }
.startup-screen #startup-retry { padding: 10px 18px; }
.startup-screen #startup-download:not([hidden]) { display: block; min-height: 44px; margin: 16px auto 0; }
.startup-screen #startup-download { padding: 10px 18px; }
/* Atualização do app: tela de início bloqueante parecida com o aviso do rodapé + animação do abacaxi. */
.startup-screen.is-update {
  width: min(360px, calc(100% - 32px));
  padding: 22px 18px;
  border: 1px solid rgb(94 233 155 / 0.38);
  border-radius: 15px;
  background: rgb(18 24 21 / 0.97);
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.42);
}
.startup-screen.is-update h1 { font-size: 1.1rem; margin: 8px 0 4px; }
.startup-screen.is-update #startup-message { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.startup-screen.is-update #startup-retry {
  border: 0;
  border-radius: 10px;
  background: var(--success);
  color: #07120c;
  font-weight: 800;
}
.startup-screen.is-update #startup-retry:disabled { opacity: 0.58; }
.startup-screen.is-update small { margin-top: 16px; }
.updating-art { display: block; width: 120px; height: auto; margin: 0 auto; overflow: visible; filter: drop-shadow(0 0 14px rgb(251 191 36 / 0.28)); }
.updating-art .pine-glasses,
.updating-art .pine-straw { transform-box: fill-box; transform-origin: center; }
/* Uma única execução de 8 s (sem loop): o app só recarrega depois que ela termina e, se a atualização
   demorar mais, o abacaxi fica parado no estado final. Linha do tempo (s):
   0–0,6 repouso · 0,6–1,6 óculos antigo sai pela esquerda · 1,7–3,1 óculos novo entra pela direita ·
   3,1–4,7 pausa · 4,7–5,7 canudo antigo sai para cima e esquerda · 5,8–7,2 canudo novo entra · 7,2–8 repouso. */
.updating-art.is-updating .pine-glasses { animation: pine-glasses-swap 8s linear 1 both; }
.updating-art.is-updating .pine-straw { animation: pine-straw-swap 8s linear 1 both; }
@keyframes pine-glasses-swap {
  0%, 7.5% { transform: none; opacity: 1; animation-timing-function: cubic-bezier(0.4, 0, 1, 1); }
  20% { transform: translateX(-140px) rotate(-14deg); opacity: 0; }
  21.25% { transform: translateX(140px) rotate(10deg); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
  35% { transform: translateX(-5px) rotate(-1.5deg); opacity: 1; animation-timing-function: ease-in-out; }
  38.75%, 100% { transform: none; opacity: 1; }
}
@keyframes pine-straw-swap {
  0%, 58.75% { transform: none; opacity: 1; animation-timing-function: cubic-bezier(0.4, 0, 1, 1); }
  71.25% { transform: translate(-60px, -64px) rotate(-20deg); opacity: 0; }
  72.5% { transform: translate(10px, -30px) rotate(6deg); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
  86.25% { transform: translate(-1px, 2px); opacity: 1; animation-timing-function: ease-in-out; }
  90%, 100% { transform: none; opacity: 1; }
}
.updating-overlay {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  color: var(--text);
}
.updating-overlay[hidden] { display: none !important; }
.updating-overlay .updating-art { width: 150px; }
.updating-overlay p { margin: 0; font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
  .updating-art.is-updating .pine-glasses,
  .updating-art.is-updating .pine-straw { animation: none; }
}
.security-booting #app-shell,
.app-locked #app-shell {
  visibility: hidden;
  pointer-events: none;
}

.home-header {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.home-header-eyebrow {
  margin-bottom: 0;
}

.home-header-main {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 16px;
}

.home-header-main h1 {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
  white-space: nowrap;
}

.home-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 8px;
}

.settings-shortcut {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

.settings-shortcut:active {
  background: var(--surface-2);
  color: var(--text);
}

.settings-view {
  display: grid;
  gap: 14px;
}

.settings-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.settings-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-section-heading .eyebrow {
  margin-bottom: 5px;
}

.settings-section-heading h2 {
  font-size: 1.2rem;
}

.settings-description,
.settings-privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.security-switch {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.security-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.security-switch-track {
  position: relative;
  display: block;
  width: 50px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface-2);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.security-switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d4d4d8;
  transition: transform 180ms ease, background-color 180ms ease;
}

.security-switch input:checked + .security-switch-track {
  border-color: rgb(94 233 155 / 0.6);
  background: rgb(94 233 155 / 0.22);
}

.security-switch input:checked + .security-switch-track span {
  transform: translateX(22px);
  background: var(--success);
}

.security-switch input:focus-visible + .security-switch-track {
  outline: 3px solid rgb(255 255 255 / 0.45);
  outline-offset: 3px;
}

.security-details {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d0d10;
}

.settings-row span,
.settings-field > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.settings-row strong {
  text-align: right;
  font-size: 0.84rem;
}

.settings-secondary-button,
.settings-lock-button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d0d10;
  color: var(--text);
  font-weight: 750;
}

.settings-secondary-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.settings-lock-button {
  border-color: rgb(255 255 255 / 0.16);
  background: var(--surface-2);
}

.settings-field {
  display: grid;
  gap: 7px;
}

.settings-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #0d0d10;
  color: var(--text);
  font: inherit;
}


.drink-menu-section-title { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.drink-menu-section-divider { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 8px; }

.security-support-note {
  padding-top: 2px;
  color: #9be8bd;
  font-size: 0.76rem;
  line-height: 1.45;
}

.security-support-note.is-warning {
  color: #d4d4d8;
}

.settings-privacy-note {
  gap: 8px;
}

.settings-privacy-note strong {
  font-size: 0.95rem;
}

.security-method-dialog form,
.pin-setup-dialog form {
  gap: 18px;
}

.security-method-options {
  display: grid;
  gap: 10px;
}

.security-method-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d0d10;
  color: var(--text);
  text-align: left;
}

.security-method-option:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.security-method-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
}

.security-method-option > span:last-child {
  display: grid;
  gap: 4px;
}

.security-method-option strong {
  font-size: 0.95rem;
}

.security-method-option small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.pin-input {
  font-size: 1.25rem !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.28em;
  text-align: center;
}

.lock-screen {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  overflow: auto;
  background: #09090b;
}

.lock-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(100%, 390px);
  text-align: center;
}

.lock-logo {
  width: 108px;
  height: 108px;
  margin-bottom: 8px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 42px rgb(0 0 0 / 0.4);
}

.lock-card .eyebrow {
  margin: 0;
}

.lock-card h1 {
  margin: 0;
  font-size: 2.5rem;
}

.lock-message {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.unlock-panel {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.unlock-primary {
  width: 100%;
  min-height: 52px;
}

.lock-pin-field {
  text-align: left;
}

.lock-pin-input {
  min-height: 54px !important;
}

.lock-error {
  min-height: 1.4em;
  margin: 2px 0 0;
  color: #ff9da2;
  font-size: 0.82rem;
  line-height: 1.4;
}

.privacy-shield {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: #09090b;
}

.privacy-shield img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
}

.privacy-shield strong {
  font-size: 1.2rem;
}

@media (max-width: 420px) {
  .home-header-main {
    gap: 9px;
  }

  .home-header-main h1 {
    font-size: clamp(2rem, 11vw, 2.55rem);
  }

  .home-header-actions {
    gap: 6px;
  }

  .home-header .header-text-button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.86rem;
  }

  .home-header .icon-button {
    width: 42px;
    height: 42px;
    font-size: 1.75rem;
  }

  .home-header .settings-shortcut {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .settings-card {
    padding: 15px;
  }
}

@media (max-width: 350px) {
  .home-header-main h1 {
    font-size: 1.9rem;
  }

  .home-header .header-text-button {
    padding-inline: 7px;
    font-size: 0.78rem;
  }

  .home-header .icon-button {
    width: 38px;
    height: 38px;
  }

  .home-header .settings-shortcut {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
}


/* V1.8.4 — cabeçalho simplificado e botão de adicionar abaixo da lista */
.home-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  width: 100%;
  min-width: 0;
  gap: 14px;
}

.home-header-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.home-header-copy h1 {
  margin: 0;
  white-space: nowrap;
}

.home-header-eyebrow {
  margin: 0;
}

.home-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: end;
  margin-left: auto;
  gap: 8px;
}

#home-friends-button { position: relative; }

.home-add-zone {
  display: grid;
  place-items: center;
  padding: 22px 0 8px;
}

.home-add-zone[hidden] {
  display: none !important;
}

.home-add-button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 10px 26px rgb(0 0 0 / 0.28);
}

.home-add-button:active {
  transform: scale(0.96);
}

@media (max-width: 420px) {
  .home-header {
    gap: 10px;
  }

  .home-header-copy h1 {
    font-size: clamp(2.2rem, 11vw, 2.8rem);
  }

  .home-header-actions {
    gap: 7px;
  }

  .home-header .header-text-button {
    min-height: 42px;
    padding-inline: 11px;
    font-size: 0.88rem;
  }

  .home-header .settings-shortcut {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 350px) {
  .home-header-copy h1 {
    font-size: 2rem;
  }

  .home-header .header-text-button {
    padding-inline: 8px;
    font-size: 0.8rem;
  }

  .home-header .settings-shortcut {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }
}


/* V1.8.6 — ajustes finos do botão global de Configurações */
#open-settings {
  display: grid;
  place-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1;
}


/* V1.8.8 — landing pública de instalação mais direta */
.browser-mode #app-shell {
  display: none !important;
}

.browser-gate {
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top))
    20px
    max(18px, env(safe-area-inset-bottom));
  background: var(--bg);
}

.browser-gate-main {
  display: grid;
  min-height: calc(100dvh - 104px);
  place-items: center;
}

.browser-gate-card {
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  text-align: center;
}

.browser-gate-logo {
  width: 108px;
  height: 108px;
  margin-bottom: 20px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 42px rgb(0 0 0 / 0.34);
}

.browser-gate-card h1 {
  margin: 0;
  font-size: clamp(2.5rem, 11vw, 3.35rem);
  line-height: 1;
}

.browser-gate-lead {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.browser-install-panel {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 28px;
}

.browser-install-button {
  width: 100%;
  min-height: 56px;
  font-size: 1rem;
}

.browser-install-access {
  display: grid;
  gap: 10px;
  text-align: left;
}

.browser-install-access label {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.browser-install-access input {
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.browser-install-access input:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.browser-install-access small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.browser-install-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.browser-install-status {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.browser-install-status strong {
  color: var(--text);
  font-size: 0.95rem;
}

.browser-install-status span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.browser-install-guidance {
  max-width: 330px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.browser-gate-footer {
  display: grid;
  gap: 3px;
  margin-top: 30px;
  color: #52525b;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.35;
  text-align: center;
}

/* O footer do app fica no fim real da viewport quando a tela é curta. */
.standalone-mode .app-shell {
  padding-bottom: 0;
}

@media (max-width: 420px) {
  .browser-gate {
    padding-inline: 18px;
  }

  .browser-gate-logo {
    width: 100px;
    height: 100px;
  }
}


/* V1.8.9 — onboarding e formulário de bebida */
.empty-add-icon {
  border: 0;
  color: var(--text);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.empty-add-icon:hover {
  background: #303034;
}

.empty-add-icon:active {
  transform: scale(0.95);
}

.required-mark {
  display: inline-block;
  margin-left: 2px;
  color: var(--danger);
  font-size: 0.78em;
  font-weight: 800;
  line-height: 1;
  vertical-align: 0.16em;
}

.required-field > span,
.required-field > legend {
  color: #d4d4d8;
}

.field-error {
  margin-top: 1px;
  color: var(--danger) !important;
  font-size: 0.76rem !important;
  font-weight: 650;
}

#drink-name-field.has-error input[type="text"] {
  border-color: var(--danger-border);
  box-shadow: 0 0 0 1px rgb(255 91 98 / 0.18);
}

#drink-name-field.has-error input[type="text"]:focus {
  border-color: var(--danger);
}

#drink-icon-field.has-error .icon-options {
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--danger-border);
  background: var(--danger-soft);
}

.interval-fieldset {
  gap: 14px;
  padding-top: 3px;
}

.field .interval-fieldset-title {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.interval-fieldset .duration-field > span {
  color: #8f8f98;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.015em;
}

@media (max-width: 600px) {
  :is(#drink-dialog, #log-dialog, #event-dialog) .interval-fieldset {
    gap: 12px;
    padding-top: 5px;
  }

  :is(#drink-dialog, #log-dialog, #event-dialog) .field .interval-fieldset-title {
    font-size: 1.02rem;
  }

  :is(#drink-dialog, #log-dialog, #event-dialog) .interval-fieldset .duration-field {
    gap: 7px;
  }
}


/* V1.9.0 — preferência de interface */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px 0 2px;
  cursor: pointer;
}

.settings-toggle-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-toggle-copy strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.3;
}

.settings-toggle-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.settings-toggle-row > .security-switch {
  pointer-events: none;
}


/* V1.10.0 — Exportar/importar bebidas e backup/restauração */
.settings-data-card {
  gap: 15px;
}

.settings-major-separator {
  height: 18px;
}

.settings-action-stack {
  display: grid;
  gap: 10px;
}

.settings-primary-action {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 12px;
  background: #f4f4f5;
  color: #111118;
  font: inherit;
  font-weight: 800;
}

.settings-primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.visually-hidden-file {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.data-dialog form {
  gap: 18px;
}

.data-file-summary {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d0d10;
}

.data-file-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-file-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.data-choice-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.data-choice-group > legend {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

.data-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d0d10;
  cursor: pointer;
}

.data-choice:has(input:checked) {
  border-color: rgb(94 233 155 / 0.48);
  background: rgb(94 233 155 / 0.075);
}

.data-choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--success);
}

.data-choice > span {
  display: grid;
  gap: 5px;
}

.data-choice strong {
  color: var(--text);
  font-size: 0.88rem;
}

.data-choice small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.restore-warning {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid rgb(255 91 98 / 0.38);
  border-radius: 14px;
  background: rgb(255 91 98 / 0.08);
}

.restore-warning strong {
  color: #ffb0b4;
  font-size: 0.88rem;
}

.restore-warning span {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.restore-warning small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.danger-confirm-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgb(255 91 98 / 0.7);
  border-radius: 12px;
  background: rgb(255 91 98 / 0.14);
  color: #ffb0b4;
  font: inherit;
  font-weight: 800;
}

@media (max-width: 600px) {
  .settings-major-separator {
    height: 24px;
  }

  .data-dialog {
    width: min(94vw, 560px);
  }
}

/* Catálogo pessoal de ícones */
.icon-option > label { display: block; width: 100%; height: 100%; cursor: pointer; }
.icon-option .icon-remove {
  position: absolute; top: 0; right: 0; width: 26px; height: 26px;
  min-height: 0; padding: 0; border-radius: 0 10px 0 10px;
  background: #26262b; color: #ddd; border: 1px solid #555;
  font-size: 16px; line-height: 1; z-index: 1;
}
.icon-option .icon-remove { background: #4a2028; color: #ffb4b4; border-color: #a54e5d; }
.icon-option .icon-remove:hover { background: #702b39; }
.icon-options .icon-add, .icon-options .icon-edit {
  margin-left: 8px; padding: 0; min-height: 0; border-radius: 11px;
  border: 1px dashed #777; background: #19191f; color: #ddd; font-size: 1.8rem;
}
.icon-options .icon-add { grid-row: 1; }
.icon-options .icon-edit { grid-row: 2; font-size: 1.5rem; color: #ffb4b4; border-color: #a54e5d; }
.icon-options .icon-edit[aria-pressed="true"] { border-style: solid; background: #4a2028; }
.icon-options { padding-right: 12px; }
.icon-options-reordering [data-catalog-icon] { transition: transform 160ms ease-out; }
.icon-options [data-catalog-icon] > label { -webkit-touch-callout: none; user-select: none; }
.icon-trash { position: fixed; z-index: 9; height: 58px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #b65766; border-radius: 12px; background: #381a22; color: #ffc0c8; box-shadow: 0 4px 18px #0008; font-size: .9rem; pointer-events: none; }
.icon-trash-active { border-style: solid; border-color: #ff8296; background: #762438; color: #fff; }
.icon-drag-ghost.icon-drag-delete { border-color: #ff8296; background: #762438; }
.icon-dragging { outline: 1px dashed var(--accent); outline-offset: -2px; border-radius: 12px; background: #ffffff08; }
.icon-dragging > * { opacity: 0; }
.icon-drag-ghost { position: fixed; z-index: 10; pointer-events: none; display: grid; place-items: center; background: #26262b; border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 8px 24px #0008; font-size: 1.6rem; transform: scale(1.08); }
.icon-options.icon-drag-active { scroll-snap-type: none; }
#icon-reorder-help, #icon-delete-help { color: var(--muted); font-size: .78rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .icon-options-reordering [data-catalog-icon] { transition: none; }
  .icon-drag-ghost { transform: none; }
}
.icon-add-panel { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #111115; }
.emoji-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.emoji-menu-header label { font-size: .85rem; }
.emoji-menu-header button { padding: 0; width: 32px; height: 32px; min-height: 0; font-size: 1.4rem; }
#emoji-category { width: 100%; margin: 8px 0; padding: 8px; }
.emoji-menu { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; }
.emoji-section { margin: 0 0 12px; }
.emoji-section:last-child { margin-bottom: 0; }
.emoji-section h3 { margin: 0; padding: 8px 2px; font-size: .8rem; color: var(--muted); }
.emoji-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.emoji-menu .emoji-choice { padding: 0; height: 44px; min-width: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 1.5rem; }
.emoji-menu .emoji-choice:hover, .emoji-menu .emoji-choice:focus-visible { border-color: var(--accent); background: #29292f; }
.emoji-menu .emoji-choice:disabled { opacity: .3; cursor: default; }
.icon-catalog-feedback { display: flex; align-items: center; gap: 8px; }
.icon-catalog-feedback:has(small:empty):not(:has(button:not([hidden]))) { display: none; }
.icon-catalog-feedback small { flex: 1; }
.icon-catalog-feedback button { min-height: 44px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #26262b; color: #ddd; font-size: .8rem; white-space: nowrap; }

.reset-settings summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
.reset-settings .settings-description { margin: 14px 0; }
.reset-danger { color: #ffb4b4 !important; background: #382025 !important; border: 1px solid #84434c !important; }
#reset-form { display: grid; gap: 16px; }
#reset-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }
#reset-drinks-list { display: grid; gap: 8px; max-height: 180px; overflow-y: auto; }
.reset-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.reset-check input { width: 20px; height: 20px; flex: 0 0 20px; }
#reset-preview { white-space: pre-line; line-height: 1.5; }
#reset-form .dialog-actions { position: sticky; bottom: 0; background: var(--surface, #18181b); padding: 10px 0; }

#reset-form .dialog-actions button, #reset-setup { min-height: 46px; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
#reset-form .dialog-actions .secondary, #reset-setup { background: #29292e; color: #eee; border: 1px solid var(--border); }

/* Padrões de diálogo e feedback reutilizados no aplicativo. */
.app-dialog-scroll { display: grid; align-content: start; gap: 16px; min-width: 0; }
.reset-step { color: #e3e3e8; font-weight: 750; letter-spacing: .02em; padding: 10px 0; }
.reset-selection-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.reset-selection-tools button { min-height: 44px; padding: 8px 12px; border-radius: 9px; color: #eee; background: #29292e; border: 1px solid #50505a; }
#reset-drinks-list { max-height: 224px; gap: 0; scrollbar-gutter: stable; }
#reset-drinks-list .reset-check { min-height: 52px; box-sizing: border-box; margin: 0; }
#reset-list-hint { color: #ddd; padding: 4px 0; font-weight: 600; }
.reset-history-option { border-top: 1px solid #49494f; margin-top: 8px; padding-top: 18px; }
#reset-submit.reset-confirm { background: #f5f5f5; color: #161619; border: 1px solid #f5f5f5; }
#reset-submit:disabled { opacity: .4; cursor: default; }
#toast.app-notification {
  position: fixed; inset: auto 16px max(18px, env(safe-area-inset-bottom)) auto;
  transform: none; margin: 0; width: min(440px, calc(100vw - 32px)); max-width: none;
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px 12px; padding: 20px;
  border: 2px solid #8b8b98; border-radius: 18px; background: #24242c; color: #fff;
  box-shadow: 0 12px 50px #000a; font-size: 1rem; z-index: 10000;
}
#toast.app-notification[hidden] { display: none; }
#toast-title { grid-column: 2 / -1; align-self: center; font-size: 1.15rem; }
#toast-message { grid-column: 1 / -1; line-height: 1.5; }
.notification-symbol { display: grid; place-items: center; width: 38px; height: 38px; font-size: 1.5rem; font-weight: 800; border-radius: 50%; background: #4d4d5c; }
#toast[data-type="success"] { border-color: #84d5a2; }
#toast[data-type="success"] .notification-symbol { background: #84d5a2; color: #122b1b; }
#toast[data-type="error"] { border-color: #ff999f; }
#toast-dismiss { grid-column: 3; background: #f5f5f5; color: #18181b; }
#toast-undo { grid-column: 2; }
#toast button { min-height: 44px; border-radius: 10px; padding: 10px 16px; font-weight: 700; }
@media (max-width: 600px) {
  dialog.dialog.app-dialog {
    width: 100%; max-width: none; height: 100dvh; max-height: 100dvh !important;
    margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden !important;
  }
  dialog.dialog.app-dialog > form {
    display: grid !important; grid-template-rows: minmax(0, 1fr) auto !important;
    width: 100%; height: 100%; min-height: 0 !important; padding: 0 !important; gap: 0 !important;
  }
  dialog.dialog.app-dialog > form.app-dialog-no-footer { grid-template-rows: minmax(0, 1fr) !important; }
  dialog.dialog.app-dialog .app-dialog-scroll {
    min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    padding: max(16px, env(safe-area-inset-top)) 16px 18px; scrollbar-gutter: stable;
  }
  dialog.dialog.app-dialog .app-dialog-actions {
    position: static !important; margin: 0; padding: 14px 16px max(14px, env(safe-area-inset-bottom)) !important;
    background: #202024; border-top: 1px solid #414147;
  }
  dialog.dialog.app-dialog .app-dialog-actions button { min-height: 48px; }
  #toast.app-notification { inset: auto 12px max(12px, env(safe-area-inset-bottom)) 12px; width: auto; padding: 18px; }
}

/* Avisos compactos, preservando ações e contraste. */
#counting-mode { width: 100%; margin: 8px 0 16px; }
#toast.app-notification { width: min(420px, calc(100vw - 24px)); padding: 10px; gap: 4px 8px; grid-template-columns: 20px minmax(0, 1fr) auto; border-width: 1px; border-radius: 12px; font-size: .875rem; box-shadow: 0 6px 24px #0008; text-align: left; }
#toast-title { grid-column: 2; grid-row: 1; font-size: .85rem; }
#toast-message { grid-column: 1 / 3; grid-row: 2; line-height: 1.35; }
.notification-symbol { grid-column: 1; grid-row: 1; width: 20px; height: 20px; font-size: .8rem; }
.notification-actions { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; }
#toast button { min-height: 32px; padding: 4px 8px; font-size: .78rem; border-radius: 8px; }
#toast-dismiss { order: -1; width: 32px; padding: 0; background: transparent; color: #ddd; border: 0; font-size: 1.35rem; line-height: 1; }
#toast-undo { background: #34343d; color: #fff; border: 1px solid #62626d; }
@media (max-width: 600px) { #toast.app-notification { width: auto; } }

/* Neutraliza a caixa nativa do Popover no Safari/iOS. */
#toast.app-notification[popover] {
  position: fixed;
  inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto;
  width: min(420px, calc(100vw - 24px));
  min-width: 0;
  max-width: calc(100vw - 24px);
  height: auto;
  min-height: 0;
  max-height: min(50dvh, 320px);
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}
#toast.app-notification[popover]::backdrop { background: transparent; pointer-events: none; }

.date-picker-display { position: relative; display: block; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--input-bg, #09090b); color: var(--text); }
.date-picker-display::after { content: '⌄'; float: right; }
.date-picker-display input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-picker-display:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
.app-dialog-actions > button[hidden] { display: none; }

.field > .date-picker-display { color: var(--text); font-size: 1rem; font-weight: 400; }
.app-dialog-actions.has-only-cancel { grid-template-columns: 1fr; }



/* Navegação principal e eventos: mesmos tokens, campos e diálogos do app. */
.standalone-mode .app-shell { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 760px); z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); border: 1px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; background: #151518; box-shadow: 0 -8px 24px rgb(0 0 0 / .2); }
.bottom-nav button { min-width: 0; min-height: 56px; border: 0; border-radius: 12px; padding: 6px 2px; color: var(--muted); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font: inherit; font-size: .7rem; font-weight: 650; }
.bottom-nav button[aria-current="page"] { background: #2b2b31; color: #fff; }
.bottom-nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.occasion-context { display: block; width: 100%; margin: 0 0 18px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--muted); text-align: left; font: inherit; font-size: .82rem; overflow-wrap: anywhere; }
.occasion-context.is-active {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: -4px -2px 14px -4px #ef476f60, 4px 2px 14px -4px #568cff66, 0 4px 13px -4px #b16cff58, 3px -3px 12px -4px #f3ce6248;
  animation: occasion-glow 6s ease-in-out infinite;
}
@keyframes occasion-glow {
  12% { box-shadow: 4px -3px 14px -4px #ef476f58, -3px 4px 13px -4px #568cff62, -4px -1px 14px -4px #b16cff68, 4px 3px 13px -4px #f3ce624c; }
  19% { box-shadow: 5px -3px 17px -3px #ef476f72, -3px 5px 15px -3px #568cff78, -5px -1px 16px -3px #b16cff76, 4px 4px 16px -3px #f3ce6268; }
  26% { box-shadow: 4px -3px 14px -4px #ef476f50, -3px 4px 13px -4px #568cff5c, -4px -1px 14px -4px #b16cff60, 4px 3px 13px -4px #f3ce6246; }
  40% { box-shadow: 3px 4px 14px -4px #ef476f62, -4px -3px 15px -4px #568cff54, 4px -3px 14px -4px #b16cff62, -3px 4px 14px -4px #f3ce6258; }
  48% { box-shadow: 4px 5px 16px -3px #ef476f78, -5px -3px 17px -3px #568cff6c, 5px -4px 16px -3px #b16cff78, -4px 5px 16px -3px #f3ce6270; }
  56% { box-shadow: 3px 4px 14px -4px #ef476f58, -4px -3px 14px -4px #568cff50, 4px -3px 14px -4px #b16cff5c, -3px 4px 13px -4px #f3ce624c; }
  70% { box-shadow: -4px 3px 15px -4px #ef476f5c, 3px -4px 15px -4px #568cff68, 4px 4px 14px -4px #b16cff54, -4px -3px 14px -4px #f3ce625c; }
  78% { box-shadow: -5px 4px 17px -3px #ef476f76, 4px -5px 16px -3px #568cff74, 5px 5px 16px -3px #b16cff70, -5px -4px 17px -3px #f3ce6274; }
  86% { box-shadow: -4px 3px 14px -4px #ef476f54, 3px -4px 14px -4px #568cff5c, 4px 4px 13px -4px #b16cff50, -4px -3px 14px -4px #f3ce624c; }
}
@media (prefers-reduced-motion: reduce) {
  .occasion-context.is-active { animation: none; }
}
.occasion-card { padding: 22px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.occasion-card.is-active { border-color: #727080; }
.occasion-card h2 { margin: 8px 0 12px; font-size: 1.3rem; overflow-wrap: anywhere; }
.occasion-period, .occasion-count, .occasion-empty p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.occasion-unlock-toggle { margin: 16px 0 4px; }
.occasion-unlock-copy { display: grid; gap: 4px; min-width: 0; }
.occasion-unlock-copy strong { color: var(--text); font-size: .84rem; line-height: 1.3; }
.occasion-unlock-copy small { color: var(--muted); font-size: .73rem; line-height: 1.35; }
.occasion-empty { padding: 30px 22px; }
.occasion-symbol { display: block; color: #d3c5f7; font-size: 3rem; }
.occasion-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.occasion-actions button { min-height: 44px; font-size: .8rem; padding: 10px; }
.occasion-actions .primary-button, .occasion-actions .delete-event-button { grid-column: 1 / -1; }
.occasion-actions.is-active .primary-button { grid-column: auto; }
.occasion-history > h2 { font-size: 1rem; margin: 26px 0 16px; }

/* Pareamento e compartilhamento entre pessoas (spec 0023). */
.pairing-alias-row { display: flex; gap: 8px; align-items: center; }
.pairing-alias-row input { flex: 1; min-width: 0; }
.pairing-alias-row button { flex-shrink: 0; min-height: 44px; padding: 0 14px; }
.pairing-panels { display: grid; gap: 14px; margin-top: 8px; }
.pairing-panel { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.pairing-panel > strong { font-size: .84rem; }
.pairing-qr { justify-self: center; width: min(220px, 100%); height: auto; aspect-ratio: 1; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.pairing-scanner { display: grid; gap: 10px; }
.pairing-scanner video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #000; }
.pairing-code { margin: 0; text-align: center; font-size: 1.6rem; font-weight: 700; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.pairing-copy-button { display: inline-flex; align-items: center; justify-self: center; align-self: center; gap: 6px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.pairing-copy-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pairing-copy-button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sharing-empty { color: var(--muted); font-size: .82rem; }
.shared-view-disclaimer { margin: 0 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }

/* Grade de seleção ao compartilhar um evento — toca para marcar, confirma no fim,
   como um "enviar para" de mensageiro. */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 14px 8px; margin: 4px 0 8px; max-height: 45vh; overflow-y: auto; }
.share-person { display: grid; justify-items: center; gap: 6px; background: none; border: none; padding: 2px; color: inherit; font: inherit; cursor: pointer; }
.share-avatar { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--border); font-size: 1.1rem; font-weight: 700; transition: border-color .15s, background .15s; }
.share-person[aria-pressed="true"] .share-avatar { border-color: var(--text); background: var(--accent); color: var(--accent-text); }
.share-person-name { font-size: .74rem; color: var(--muted); text-align: center; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-person[aria-pressed="true"] .share-person-name { color: var(--text); }
.share-person-badge { font-size: .62rem; font-weight: 700; color: var(--success); }
.shared-view-section { margin-bottom: 28px; }
.shared-view-section > .agenda-month-heading { margin: 0 0 10px; }
.share-person-state-badge { font-size: .62rem; color: var(--muted); }
/* Bolinhas pequenas no canto do avatar em vez de um anel em volta do círculo
   inteiro — verde para "ela compartilha com você agora", azul para "você
   compartilha com ela agora". As duas podem aparecer juntas. */
.share-status-dot { position: absolute; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--bg); }
.share-status-dot--incoming { bottom: -2px; right: -2px; background: var(--success); }
#shared-entries { display: grid; gap: 14px; }
.shared-entry-events { display: grid; gap: 4px; margin-top: 6px; max-height: 260px; overflow-y: auto; }
.shared-entry-event { margin: 0; font-size: .8rem; color: var(--muted); }
#record-occasion, .field input[type="datetime-local"] { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #09090b; color: var(--text); font: inherit; }
#history-view > .field { margin-bottom: 16px; }
.history-occasion-field { position: relative; }
.history-filter-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px; background: #09090b; color: var(--text); text-align: left; font: inherit; }
.history-filter-trigger:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.history-filter-chevron { color: var(--muted); font-size: 1.15rem; line-height: 1; transition: transform .16s ease; }
.history-filter-trigger[aria-expanded="true"] .history-filter-chevron { transform: rotate(180deg); }
.history-filter-options { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: min(240px, 42vh); overflow-y: auto; padding: 5px; border: 1px solid var(--border); border-radius: 14px; background: #1b1b1f; box-shadow: 0 14px 34px #0009; overscroll-behavior: contain; }
.history-filter-options[hidden] { display: none; }
.history-filter-option { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: .88rem; line-height: 1.3; }
.history-filter-option[aria-selected="true"] { background: #303036; color: #fff; }
.history-filter-option[aria-selected="true"]::after { content: "✓"; margin-left: auto; padding-left: 12px; color: #cfc2ff; font-weight: 700; }
.history-filter-option:focus-visible { outline: 1px solid #aaa2bd; outline-offset: -1px; }

.date-time-editor { border: 1px solid var(--border); border-radius: 12px; background: #09090b; }
.date-time-editor > summary { padding: 15px; cursor: pointer; font-size: .9rem; }
.date-time-editor-body { padding: 0 14px 14px; display: grid; gap: 16px; }
.agenda-tabs, .shared-detail-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; margin: 20px 0 12px; }
.agenda-tabs button, .shared-detail-tabs button { border: 0; background: transparent; color: var(--muted); padding: 12px; border-radius: 10px; font: inherit; font-size: .85rem; }
.agenda-tabs button[aria-pressed="true"], .shared-detail-tabs button[aria-pressed="true"] { background: #303036; color: white; }
.agenda-row { display: grid; gap: 6px; width: 100%; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; padding: 15px; margin: 8px 0; font: inherit; }
.agenda-row strong { overflow-wrap: anywhere; }
.agenda-row span, .agenda-row small { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.agenda-month-heading { font-size: .85rem; color: var(--muted); margin: 24px 0 10px; }
/* Só a primeira letra em maiúscula: "Setembro de 2026", não "Setembro De 2026". */
.agenda-month-heading::first-letter { text-transform: uppercase; }
.agenda-empty { color: var(--muted); padding: 24px 4px; line-height: 1.6; }
.agenda-options { margin-top: 24px; } .agenda-options button { display: block; width: 100%; margin: 10px 0; min-height: 44px; }
#occasion-detail-content h2 { overflow-wrap: anywhere; }
#occasion-header { align-items: center; justify-content: space-between; }
#occasion-header .primary-button { padding: 10px 15px; font-size: .85rem; min-height: 44px; }
#occasion-mode { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: var(--text); background: var(--surface); font: inherit; }
.occasion-reminder { border: 1px solid #777088; background: var(--surface); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.occasion-reminder p { margin: 0 0 14px; line-height: 1.5; }
.occasion-reminder button { padding: 10px 14px; margin-right: 8px; font-size: .8rem; }

/* Mundo invertido: decoração local, temporária e sem captura de toque. */
.home-header { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.home-header-eyebrow { text-transform: none; transition: opacity 2.5s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .home-header-eyebrow { transition: none; } }
.upside-down-world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -15%, #ba152855, transparent 60%),
    radial-gradient(ellipse at 15% 65%, #16465a80, transparent 65%),
    radial-gradient(ellipse at 95% 90%, #60142566, transparent 55%), #030810;
}
.upside-down-world::before, .upside-down-world::after {
  content: '';
  position: absolute;
  inset: -10%;
  pointer-events: none;
}
.upside-down-world::before {
  background: radial-gradient(ellipse at 30% 50%, #4a819b30, transparent 55%),
    radial-gradient(ellipse at 70% 80%, #92213c38, transparent 50%);
  filter: blur(25px);
  animation: upside-fog 12s ease-in-out infinite alternate;
}
.upside-down-world::after {
  background: repeating-conic-gradient(from 20deg at 0% 100%, transparent 0deg 12deg, #02050bcc 13deg 14deg, transparent 15deg 27deg),
    repeating-conic-gradient(from 180deg at 100% 0%, transparent 0deg 18deg, #02050bb3 19deg 20deg, transparent 21deg 39deg);
  mask-image: linear-gradient(90deg, #000, transparent 42%, transparent 65%, #000);
  opacity: .85;
}
.upside-down-world i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b4d5df;
  box-shadow: 0 0 7px #9ddcf5;
  opacity: .4;
  animation: upside-spores 9s ease-in-out var(--delay) infinite alternate;
}
.upside-down-active { --surface: #101a24; --surface-2: #1c2533; --border: #526271; --muted: #b5c1cf; }
.upside-down-active #app-shell { position: relative; z-index: 1; }
.upside-down-active .home-header-copy { color: #ff626b; text-shadow: 0 0 8px #de193c99, 0 0 28px #b5123755; }
.upside-down-active .home-header-copy h1 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: .035em; }
.upside-down-active .home-header-eyebrow { color: #ff9198; }
.upside-down-active :is(.drink-card, .notice, .settings-card, .occasion-context, .occasion-card, .agenda-row, .occasion-reminder, .bottom-nav) {
  background-color: #0c1523e8;
  border-color: #586479;
  box-shadow: 0 0 22px #8e16351f, inset 0 1px #a7b7d01a;
}
.upside-down-active .drink-card.waiting { border-color: var(--danger-border); background-color: #321724eb; }
.upside-down-active .drink-card.danger { border-color: var(--danger-strong); background-color: #421320ed; }
.upside-down-active .drink-card.completed { border-color: var(--success); }
.upside-down-active .drink-card {
  grid-template-columns: var(--card-actions-width) minmax(0, 1fr);
}
.upside-down-active .drink-card.waiting {
  background: linear-gradient(270deg, var(--danger-soft), var(--surface) 42%);
  box-shadow: inset -4px 0 0 var(--danger);
}
.upside-down-active .drink-card.danger {
  background: linear-gradient(270deg, var(--danger-strong-soft), var(--surface) 58%);
  box-shadow: inset -6px 0 0 var(--danger-strong), 0 0 0 1px rgb(255 67 77 / 0.14);
}
.upside-down-active .drink-card.completed {
  background: linear-gradient(270deg, var(--success-soft), var(--surface) 42%);
  box-shadow: inset -4px 0 0 rgb(94 233 155 / 0.55);
}
.upside-down-active .drink-main {
  grid-column: 2;
  grid-template-columns: minmax(0, 1fr) 56px;
  grid-template-areas:
    "content icon"
    "time time";
  padding-inline: 16px 18px;
  text-align: right;
}
.upside-down-active .card-actions {
  grid-column: 1;
  border-right: 1px solid var(--border);
  border-left: 0;
}
.upside-down-active .drink-content,
.upside-down-active .drink-time { text-align: right; }
.upside-down-active .danger .drink-state { margin-left: auto; }
.upside-down-active .bottom-nav { direction: ltr; }
@media (max-width: 420px) {
  .upside-down-active .drink-main {
    grid-template-columns: minmax(0, 1fr) 52px;
    padding-inline: 10px 14px;
  }
}
.upside-down-active .occasion-context.is-active { animation: none; }
@keyframes upside-fog { to { transform: translate(6%, -4%) scale(1.1); opacity: .65; } }
@keyframes upside-spores { to { transform: translate(18px, -70px); opacity: .12; } }
@media (prefers-reduced-motion: reduce) {
  .upside-down-world::before, .upside-down-world i { animation: none; }
}

/* Faixa ocupa a margem existente abaixo do título, sem deslocar os cards. */
.home-header { position: relative; }
.upside-marquee {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 19px;
  overflow: hidden;
  pointer-events: none;
  color: #e9b9c5;
  font-size: 11px;
  line-height: 18px;
  font-weight: 400;
  text-shadow: 0 0 6px #d7325066;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.upside-marquee span {
  display: block;
  width: max-content;
  padding-left: 100%;
  white-space: nowrap;
  animation: upside-marquee-travel 20s linear forwards;
}
@keyframes upside-marquee-travel { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .upside-marquee { height: auto; mask-image: none; }
  .upside-marquee span { width: 100%; padding-left: 0; white-space: normal; animation: none; font-size: 10px; }
}
.share-active-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.share-active-row + .share-active-row { margin-top: 8px; }
.share-active-text { display: grid; gap: 2px; min-width: 0; }
.share-active-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-active-text span { color: var(--muted); font-size: .76rem; }
.share-stop-button { flex-shrink: 0; min-height: 40px; padding: 0 16px; border: 1px solid var(--danger-strong); border-radius: 12px; background: rgb(255 67 77 / 0.12); color: #ff9da2; font-weight: 800; }
.share-stop-button:active { background: rgb(255 67 77 / 0.22); }
#shared-detail-body .history-day { margin-top: 16px; }
.share-badge { position: absolute; right: -6px; width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--bg); display: grid; place-items: center; color: #06121c; }
.share-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.share-badge--outgoing { top: -5px; background: var(--info); }
.share-badge--incoming { bottom: -5px; background: var(--success); }
.shared-detail-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tab-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; color: #06121c; flex-shrink: 0; }
.tab-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tab-badge.share-badge--incoming, .tab-badge.share-badge--outgoing { position: static; }
.share-panel { display: grid; gap: 8px; }
.share-panel .share-active-row + .share-active-row { margin-top: 0; }
.share-notice { display: grid; gap: 10px; justify-items: start; padding: 14px; border: 1px dashed var(--border); border-radius: 14px; }
.share-notice p { margin: 0; }
.share-start-button { flex-shrink: 0; min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-weight: 800; }
.share-start-button:active { transform: scale(.97); }
.settings-toggle-row.is-highlighted { outline: 2px solid var(--info); outline-offset: 3px; border-radius: 14px; }
.share-badge--ended { bottom: -5px; background: #8a8a94; }
.share-badge--ended-out { top: -5px; background: #8a8a94; }
.share-vendo-event + .share-vendo-event { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.share-vendo-title { display: block; margin: 6px 0 2px; }
.share-vendo-title strong { font-size: 1.05rem; }
.share-status { font-size: .74rem; font-weight: 600; }
.share-status--live { color: var(--success); }
.share-status--ended { color: var(--muted); }
.history-event-elapsed.is-neutral { border-color: var(--border); color: var(--muted); }
/* ✓ dentro do campo: aparece quando o texto foi modificado; tocar desce o teclado. */
.has-field-check { position: relative; }
[data-field-check] { padding-right: 52px; }
button.field-check { position: absolute; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-text); cursor: pointer; animation: field-check-in .14s ease-out; }
button.field-check svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
button.field-check:active { transform: scale(.94); }
@keyframes field-check-in { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { button.field-check { animation: none; } }

/* Configurações: menu de categorias e telas internas */
.settings-menu-screen { display: grid; gap: 18px; }
.settings-menu { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.settings-nav-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color 120ms ease; }
.settings-nav-row:first-child { border-top: 0; }
.settings-nav-row:active { background: var(--surface-2); }
.settings-nav-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--text); }
.settings-nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-nav-text { display: grid; gap: 2px; min-width: 0; }
.settings-nav-text strong { font-size: .98rem; line-height: 1.3; }
.settings-nav-text small { overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav-chevron { display: grid; place-items: center; color: var(--muted); }
.settings-nav-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.settings-menu--danger { border-color: rgb(255 67 77 / .28); }
.settings-nav-row--danger .settings-nav-icon { background: rgb(255 67 77 / .14); color: #ff9da2; }
.settings-nav-row--danger .settings-nav-text strong { color: #ff9da2; }
/* Conta: nuvem cortada sem conta; laranja quando pede atenção (não em "Conectando…"). */
.settings-nav-icon .sync-icon-off, .settings-nav-row.is-disconnected .sync-icon-on { display: none; }
.settings-nav-row.is-disconnected .sync-icon-off { display: block; }
.settings-nav-row--warning .settings-nav-icon { background: var(--warning-soft); color: var(--warning); }
.settings-nav-row--warning .settings-nav-text small { color: var(--warning); }
.sync-state-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.sync-state-note.is-warning { color: var(--warning); }
.sync-state-note svg, .sync-lost-notice svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sync-lost-notice { display: grid; gap: 8px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--warning-border); border-radius: 12px; background: var(--warning-soft); }
.sync-lost-notice p { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--warning); font-size: .84rem; line-height: 1.35; }
.sync-lost-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sync-lost-actions button { min-height: 32px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.sync-lost-actions .sync-lost-connect { border-color: var(--warning); background: var(--warning); color: #1c1305; font-weight: 650; }
.sync-lost-actions button:disabled { opacity: .55; cursor: default; }
.sync-lost-actions button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.settings-page { display: grid; gap: 14px; animation: settings-page-in .16s ease-out; }
.settings-page .settings-section-heading h2 { font-size: 1.05rem; }
.settings-link-card { padding: 0; }
.settings-link-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; color: var(--text); font-weight: 650; text-decoration: none; }
@keyframes settings-page-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .settings-page { animation: none; } }
.settings-page .settings-card > .settings-toggle-row { min-height: 0; padding: 16px 0 0; border-top: 1px solid var(--border); }

/* Evento compartilhado (spec 0025). Marcas de decisão sob o avatar: pequenas e AFASTADAS
   do círculo, para não se confundirem com as setas de "vendo"/"compartilhando", que ficam
   coladas no canto dele. Envelope = convidado; check = confirmou. */
.share-marks { display: flex; align-items: center; justify-content: center; min-height: 16px; margin-top: 2px; }
.share-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 999px; }
.share-mark svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.share-mark--invited { color: var(--muted); border: 1.5px solid var(--border); }
.share-mark--going { color: var(--success); border: 1.5px solid var(--success); }
div.share-person { cursor: default; }
/* As duas linhas do evento (Convidados / Compartilhar doses): clicáveis, sem seletor em linha. */
.occasion-people { display: grid; gap: 0; margin: 4px 0; }
.occasion-people-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin: 4px 0; }
.occasion-people-row small { white-space: nowrap; }

/* Convite pendente também aparece na aba Eventos: ponto no menu de baixo e cartão no topo. */
.bottom-nav button { position: relative; }
.nav-dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 999px; background: var(--success); border: 2px solid var(--bg); }
.occasion-invites { margin-bottom: 8px; }

/* Tutoriais (spec 0026): folha de slides da introdução e de Configurações → Como usar.
   O dialog não tem <form>, então o ui.js não o reestrutura; o layout é próprio. */
.tutorial-dialog { width: min(calc(100% - 24px), 440px); }
/* A folha se adapta à altura da tela: em celular de tela curta (ex.: 375×667) o espaçamento, a área da mídia e o
   texto encolhem, para nada precisar rolar e os botões ficarem sempre à vista. Em tela alta continua igual. */
.tutorial-sheet { display: grid; gap: clamp(8px, 1.7dvh, 14px); padding: clamp(12px, 2.2dvh, 18px); }
.tutorial-sheet .dialog-header { align-items: flex-start; }
.tutorial-skip { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.tutorial-stage { position: relative; display: flex; align-items: center; justify-content: center; height: clamp(170px, min(48dvh, calc(90dvh - 285px)), 440px); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tutorial-media { display: block; flex: 0 1 auto; min-height: 0; min-width: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; border: 1px solid var(--border); border-radius: 14px; background: #0d0d10; object-fit: contain; }
.tutorial-media-error { max-width: 26ch; margin: 0; color: var(--muted); font-size: .9rem; text-align: center; }
.tutorial-play { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); min-height: 40px; font-size: .85rem; white-space: nowrap; }
.tutorial-caption { min-height: 3.2em; margin: 0; font-size: 1rem; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.tutorial-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tutorial-counter { color: var(--muted); font-size: .8rem; font-weight: 700; }
.tutorial-dots { display: inline-flex; align-items: center; gap: 6px; }
.tutorial-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--border); transition: width 140ms ease, background-color 140ms ease; }
.tutorial-dots span[data-active="true"] { width: 18px; background: var(--text); }
@media (prefers-reduced-motion: reduce) { .tutorial-dots span { transition: none; } }
/* Vídeo dos tutoriais: a moldura fica no invólucro para a barra de progresso (que zera a cada volta do
   loop, sinalizando o recomeço) grudar na borda de baixo do vídeo. */
.tutorial-video { position: relative; display: flex; flex: 0 1 auto; height: 100%; max-width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #0d0d10; }
.tutorial-video .tutorial-media { height: 100%; border: 0; border-radius: 0; }
.tutorial-video-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / .16); }
.tutorial-video-bar span { display: block; width: 100%; height: 100%; background: #5eb4e9; transform-origin: 0 50%; transform: scaleX(0); }
/* Slide só de texto dos tutoriais: frase principal, ícone opcional e poucas linhas de apoio. */
.tutorial-texto { display: grid; align-content: center; justify-items: center; gap: clamp(7px, 1.6dvh, 14px); width: 100%; height: 100%; padding: clamp(2px, 1dvh, 8px) 6px; text-align: center; overflow: auto; }
.tutorial-texto-icone { font-size: clamp(1.7rem, 5dvh, 2.6rem); line-height: 1; }
.tutorial-texto-titulo { margin: 0; font-size: clamp(1.05rem, 3dvh, 1.3rem); font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.tutorial-texto-linha { margin: 0; padding-top: clamp(4px, 1.1dvh, 12px); border-top: 1px solid var(--border); width: 100%; color: var(--muted); font-size: clamp(.84rem, 2.1dvh, 1rem); line-height: 1.4; overflow-wrap: anywhere; }
.tutorial-texto-titulo + .tutorial-texto-linha { margin-top: 2px; }
.tutorial-caption--repetida { visibility: hidden; }

/* Tela Eventos (v2.21.0): linhas enxutas, grupo de convites no topo de Próximos, busca só com muitos eventos. */
.agenda-row .agenda-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-size: 1rem; }
.agenda-row .agenda-row-chevron { flex: none; color: var(--muted); font-size: 1.15rem; line-height: 1; }
.tab-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 999px; background: var(--success); vertical-align: middle; }
.tab-dot[hidden], .agenda-search[hidden], .agenda-search-clear[hidden] { display: none; }

/* Convite: uma pergunta esperando resposta, não um evento. Contorno de destaque e a resposta a um toque. */
.invite-row { gap: 10px; border-color: var(--success); }
.invite-row-head { display: grid; gap: 4px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.agenda-row .invite-row-title { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 1rem; }
.invite-row-title svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--success); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agenda-row .invite-row-sub { color: var(--muted); font-size: .78rem; }
.invite-row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invite-row-actions button { min-height: 44px; margin: 0; }
.invite-row-error { margin: 0; color: var(--danger); font-size: .8rem; line-height: 1.4; }
.invite-consent { margin: 0 0 4px; }

.agenda-search { position: relative; display: flex; margin: 4px 0 8px; }
.agenda-search input { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 46px 12px 14px; color: var(--text); background: var(--surface); font: inherit; }
.agenda-search input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.agenda-search-clear { position: absolute; right: 6px; top: 50%; width: 36px; height: 36px; transform: translateY(-50%); border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; }

/* Evento em andamento: cartão em destaque, com o mesmo brilho da Home (parado com movimento reduzido). */
.occasion-current-card {
  box-shadow: -4px -2px 14px -4px #ef476f60, 4px 2px 14px -4px #568cff66, 0 4px 13px -4px #b16cff58, 3px -3px 12px -4px #f3ce6248;
  animation: occasion-glow 6s ease-in-out infinite;
}
.occasion-current-card strong { font-size: 1.15rem; }
.agenda-row .agenda-row-label { color: var(--success); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) {
  .occasion-current-card { animation: none; }
}
