:root {
  color-scheme: light;
  --bg: #eef4ef;
  --ink: #16211c;
  --muted: #65736b;
  --panel: #fbfdf9;
  --line: #d7e1d9;
  --leaf: #276749;
  --leaf-soft: #dff0e5;
  --sun: #f1b64b;
  --sky: #9cd4df;
  --coral: #d96b5f;
  --deep: #213c34;
  --shadow: 0 20px 55px rgba(26, 47, 39, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 16% 16%, rgba(156, 212, 223, 0.4), transparent 34%),
    linear-gradient(135deg, #f7faf6 0%, var(--bg) 44%, #f1eadf 100%);
  color: var(--ink);
}

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.legal-page h1 {
  margin: 28px 0 8px;
  font-size: 44px;
  line-height: 1.02;
}

.legal-page h2 {
  margin: 32px 0 10px;
  font-size: 22px;
}

.legal-page p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.legal-page a {
  color: var(--leaf);
  font-weight: 800;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  place-items: center;
}

.phone {
  width: min(100%, 430px);
  min-height: min(920px, calc(100vh - 56px));
  background: rgba(251, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 24px 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-mark {
  width: 54px;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 207, 121, 0.48);
  border-radius: 18px;
  background: var(--deep);
  box-shadow:
    0 14px 24px rgba(16, 40, 32, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

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

.top-actions select {
  width: 98px;
  min-height: 40px;
  padding-inline: 10px;
  font-size: 0.8rem;
}

.eyebrow,
.hero-label {
  margin: 0 0 4px;
  color: var(--leaf);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 1.72rem;
  line-height: 1.05;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.24rem;
  line-height: 1.18;
}

h3 {
  margin-bottom: 7px;
  font-size: 1rem;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--deep);
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}

.hero-panel {
  margin: 0 18px 14px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(33, 60, 52, 0.95), rgba(39, 103, 73, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 260'%3E%3Ccircle cx='394' cy='61' r='34' fill='%23f1b64b'/%3E%3Cpath d='M62 182c57-77 105-89 145-36 23 31 56 34 93 9 38-25 78-10 121 47' fill='none' stroke='%239cd4df' stroke-width='20' stroke-linecap='round' opacity='.52'/%3E%3Cpath d='M63 94c28-10 49-5 63 16 13-24 35-33 66-27' fill='none' stroke='white' stroke-width='12' stroke-linecap='round' opacity='.26'/%3E%3C/svg%3E");
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 92px;
  align-items: center;
  gap: 14px;
}

.hero-panel p,
.hero-panel h2 {
  color: #fff;
}

.hero-panel .hero-copy p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.hero-label {
  color: var(--sun);
}

.score-ring {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    conic-gradient(var(--sun) 0 72%, rgba(255, 255, 255, 0.18) 72%),
    rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: var(--deep);
  z-index: -1;
}

.score-ring span,
.score-ring small {
  display: block;
  text-align: center;
}

.score-ring span {
  font-size: 1.24rem;
  font-weight: 850;
}

.score-ring small {
  margin-top: -18px;
  color: rgba(255, 255, 255, 0.68);
}

.tabbar {
  margin: 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 1px;
  font-size: 0.68rem;
  font-weight: 750;
}

.tab span {
  font-size: 1rem;
  line-height: 1;
}

.tab.is-active {
  background: var(--leaf-soft);
  color: var(--leaf);
}

.view {
  display: none;
  padding: 16px 18px 22px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.view.is-active {
  display: block;
}

.quota-row,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quota-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.access-row {
  background:
    linear-gradient(135deg, rgba(223, 240, 229, 0.9), rgba(255, 255, 255, 0.92)),
    #fff;
}

.quota-row p {
  margin: 0;
  font-size: 0.86rem;
}

.metric {
  display: block;
  color: var(--deep);
  font-size: 1.28rem;
  font-weight: 850;
}

.ghost-button,
.primary-button {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.83rem;
  font-weight: 800;
  white-space: nowrap;
}

.ghost-button {
  background: var(--leaf-soft);
  color: var(--leaf);
}

.primary-button {
  width: 100%;
  background: var(--deep);
  color: #fff;
}

.primary-button:disabled,
.primary-button[aria-disabled="true"] {
  opacity: 0.72;
}

.upload-card {
  margin: 14px 0;
  min-height: 138px;
  border: 1.5px dashed #9cb9a6;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.upload-card input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.upload-card small {
  color: var(--muted);
}

.privacy-panel,
.account-card,
.map-privacy-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(223, 240, 229, 0.72)),
    #fff;
}

.privacy-panel {
  display: grid;
  gap: 11px;
}

.privacy-panel strong,
.map-privacy-card strong {
  color: var(--deep);
  font-size: 0.94rem;
}

.switch-row,
.select-inline {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.switch-row input {
  width: 18px;
  aspect-ratio: 1;
  accent-color: var(--leaf);
  flex: 0 0 auto;
}

.select-inline select {
  width: 130px;
  min-height: 38px;
  font-size: 0.78rem;
}

.location-consent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.location-consent-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.location-consent-row button {
  min-width: 112px;
}

.identify-card,
.plan-card,
.collection-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.identify-card {
  min-height: 260px;
  overflow: hidden;
}

.empty-state {
  min-height: 260px;
  padding: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state p {
  margin-bottom: 0;
}

.bird-mark {
  width: 88px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 62% 38%, #111 0 5px, transparent 6px),
    radial-gradient(circle at 46% 48%, #fff 0 14px, transparent 15px),
    radial-gradient(circle at 48% 50%, var(--coral) 0 34px, transparent 35px),
    linear-gradient(135deg, var(--sky), var(--leaf-soft));
  margin-bottom: 14px;
}

.result-media {
  min-height: 178px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.22)),
    var(--sky);
  position: relative;
  overflow: hidden;
}

.result-media img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.result-media .species-art {
  height: 210px;
}

.confidence {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--deep);
  font-size: 0.8rem;
  font-weight: 850;
}

.result-body {
  padding: 16px;
}

.latin {
  margin-top: -4px;
  color: var(--leaf);
  font-size: 0.86rem;
  font-style: italic;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.trait {
  padding: 10px;
  border-radius: 14px;
  background: #f3f7f2;
}

.trait span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.trait strong {
  display: block;
  margin-top: 3px;
  font-size: 0.88rem;
}

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

.action-row button {
  min-height: 44px;
}

.card-studio {
  margin-top: 14px;
}

.card-studio[hidden] {
  display: none;
}

.section-head.compact {
  align-items: end;
  margin: 18px 0 10px;
}

.section-head.compact h2 {
  font-size: 1.05rem;
}

.studio-pill {
  min-width: 76px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #132e27;
  color: var(--sun);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(244, 207, 121, 0.2);
}

.bird-trading-card {
  --card-accent: #2a9bc0;
  --card-warm: #d96b5f;
  --card-spark: #f1b64b;
  aspect-ratio: 4 / 5;
  padding: 14px;
  border: 1px solid rgba(244, 207, 121, 0.62);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 9%, color-mix(in srgb, var(--card-spark) 36%, transparent), transparent 28%),
    linear-gradient(145deg, #10251f 0%, #193d34 49%, #111917 100%);
  color: #fff;
  box-shadow:
    0 22px 44px rgba(16, 40, 32, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.13);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  isolation: isolate;
}

.bird-trading-card::before {
  content: "";
  position: absolute;
  inset: -42% -24% auto auto;
  width: 72%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 58%);
  transform: rotate(18deg);
  opacity: 0.6;
  z-index: -1;
}

.bird-trading-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  pointer-events: none;
}

.card-topline,
.card-name-row,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-topline {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card-topline strong {
  color: var(--card-spark);
  font-size: 0.68rem;
}

.card-photo {
  min-height: 0;
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 42%, #fff), #f8f2da),
    var(--sky);
  overflow: hidden;
  position: relative;
}

.card-photo img,
.mini-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-photo .species-art,
.mini-card-media .species-art {
  height: 100%;
}

.rarity-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(17, 25, 23, 0.82);
  color: #fff7df;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.card-name-row {
  align-items: flex-start;
}

.card-name-row h3 {
  margin-bottom: 2px;
  color: #fff;
  font-size: 1.12rem;
}

.card-name-row p {
  margin: 0;
  color: var(--card-accent);
  font-size: 0.76rem;
  font-style: italic;
  font-weight: 750;
}

.rarity-score {
  min-width: 68px;
  padding: 6px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff7df;
  text-align: center;
}

.rarity-score strong {
  display: inline;
  font-size: 1.16rem;
  line-height: 1;
}

.rarity-score span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 850;
}

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

.card-stats span {
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.card-stats small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.6rem;
  font-weight: 850;
  text-transform: uppercase;
}

.card-stats strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.card-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.64rem;
  font-weight: 800;
}

