:root {
  --primary: #2adb82;
  --primary-ink: #143028;
  --primary-deep: #0d7a45;
  --bg: #f5f5f5;
  --text: #333333;
  --muted: #777777;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Outfit", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: #e4e4e4;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

button,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button i,
.scope-picker,
.scope-option,
.card-place,
.brand-mark {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  flex-shrink: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.main {
  flex: 1;
  min-height: 0;
  position: relative;
}

.view {
  display: none;
  height: 100%;
}

.view.active {
  display: block;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#view-bosque {
  position: relative;
}

#view-bosque.friends-open,
#view-bosque.pedidos-open,
#view-bosque.tree-open {
  overflow: hidden;
}

#view-map.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filters {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 12px 10px;
  background: var(--bg);
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  border: 0;
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
}

.filter.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.feed,
.day-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed {
  padding: 2px 14px 18px;
}

.pull-indicator {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--primary);
  transition: height 0.2s ease;
}

.pull-indicator i {
  font-size: 22px;
  margin-bottom: 6px;
}

.pull-indicator.is-dragging {
  transition: none;
}

.pull-indicator.is-loading i {
  animation: pull-spin 0.8s linear infinite;
}

@keyframes pull-spin {
  to { transform: rotate(360deg); }
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-top-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.edited {
  font-weight: 500;
}

.card-menu {
  position: relative;
  flex-shrink: 0;
}

.card-menu-pop {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 3;
  min-width: 148px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-menu-pop button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
}

.post-screen {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  pointer-events: none;
}

.post-screen.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.post-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 16px 16px;
}

.post-divider {
  border: 0;
  border-top: 1px solid #e6e6e6;
  margin: 16px 0;
}

.comment {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}

.comment p {
  margin: 2px 0 0;
}

.comment time {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.comment-body {
  min-width: 0;
  flex: 1;
}

.comment-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  margin-top: 8px;
  border-radius: 12px;
}

.comment .like-btn {
  margin: 6px 0 0;
}

.comment-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #ededed;
}

.comment-compose {
  display: flex;
  gap: 8px;
  align-items: center;
}

.comment-draft {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-draft img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
}

.comment-draft button,
.comment-photo-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  padding: 0;
}

.comment-bar input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  padding: 0 14px;
  font: inherit;
}

.comment-send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  display: grid;
  place-items: center;
}

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 48;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.edit-dialog {
  position: absolute;
  inset: 0;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.38);
}

.edit-dialog textarea {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  padding: 12px;
  font: inherit;
  resize: vertical;
  margin-bottom: 12px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card.is-focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.card-place {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.card-place i {
  color: var(--primary);
  font-size: 18px;
}

.card-photos {
  display: grid;
  gap: 6px;
}

.card-photos-2,
.card-photos-3,
.card-photos-4 {
  grid-template-columns: 1fr 1fr;
}

.card-photos-3 .card-photo:first-child {
  grid-column: 1 / -1;
}

.card-photo {
  width: 100%;
  height: 168px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #ececec;
}

.card-photos-2 .card-photo,
.card-photos-3 .card-photo,
.card-photos-4 .card-photo {
  height: 112px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.like-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 4px;
}

.like-btn i {
  font-size: 18px;
}

.like-btn.is-on {
  color: #2adb82;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
}

.card > .tag {
  align-self: flex-start;
  width: fit-content;
}

.tag-utilidade {
  background: rgba(42, 219, 130, 0.18);
  color: var(--primary-deep);
}

.tag-memoria {
  background: #f1eee8;
  color: #6d6256;
}

.tag-alerta {
  background: #fff1e4;
  color: #a86416;
}

.author {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-deep);
  text-align: left;
}

.icon-action {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-foot .tag + .author + .icon-action,
.card-foot .icon-action {
  margin-left: auto;
}

.icon-action.is-saved {
  background: rgba(42, 219, 130, 0.2);
  color: var(--primary-deep);
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
}

.map-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 4px 12px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #e7ece6;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 2px, transparent 2px);
  background-size: 100% 78px, 92px 100%;
  background-position: 0 18px, 20px 0;
}

.map-park {
  position: absolute;
  top: 8%;
  left: 6%;
  width: 34%;
  height: 16%;
  background: #c9e6cf;
  border-radius: 46% 54% 48% 52%;
}

.map-water {
  position: absolute;
  right: -8%;
  bottom: 10%;
  width: 42%;
  height: 14%;
  background: #d5e4ea;
  border-radius: 40px;
  transform: rotate(-8deg);
}

.map-block {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.block-a { top: 38%; left: 14%; width: 18%; height: 9%; }
.block-b { top: 50%; left: 62%; width: 16%; height: 11%; }
.block-c { top: 18%; left: 46%; width: 14%; height: 8%; }
.block-d { top: 62%; left: 46%; width: 20%; height: 7%; }
.block-e { top: 33%; left: 70%; width: 12%; height: 14%; }

.pin {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  transform: translate(-50%, -100%);
}

.pin i {
  font-size: 28px;
  color: var(--primary);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.16));
}

