:root {
  --bg0: #1a2420;
  --bg1: #24302a;
  --bg2: #2f3d35;
  --fog: rgba(236, 242, 232, 0.08);
  --text: #f2f6ef;
  --muted: #a8b5aa;
  --accent: #7fbf7a;
  --accent-deep: #4f8f55;
  --skip: #d97a6c;
  --help: #e0b35c;
  --home: #7fbf7a;
  --card-radius: 28px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabs-h: calc(64px + var(--safe-b));
  --content-pad-b: calc(var(--tabs-h) + 20px);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(120% 80% at 10% -10%, #3a5346 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 0%, #2a3a30 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), #121916 100%);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  overflow: hidden;
}

body.filters-open {
  overflow: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 0;
  padding-bottom: var(--content-pad-b);
  position: relative;
  overflow: hidden;
}

main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.top {
  flex-shrink: 0;
  padding: 8px 4px 12px;
  animation: rise 0.55s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), #c9e4a8);
  box-shadow: 0 0 0 4px rgba(127, 191, 122, 0.18);
  animation: pulse 2.8s ease-in-out infinite;
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.view {
  display: none;
  min-height: 0;
  height: 100%;
}

.view.is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  animation: fade 0.35s ease both;
}

.deck {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  margin-top: 4px;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--bg2);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform-origin: 50% 110%;
  will-change: transform;
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.2s ease;
}

.card.is-front {
  z-index: 3;
  cursor: grab;
}

.card.is-next {
  z-index: 2;
  transform: scale(0.96) translateY(10px);
  opacity: 0.85;
}

.card.is-back {
  z-index: 1;
  transform: scale(0.92) translateY(18px);
  opacity: 0.55;
}

.card.is-dragging {
  cursor: grabbing;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.45);
}

.card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 42%, rgba(10, 16, 12, 0.88) 100%),
    linear-gradient(0deg, transparent 70%, rgba(10, 16, 12, 0.35) 100%);
  pointer-events: none;
}

.card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 20px 24px;
  z-index: 1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.chip.need-home {
  background: rgba(127, 191, 122, 0.28);
  color: #d8f5d4;
}

.chip.need-help {
  background: rgba(224, 179, 92, 0.28);
  color: #ffe7b0;
}

.card-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.meta {
  margin: 6px 0 10px;
  color: rgba(242, 246, 239, 0.82);
  font-size: 0.92rem;
  font-weight: 500;
}

