:root {
  --bg-page: #faf8f5;
  --bg-surface: #ffffff;
  --text-primary: #1f2421;
  --text-secondary: #5c635e;
  --accent-pine: #1e4635;
  --accent-pine-active: #143024;
  --accent-berry: #9e2a2b;
  --accent-gold: #c9a24b;
  --border-subtle: #e5e0d8;
  --shadow-sm: 0 2px 6px rgba(31, 36, 33, 0.04);
  --radius-md: 14px;
  --radius-sm: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 0 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Cabeçalho compacto para tela de celular */
.site-header {
  text-align: center;
  padding: calc(1.75rem + env(safe-area-inset-top)) 0 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-berry);
  margin-bottom: 0.35rem;
}

h1,
h2 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  color: var(--accent-pine);
}

h1 {
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 340px;
  margin: 0 auto;
}

/* Conteúdo Principal */
main {
  flex: 1;
  padding: 1.25rem 0 2.5rem;
}

/* Barra de Pesquisa fixa no topo ao rolar */
.search-wrapper {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-page);
  padding: 0.25rem 0 1rem;
}

#search-input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 16px; /* Evita zoom automático no iPhone */
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  appearance: none;
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-pine);
  box-shadow: 0 0 0 3px rgba(30, 70, 53, 0.14);
}

/* Lista vertical otimizada para toque com o polegar */
.participants-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.participant-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.15rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
  transition: transform 0.1s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.participant-btn:active {
  transform: scale(0.985);
  background-color: #f4f1eb;
  border-color: var(--accent-gold);
}

.participant-arrow {
  color: var(--accent-gold);
  font-size: 1.15rem;
  font-weight: 600;
}

.empty-message {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 2rem 1rem;
}

/* Tela de Sugestões de Presente */
.sticky-top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-page);
  padding: 0.25rem 0 1rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-back:active {
  background-color: #f3f0ea;
  border-color: var(--accent-pine);
}

.wishlist-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.wishlist-header h2 {
  font-size: 1.55rem;
}

.gifts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gift-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.gift-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.gift-notes {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.btn-store {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 1rem;
  background-color: var(--accent-pine);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-store:active {
  background-color: var(--accent-pine-active);
  transform: scale(0.99);
}

/* Rodapé */
.site-footer {
  text-align: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
}