.pin span,
.you span {
  background: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 110px;
  white-space: nowrap;
}

.pin.is-active span {
  background: var(--primary);
  color: var(--primary-ink);
}

.you {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(42, 219, 130, 0.55);
  animation: pulse 2.2s ease-out infinite;
}

.you span {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.map-note {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 4px 8px;
}

.map-callout {
  position: absolute;
  z-index: 4;
  width: min(220px, calc(100% - 16px));
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.map-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.map-callout p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.linkish {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 700;
}

#view-ninho.active {
  padding: 2px 14px 20px;
}

.ninho-intro h2,
.day-title,
.sheet-head h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ninho-intro h2 {
  font-size: 22px;
}

.muted {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.calendar-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
}

.month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.month-bar strong {
  font-size: 15px;
}

.month-bar .icon-action {
  margin-left: 0;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 4px;
}

.day,
.day-pad {
  aspect-ratio: 1;
  min-width: 0;
}

.day {
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
}

.day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

.day.is-selected {
  background: var(--primary);
  color: var(--primary-ink);
}

.day.has-entry::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.day.is-selected.has-entry::after {
  background: var(--primary-ink);
}

.day-title {
  margin: 16px 0 8px;
  font-size: 15px;
}

.tabbar {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  background: #fff;
  border-top: 1px solid #ededed;
  padding: 8px 2px calc(8px + env(safe-area-inset-bottom));
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 0;
  font-size: 9px;
  font-weight: 600;
}

.tab i {
  font-size: 20px;
}

.tab[data-view="bosque"].has-alert i {
  position: relative;
}

.tab[data-view="bosque"].has-alert i::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2adb82;
  border: 1.5px solid #fff;
  box-sizing: border-box;
}

.tab.active,
.tab i.active {
  color: var(--primary);
}

.tab-create {
  justify-self: center;
  width: 52px;
  height: 52px;
  margin-top: -22px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(42, 219, 130, 0.38);
}

.tab-create i {
  font-size: 26px;
  transition: transform 0.2s ease;
}

.tab-create.is-open i {
  transform: rotate(45deg);
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: 39;
  background: rgba(20, 20, 20, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-height: 88%;
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(105%);
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet.open {
  transform: translateY(0);
  pointer-events: auto;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #e0e0e0;
  margin: 2px auto 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-head h2 {
  font-size: 18px;
}

.sheet-head .icon-action {
  margin-left: 0;
}

#composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#relato {
  width: 100%;
  min-height: 104px;
  resize: none;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.45;
}

#relato::placeholder {
  color: var(--muted);
}

#relato.is-invalid {
  box-shadow: inset 0 0 0 1.5px #d36b6b;
}

.hint {
  margin: -6px 0 0;
  color: #a33b3b;
  font-size: 12px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  flex: 1 1 30%;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.choice i {
  font-size: 16px;
}

.choice.is-on {
  background: rgba(42, 219, 130, 0.2);
  color: var(--primary-deep);
}

.tool-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tool-btn.is-set {
  background: rgba(42, 219, 130, 0.2);
  color: var(--primary-deep);
}

.tool-btn:disabled {
  opacity: 0.45;
}

.place-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(42, 219, 130, 0.16);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 600;
}

.place-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-chip i {
  color: var(--primary);
}

.draft-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.draft-photos .draft-photo:only-child {
  grid-column: 1 / -1;
}

.draft-photo {
  position: relative;
}

.draft-photo img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
}

.draft-photo .icon-action {
  position: absolute;
  top: 8px;
  right: 8px;
  margin-left: 0;
  background: #fff;
}