.card-footer span:last-child {
  color: var(--card-spark);
}

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

.card-actions button {
  min-height: 44px;
  white-space: normal;
}

.mission-strip {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.mission-strip article {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
}

.mission-strip span {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--sun);
  display: grid;
  place-items: center;
  color: #2e2311;
  font-size: 0.76rem;
  font-weight: 900;
}

.mission-strip p {
  margin: 0;
  color: var(--deep);
  font-weight: 750;
}

.locked-strip {
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(217, 107, 95, 0.26);
  border-radius: 16px;
  background: #fff4f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.locked-strip strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

.locked-strip[hidden] {
  display: none;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin-bottom: 0;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--deep);
  padding: 0 12px;
  font-weight: 750;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.collection-grid.is-muted,
.leaderboard.is-muted {
  opacity: 0.62;
  filter: grayscale(0.45);
}

.collection-card {
  overflow: hidden;
}

.collection-card--premium {
  border-color: rgba(244, 207, 121, 0.5);
  background:
    radial-gradient(circle at 84% 0%, color-mix(in srgb, var(--card-spark) 24%, transparent), transparent 33%),
    linear-gradient(150deg, #10251f, #1d3c33 55%, #111917);
  color: #fff;
  box-shadow: 0 16px 30px rgba(16, 40, 32, 0.18);
}

.mini-card-media {
  height: 142px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-accent), #f7edd3);
}

.mini-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.38));
}