.desc {
  margin: 0;
  color: rgba(242, 246, 239, 0.78);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tap-hint {
  margin: 10px 0 0;
  color: rgba(242, 246, 239, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
}

.desc-inline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.like-card.is-clickable {
  cursor: pointer;
}

.detail[hidden] {
  display: none !important;
}

.detail {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 10% -10%, #3a5346 0%, transparent 55%),
    linear-gradient(180deg, #1a2420, #121916 100%);
  animation: fade 0.2s ease both;
}

.detail-head {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.detail-head strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-align: center;
}

.detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-photo {
  width: 100%;
  height: min(42vh, 360px);
  object-fit: cover;
  display: block;
}

.detail-gallery {
  position: relative;
  touch-action: pan-y;
  user-select: none;
}

.detail-gallery .detail-photo {
  display: none;
}

.detail-gallery .detail-photo.is-active {
  display: block;
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.gallery-dot.is-on {
  background: #fff;
  transform: scale(1.15);
}

.gallery-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 600;
}

.curator-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.verified-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #102016;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.help-sheet[hidden] {
  display: none !important;
}

.help-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  background: rgba(8, 12, 10, 0.55);
  padding: 16px 16px calc(16px + var(--safe-b));
  animation: fade 0.2s ease both;
}

.help-card {
  width: min(480px, 100%);
  max-height: min(78vh, 620px);
  overflow: auto;
  border-radius: 22px;
  background: linear-gradient(180deg, #24302a, #1a2420);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

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

.help-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.help-body {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.help-body p {
  margin: 0 0 12px;
}

.help-body b {
  color: var(--text);
  font-weight: 700;
}

.help-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(127, 191, 122, 0.12);
  color: var(--text) !important;
}

body.help-open {
  overflow: hidden;
}

.detail-content {
  padding: 18px 16px calc(24px + var(--safe-b));
  max-width: 480px;
  margin: 0 auto;
}

.detail-content h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.detail-lead {
  margin: 12px 0 0;
  color: rgba(242, 246, 239, 0.88);
  line-height: 1.45;
}

.detail-section {
  margin-top: 18px;
}

.detail-section h3 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.detail-section p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.detail-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.detail-actions .cta {
  width: 100%;
  padding: 14px 16px;
}

body.detail-open .tabs {
  opacity: 0.25;
  pointer-events: none;
}



.stamp {
  position: absolute;
  top: 28px;
  padding: 8px 14px;
  border: 3px solid;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.1rem;
  opacity: 0;
  transform: rotate(-12deg) scale(0.9);
  pointer-events: none;
  z-index: 2;
}

.stamp-like {
  left: 20px;
  color: var(--accent);
  border-color: var(--accent);
}

.stamp-skip {
  right: 20px;
  color: var(--skip);
  border-color: var(--skip);
  transform: rotate(12deg) scale(0.9);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.start-hint {
  margin: 6px 0 0;
  color: rgba(168, 181, 170, 0.85);
  font-size: 0.78rem;
  font-weight: 500;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
}

.icon-btn.is-active {
  background: rgba(127, 191, 122, 0.22);
}

.icon-btn[hidden] {
  display: none !important;
}

.filter-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.filters[hidden] {
  display: none !important;
}

.filters {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100%;
  max-width: none;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background:
    radial-gradient(120% 80% at 10% -10%, #3a5346 0%, transparent 55%),
    linear-gradient(180deg, #1a2420, #121916 100%);
  display: flex;
  flex-direction: column;
  box-shadow: none;
  animation: fade 0.2s ease both;
}

.filters-head {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filters-head strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-align: center;
}

.filters-head-spacer {
  width: 42px;
  height: 42px;
}

.filters-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.filters-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: grid;
  gap: 20px;
  align-content: start;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.filters-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.filters-actions .cta {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.filter-group {
  display: grid;
  gap: 10px;
}

.filter-group label,
.need-field legend {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.seg-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn.is-on {
  background: rgba(127, 191, 122, 0.22);
  color: var(--text);
}

.filters select,
.post-form input,
.post-form select,
.post-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 12px;
  outline: none;
}

.filters select {
  padding: 14px 12px;
  font-size: 1rem;
  border-radius: 14px;
}

.filters select:focus,
.post-form input:focus,
.post-form select:focus,
.post-form textarea:focus {
  border-color: rgba(127, 191, 122, 0.55);
}

.empty-cta {
  margin-top: 16px;
}

.btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.btn-undo {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: center;
  padding: 12px 0 4px;
  flex-shrink: 0;
  animation: rise 0.6s 0.08s ease both;
}

.post-form {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: none;
  padding-bottom: 28px;
  -webkit-overflow-scrolling: touch;
}

.form-lead {
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.post-form > label,
.form-row label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.need-field {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.curator-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  cursor: pointer;
}

.check-row input {
  width: 18px !important;
  height: 18px;
  accent-color: var(--accent-deep);
}

.photo-box {
  display: grid;
  gap: 10px;
}

.photo-pick {
  display: block !important;
  cursor: pointer;
}

.photo-pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-pick-btn {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.photo-preview-wrap {
  display: grid;
  gap: 8px;
}

.photo-preview-wrap img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-preview-grid[hidden] {
  display: none !important;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-main-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.mine-toolbar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-shrink: 0;
}

.mine-toolbar .form-submit {
  flex: 1;
  margin-bottom: 0;
}

.mine-filter-toggle {
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.mine-filter-toggle.is-active {
  background: rgba(127, 191, 122, 0.18);
}

.mine-filter-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.mine-filter-dot[hidden] {
  display: none !important;
}

.mine-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.mine-filters[hidden] {
  display: none !important;
}

.mine-filters .filter-group {
  gap: 8px;
}

.mine-filters .seg-btn {
  padding: 10px 12px;
  font-size: 0.85rem;
}

.mine-filters input[type="search"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 12px 14px;
}

.mine-filters input[type="search"]::placeholder {
  color: rgba(168, 181, 170, 0.75);
}

.mine-reset {
  align-self: flex-start;
  padding: 8px 12px;
}

.photo-link-details {
  color: var(--muted);
  font-size: 0.85rem;
}

.photo-link-details summary {
  cursor: pointer;
  margin-bottom: 8px;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.post-form .filter-group {
  gap: 10px;
}

.post-form .seg-btn {
  padding: 12px 14px;
  font-size: 0.9rem;
}

.form-submit {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.mine-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.mine-hub .likes-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.mine-empty {
  margin-top: 24px;
}

.animal-editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.animal-editor[hidden],
.mine-hub[hidden] {
  display: none !important;
}

.editor-back {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0 0 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.editor-back:active {
  color: var(--text);
}

.mine-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  flex-shrink: 0;
}


.btn {
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.94);
}

.btn-skip {
  background: rgba(217, 122, 108, 0.16);
  color: #f0b0a6;
  box-shadow: inset 0 0 0 1px rgba(217, 122, 108, 0.35);
}

.btn-like {
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #102016;
  box-shadow: 0 10px 24px rgba(79, 143, 85, 0.35);
}

.empty {
  margin: auto;
  text-align: center;
  padding: 32px 16px;
  max-width: 280px;
  animation: fade 0.4s ease both;
}

.empty h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.likes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 4px 0 28px;
  flex: 1;
  min-height: 0;
  max-height: none;
  -webkit-overflow-scrolling: touch;
}

.like-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  animation: rise 0.4s ease both;
}

.like-card img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
}

.like-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.like-info h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.like-info .meta {
  margin: 4px 0 8px;
  font-size: 0.82rem;
}

.like-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cta-primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #102016;
}

.cta-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(18, 25, 22, 0.96) 22%);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.tab {
  position: relative;
  border: none;
  border-radius: 16px;
  padding: 11px 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab.is-active {
  background: rgba(127, 191, 122, 0.18);
  color: var(--text);
}

.tab-icon {
  opacity: 0.85;
}

.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #102016;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs-h) + 16px);
  transform: translateX(-50%) translateY(12px);
  background: rgba(36, 48, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
  max-width: min(90vw, 360px);
  text-align: center;
}

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

.kb-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs-h) + 8px);
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px;
  z-index: 45;
  pointer-events: none;
}

.kb-bar[hidden] {
  display: none !important;
}

.kb-done {
  pointer-events: auto;
  border: none;
  border-radius: 14px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: #102016;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

body.kb-open .tabs {
  opacity: 0.35;
  pointer-events: none;
}


@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

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