.publish-bar {
  position: sticky;
  bottom: 0;
  padding-top: 4px;
  background: linear-gradient(transparent, #fff 28%);
}

.btn-publish {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 16px;
  font-weight: 700;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(108px + env(safe-area-inset-bottom));
  z-index: 30;
  transform: translateX(-50%) translateY(8px);
  background: #333;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(42, 219, 130, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(42, 219, 130, 0);
  }
}

@media (hover: hover) {
  .icon-action:hover,
  .tool-btn:hover,
  .filter:hover,
  .choice:hover {
    filter: brightness(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.map-legend {
  margin: 0 14px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.region-map,
.exact-preview {
  background: #e7ece6;
}

.region-map {
  flex: 1;
  min-height: 0;
  margin: 0 12px 12px;
  border-radius: var(--radius);
  overflow: hidden;
}

.exact-preview {
  height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
  background: #e7ece6;
  touch-action: none;
}

.btv-pin {
  background: transparent;
  border: 0;
}

.btv-pin-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.tree-intro {
  padding: 2px 14px 0;
}

.tree-intro h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.friend-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 8px;
}

.friend-row::-webkit-scrollbar {
  display: none;
}

.friend-row span {
  flex: 0 0 auto;
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.bosque-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
}

.bosque-pill {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 600;
}

.bosque-pill i {
  font-size: 18px;
}

.bosque-pill.is-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.bosque-icon {
  position: relative;
  display: grid;
  place-items: center;
}

.bosque-dot {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2adb82;
  border: 1.5px solid #fff;
  box-sizing: border-box;
}

.tree-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 8px;
}

.tree-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
}

.tree-card strong,
.tree-card span {
  display: block;
}

.tree-card strong {
  font-size: 15px;
}

.tree-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.bosque-screen,
.tree-modal {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--bg);
}

.bosque-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 24px;
  overflow: auto;
}

.bosque-screen h2,
.tree-sheet h2 {
  margin: 0;
  font-size: 22px;
}

.tree-modal {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: transparent;
}

.tree-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 20, 20, 0.38);
}

.tree-sheet {
  position: relative;
  z-index: 1;
  max-height: 88%;
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tree-field input {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0 12px;
  color: var(--text);
}

.tree-limit {
  margin: 0;
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 600;
}

.tree-members {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow: auto;
}

.tree-member {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: inherit;
  text-align: left;
}

.tree-member[disabled] {
  opacity: 0.4;
}

.tree-member .tick {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 14px;
}

.tree-member.is-on .tick {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.tree-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tree-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: inherit;
  text-align: left;
  font-size: 14px;
}

.tree-switch i {
  flex-shrink: 0;
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: #dedede;
  position: relative;
}

.tree-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}

.tree-switch.is-on i {
  background: var(--primary);
}

.tree-switch.is-on i::after {
  left: 19px;
}

.tree-actions {
  display: flex;
  gap: 8px;
}

.tree-actions button {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
}

.tree-actions button:disabled {
  opacity: 0.45;
}

.social-block {
  margin: 0 14px 12px;
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
}

.social-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.social-item,
.friend-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.social-actions {
  display: flex;
  gap: 8px;
}

.accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.accordion-toggle i {
  font-size: 18px;
}

.friends-accordion.is-open {
  position: absolute;
  inset: 0;
  z-index: 4;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 12px;
  overflow: hidden;
}

.friends-accordion.is-open .accordion-panel {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ig-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.ig-person {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}

.ig-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ig-text strong,
.ig-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-text strong {
  font-size: 14px;
  font-weight: 600;
}

.ig-text span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.avatar-ig {
  width: 44px;
  height: 44px;
}

.unfriend {
  flex-shrink: 0;
  max-width: 112px;
  border: 0;
  border-radius: 8px;
  background: #efefef;
  color: var(--text);
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

#friend-list .empty,
#friend-requests .empty {
  margin: 0;
}

.profile-screen {
  position: absolute;
  inset: 0;
  z-index: 38;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 96px;
  background: var(--bg);
  overflow: auto;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-head h2 {
  margin: 0;
  font-size: 22px;
}

.profile-head p {
  margin: 2px 0 0;
}

.place-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  background: rgba(42, 219, 130, 0.16);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
}

.place-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-pill i {
  color: var(--primary);
  flex-shrink: 0;
}

.scope-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scope-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
}

.scope-option i {
  font-size: 18px;
  color: var(--primary-deep);
  flex-shrink: 0;
}