.mini-card-media span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(17, 25, 23, 0.82);
  color: #fff7df;
  font-size: 0.68rem;
  font-weight: 900;
}

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

.mini-card-title h3 {
  color: #fff;
}

.mini-card-title strong {
  flex: 0 1 auto;
  color: var(--card-spark);
  font-size: 0.64rem;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.collection-card--premium .collection-body p {
  color: rgba(255, 255, 255, 0.66);
}

.collection-card--premium .chip {
  background: rgba(255, 255, 255, 0.12);
  color: #fff7df;
}

.map-privacy-card {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.map-privacy-card p {
  margin: 4px 0 0;
  font-size: 0.8rem;
}

.sighting-map {
  height: 270px;
  border: 1px solid rgba(39, 103, 73, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 64% 28%, rgba(241, 182, 75, 0.3), transparent 20%),
    linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(135deg, #74b6c2 0%, #87b66d 54%, #e2bb72 100%);
  background-size: auto, 34px 34px, 34px 34px, cover;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 -50px 80px rgba(16, 40, 32, 0.16);
}

.sighting-map.is-muted {
  opacity: 0.64;
  filter: grayscale(0.35);
}

.sighting-map::before {
  content: "";
  position: absolute;
  inset: 34px -20px auto;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(-9deg);
}

.map-rings {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  opacity: 0.6;
}

.map-rings::before,
.map-rings::after {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: inherit;
}

.map-rings::after {
  inset: 68px;
}

.map-label {
  position: absolute;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--deep);
  font-size: 0.66rem;
  font-weight: 900;
}

.map-label-one {
  left: 10%;
  top: 18%;
}

.map-label-two {
  right: 9%;
  top: 28%;
}

.map-label-three {
  left: 43%;
  bottom: 10%;
}

.map-marker {
  --marker-color: var(--coral);
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 22px;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 999px 999px 999px 4px;
  background: var(--marker-color);
  box-shadow:
    0 10px 18px rgba(16, 40, 32, 0.24),
    0 0 0 9px color-mix(in srgb, var(--marker-color) 24%, transparent);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-marker span {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
}

.map-marker.is-private {
  opacity: 0.46;
  filter: grayscale(0.4);
}

.map-marker.is-latest {
  width: 28px;
  z-index: 2;
}

.map-marker.is-pulsing {
  animation: markerPulse 900ms ease-out;
}

.map-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.map-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
}

.map-dot {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--dot-color, var(--leaf));
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.36);
}

.map-row h3,
.map-row p {
  margin: 0;
}

.map-row p {
  font-size: 0.78rem;
}

.map-row strong {
  color: var(--leaf);
  font-size: 0.76rem;
  white-space: nowrap;
}

.species-art {
  height: 118px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--leaf-soft));
}

