:root {
  --bg: #f6f3ee;
  --card: #fffdf9;
  --line: #e8e1d7;
  --placeholder: #ede5dc;
  --text: #2b2925;
  --muted: #7a746b;
  --accent: #535e47;
  --accent-dark: #434c39;
  --danger: #a5523f;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 64px; }

button { font: inherit; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  transition: background .15s, opacity .15s;
}
.btn:active { background: var(--accent-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:active { background: var(--placeholder); }

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:active { background: var(--placeholder); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; }

label { display: block; font-size: 14px; font-weight: 500; margin: 18px 0 8px; }
label .opt { color: var(--muted); font-weight: 400; }

input[type=text], input[type=number], input[type=password], input[type=date] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 13px 15px;
  font: inherit;
  font-size: 16px; /* evita zoom no iOS */
  color: var(--text);
  outline: none;
  min-height: 50px;
  -webkit-appearance: none;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: #aaa398; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ph {
  background: var(--placeholder);
  color: #b3a798;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph svg { width: 30px; height: 30px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modal tipo "folha" que sobe de baixo no celular */
.sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(30, 28, 24, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  animation: fade .2s;
}
.sheet {
  background: var(--card);
  width: 100%;
  max-width: 560px;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
  animation: up .25s ease-out;
}
@media (min-width: 600px) {
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 24px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.hidden { display: none !important; }