.scope-option span {
  min-width: 0;
}

.scope-option small,
.scope-option strong {
  display: block;
}

.scope-option small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.scope-option strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.scope-option.is-on {
  background: var(--primary);
  color: var(--primary-ink);
}

.scope-option.is-on small,
.scope-option.is-on i,
.scope-option.is-on strong {
  color: var(--primary-ink);
}

.scope-option:disabled {
  opacity: 0.7;
}

.scope-cancel {
  align-self: flex-end;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 2px;
}

.card-place-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

#btn-location {
  touch-action: manipulation;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.notif-bell {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  padding: 0;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2adb82;
  border: 1.5px solid #fff;
  box-sizing: border-box;
}

.notif-screen {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 96px;
  background: var(--bg);
  overflow: auto;
}

.notif-screen h2 {
  margin: 0;
  font-size: 22px;
}

.notif-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.notif-row.is-new {
  background: rgba(42, 219, 130, 0.08);
  margin: 0 -16px;
  padding: 10px 16px;
}

.notif-row .ig-person {
  flex: 1 1 200px;
}

.notif-row .ig-text strong,
.notif-row .ig-text span {
  white-space: normal;
}

.notif-row .ig-text span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-row time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 46vw;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 0;
}

.header-profile span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gate {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  overflow: auto;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
}

html.has-session .gate {
  display: none;
}

.gate-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.gate-panel.is-active {
  display: flex;
  animation: gate-in 0.28s ease;
}

@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gate-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.gate-brand h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.gate-brand p,
.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.gate-logo {
  width: 56px;
  height: 56px;
}

.gate-brand-compact {
  margin-top: 4px;
}

.gate-brand-compact h1 {
  font-size: 26px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field textarea,
.field-box {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 16px;
}

.field textarea {
  border-radius: var(--radius);
  resize: none;
  min-height: 88px;
  padding: 12px 14px;
}

.field > input,
.field-box {
  min-height: 48px;
  padding: 0 16px;
}

.date-box {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  overflow: hidden;
}

.date-box input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 48px;
}

.date-box input[type="date"]::-webkit-datetime-edit,
.date-box input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.date-box input[type="date"]::-webkit-date-and-time-value {
  height: 48px;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 48px;
}

.date-box input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  height: 18px;
  width: 18px;
}

.field-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
}

.field-box b {
  color: var(--muted);
  font-weight: 700;
}

.field-box input {
  flex: 1;
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: inherit;
}

.field input.is-invalid,
.field textarea.is-invalid,
.field-box.is-invalid {
  box-shadow: 0 0 0 2px #e15b64;
}

.field-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}

.eye {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.eye i {
  font-size: 20px;
}

.btn-pill {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.link-quiet,
.link-back {
  border: 0;
  background: transparent;
  color: var(--primary-deep);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
}

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}

.onboard-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
  align-self: center;
  box-shadow: var(--shadow);
}

.onboard-preview img,
.onboard-preview svg,
.avatar img,
.avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  display: block;
  flex-shrink: 0;
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

.avatar-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.avatar-choice {
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
}

.avatar-choice svg {
  width: 42px;
  height: 42px;
}

.avatar-choice.is-on {
  box-shadow: 0 0 0 2px var(--primary);
}

.cropper {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  background: var(--bg);
  overflow: auto;
}

.crop-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.crop-frame {
  width: min(280px, 100%);
  aspect-ratio: 1;
  align-self: center;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--primary);
  touch-action: none;
  cursor: grab;
}

.crop-frame img {
  position: absolute;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.crop-zoom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.crop-zoom input {
  width: 100%;
  accent-color: var(--primary);
}

.file-btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.nest-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}

.nest-profile strong {
  display: block;
  font-size: 16px;
}

.nest-profile p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.nest-profile .link-quiet {
  grid-column: 1 / -1;
  justify-self: start;
  padding-bottom: 0;
}

.recover-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recover-result {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.confirm {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.38);
}

.confirm-card {
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  box-shadow: var(--shadow);
}

.confirm-card p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.4;
}

.confirm-actions {
  display: flex;
  gap: 8px;
}

.confirm-actions button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.confirm-no {
  background: #efefef;
  color: var(--text);
}

.confirm-yes {
  background: var(--primary);
  color: var(--primary-ink);
}

.toast {
  z-index: 50;
}