.species-art::before,
.species-art::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.species-art::before {
  width: 86px;
  height: 54px;
  left: 30px;
  top: 38px;
  background: var(--bird-body, #d96b5f);
  transform: rotate(-8deg);
  box-shadow: 46px 0 0 -18px var(--bird-head, #213c34);
}

.species-art::after {
  width: 28px;
  height: 10px;
  left: 98px;
  top: 48px;
  background: var(--bird-beak, #f1b64b);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  border-radius: 0;
}

.species-art .wing {
  position: absolute;
  width: 48px;
  height: 32px;
  left: 47px;
  top: 47px;
  border-radius: 999px 999px 8px 999px;
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(-16deg);
}

.species-art .branch {
  position: absolute;
  width: 130px;
  height: 8px;
  left: 12px;
  bottom: 18px;
  border-radius: 999px;
  background: rgba(33, 60, 52, 0.78);
}

.collection-body {
  padding: 12px;
}

.collection-body h3 {
  margin-bottom: 3px;
}

.collection-body p {
  margin-bottom: 9px;
  font-size: 0.8rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f7f2;
  color: var(--deep);
  font-size: 0.68rem;
  font-weight: 850;
}

.league-map {
  height: 150px;
  margin-bottom: 16px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(135deg, #74b6c2, #87b66d 52%, #e2bb72);
  background-size: 34px 34px, 34px 34px, cover;
  position: relative;
  overflow: hidden;
}

.league-map p {
  position: absolute;
  left: 14px;
  bottom: 10px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 850;
}

.map-pulse {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 0 0 8px rgba(217, 107, 95, 0.22);
}

.pulse-one {
  left: 62%;
  top: 26%;
}

.pulse-two {
  left: 31%;
  top: 56%;
  background: var(--leaf);
  box-shadow: 0 0 0 8px rgba(39, 103, 73, 0.22);
}

.pulse-three {
  left: 74%;
  top: 66%;
  background: var(--sun);
  box-shadow: 0 0 0 8px rgba(241, 182, 75, 0.24);
}

.leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.leaderboard li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
}

.rank {
  width: 34px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f3f7f2;
  color: var(--deep);
  font-weight: 900;
}

.leaderboard h3,
.leaderboard p {
  margin: 0;
}

.leaderboard p {
  font-size: 0.8rem;
}

.leaderboard strong {
  color: var(--leaf);
}

.leaderboard .me {
  border-color: rgba(39, 103, 73, 0.44);
  background: var(--leaf-soft);
}

.pricing-header {
  padding: 16px 0 4px;
}

.pricing-header p:last-child {
  margin-bottom: 0;
}

.account-card {
  margin: 12px 0 14px;
  display: grid;
  gap: 12px;
}

.account-copy h3,
.account-copy p {
  margin-bottom: 4px;
}

.account-form {
  display: grid;
  gap: 8px;
}

.account-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--deep);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 750;
}

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

.account-form small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.account-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@keyframes markerPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-45deg) scale(1);
  }

  45% {
    transform: translate(-50%, -50%) rotate(-45deg) scale(1.22);
  }
}

.plans {
  display: grid;
  gap: 12px;
}

.monetization-controls {
  margin: 14px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.monetization-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.billing-toggle {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.billing-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 850;
}

.billing-toggle button.is-active {
  background: var(--leaf);
  color: #fff;
}

.revenue-note {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--leaf-soft);
  display: grid;
  gap: 3px;
}

.revenue-note strong {
  color: var(--deep);
  font-size: 0.88rem;
}

.revenue-note span,
.legal-copy,
.product-id {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.plan-card {
  padding: 16px;
  position: relative;
}

.plan-card h3 {
  margin-bottom: 4px;
}

.plan-card .price {
  margin-bottom: 12px;
  color: var(--deep);
  font-size: 1.34rem;
  font-weight: 900;
}

.plan-card .price small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.saving {
  width: fit-content;
  margin: -4px 0 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff7df;
  color: #6a4b0f;
  font-size: 0.72rem;
  font-weight: 900;
}

.plan-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.plan-card.is-featured {
  border-color: rgba(39, 103, 73, 0.52);
  box-shadow: 0 18px 34px rgba(39, 103, 73, 0.12);
}

.badge {
  position: absolute;
  right: 14px;
  top: 14px;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--sun);
  color: #33250e;
  font-size: 0.68rem;
  font-weight: 900;
}

.product-id {
  margin: 10px 0 0;
  word-break: break-word;
}

.store-actions {
  margin: 12px 0 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.legal-copy {
  margin-bottom: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(92vw, 370px);
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--deep);
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 10;
}

@media (min-width: 840px) {
  .app-shell {
    align-items: center;
  }

  .phone {
    width: 820px;
    height: min(720px, calc(100vh - 56px));
    min-height: 650px;
    display: grid;
    grid-template-columns: 390px 1fr;
    grid-template-rows: auto auto 1fr;
  }

  .topbar,
  .hero-panel,
  .tabbar {
    grid-column: 1;
  }

  .view {
    grid-column: 2;
    grid-row: 1 / 4;
    padding: 24px;
    border-left: 1px solid var(--line);
  }

  .hero-panel {
    align-self: start;
  }

  .tabbar {
    align-self: start;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 0;
  }

  .phone {
    min-height: 100vh;
    border-radius: 0;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 82px;
  }

  .collection-grid,
  .trait-grid,
  .action-row,
  .card-actions,
  .account-actions,
  .map-privacy-card,
  .monetization-controls,
  .store-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    flex-direction: column-reverse;
  }

  .brand-mark {
    width: 48px;
    border-radius: 16px;
  }

  .bird-trading-card {
    padding: 12px;
    border-radius: 22px;
  }

  .card-stats {
    gap: 5px;
  }

  .card-stats span {
    padding: 7px 6px;
  }

  .switch-row,
  .select-inline {
    align-items: flex-start;
  }

  .select-inline {
    flex-direction: column;
  }

  .select-inline select {
    width: 100%;
  }

  .sighting-map {
    height: 238px;
  }
}
