:root {
  color-scheme: dark;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --ink: #f7fbff;
  --line: rgba(255,255,255,0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(69,196,181,0.2), transparent 30%),
    radial-gradient(circle at 82% 76%, rgba(255,186,75,0.18), transparent 35%),
    linear-gradient(155deg, #07131c, #0b2430 54%, #071018);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* Keep the bird's doorway free of the private server's workshop controller. */
body > .conner,
body > .conner__overlay {
  display: none !important;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.46) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(146,242,211,0.34) 0 1.5px, transparent 2px);
  background-size: 64px 64px, 91px 91px;
  background-position: 8px 12px, 31px 48px;
}

.bird-topbar {
  position: relative;
  z-index: 3;
  min-height: calc(64px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) calc(12px + var(--safe-right)) 8px calc(14px + var(--safe-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(3,10,17,0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

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

.bird-brand strong,
.bird-brand small {
  display: block;
}

.bird-brand strong {
  font-size: clamp(1.02rem, 4vw, 1.32rem);
}

.bird-brand small {
  margin-top: 1px;
  color: rgba(222,235,246,0.62);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bird-feather {
  position: relative;
  width: 30px;
  height: 43px;
  display: block;
  border-radius: 80% 12% 70% 16%;
  transform: rotate(36deg);
  background: linear-gradient(145deg, #e8ff8b, #50d8b3 55%, #58aef2);
  box-shadow: 0 0 22px rgba(80,216,179,0.3);
}

.bird-feather::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 35px;
  left: 14px;
  top: 5px;
  background: rgba(5,26,35,0.6);
  transform: rotate(-3deg);
}

.caregiver-exit {
  min-width: 78px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  color: rgba(241,247,255,0.78);
  font-size: 0.75rem;
  text-decoration: none;
}

.caregiver-exit > span:first-child {
  font-size: 1rem;
}

.bird-main {
  position: relative;
  z-index: 1;
  height: calc(100dvh - 64px - var(--safe-top));
  padding: clamp(8px, 2vh, 18px) calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.7vh, 16px);
}

.bird-watchers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.6vw, 14px);
}

.bird-watch {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 11px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}

.bird-watch > span {
  grid-row: 1 / 3;
  align-self: center;
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.bird-watch strong {
  overflow: hidden;
  font-size: clamp(0.9rem, 2.4vw, 1.15rem);
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bird-watch small {
  overflow: hidden;
  color: rgba(240,248,255,0.7);
  font-size: clamp(0.62rem, 1.8vw, 0.78rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bird-watch-widget {
  border-color: rgba(114,255,171,0.4);
  background: linear-gradient(150deg, rgba(21,74,54,0.92), rgba(12,35,43,0.94));
}

.bird-watch-parrot {
  border-color: rgba(255,190,92,0.42);
  background: linear-gradient(150deg, rgba(70,42,22,0.94), rgba(36,31,70,0.94));
}

.bird-watch:focus-visible {
  outline: 4px solid #fff;
  outline-offset: -5px;
}

.bird-watch:active {
  transform: scale(0.97);
  filter: brightness(1.14);
}

.bird-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.bird-intro p {
  font-size: clamp(1.04rem, 4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.choice-dots {
  display: flex;
  gap: 5px;
}

.choice-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #72e3c2;
  box-shadow: 0 0 12px rgba(114,227,194,0.7);
}

.choice-dots span:nth-child(2) { background: #e3f36e; }
.choice-dots span:nth-child(3) { background: #ffc268; }

.bird-launchers {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(9px, 2vw, 18px);
}

.bird-launch {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  padding: clamp(8px, 1.6vw, 18px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: clamp(25px, 4vw, 42px);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 20px 46px rgba(0,0,0,0.3);
  isolation: isolate;
}

.bird-launch::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03));
}

.bird-launch::after {
  content: '';
  position: absolute;
  width: 75%;
  aspect-ratio: 1;
  left: 12%;
  top: 5%;
  z-index: -1;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.7;
}

.bird-launch-widget {
  background: linear-gradient(155deg, #123a2d, #102730);
  border-color: rgba(114,255,171,0.5);
}
.bird-launch-widget::after { background: radial-gradient(circle, rgba(91,255,173,0.44), transparent 68%); }

.bird-launch-buddy {
  background: linear-gradient(155deg, #3c4312, #153025);
  border-color: rgba(229,250,98,0.56);
}
.bird-launch-buddy::after { background: radial-gradient(circle, rgba(229,250,98,0.42), transparent 68%); }

.bird-launch-arcade {
  background: linear-gradient(155deg, #3d2617, #242046);
  border-color: rgba(255,190,92,0.58);
}
.bird-launch-arcade::after { background: radial-gradient(circle, rgba(255,142,77,0.42), transparent 68%); }

.companion-window,
.arcade-art {
  width: min(100%, 250px);
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.companion-window img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,0.32));
  pointer-events: none;
}

.buddy-bird-art {
  display: block;
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 1;
  filter:
    drop-shadow(0 18px 18px rgba(0,0,0,0.32))
    drop-shadow(0 0 24px rgba(229,250,98,0.22));
}

.launch-copy {
  position: relative;
  z-index: 2;
  display: block;
  padding: 5px 2px 2px;
}

.launch-copy strong,
.launch-copy small {
  display: block;
}

.launch-copy strong {
  font-size: clamp(1.18rem, 3.8vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0.06em;
}

.launch-copy small {
  margin-top: 5px;
  color: rgba(240,248,255,0.75);
  font-size: clamp(0.7rem, 2vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.peck-ring {
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: inherit;
  pointer-events: none;
}

.arcade-art {
  position: relative;
}

.arcade-bubble {
  position: absolute;
  display: block;
  border-radius: 50%;
  box-shadow: inset -8px -10px 18px rgba(0,0,0,0.18), 0 10px 28px rgba(0,0,0,0.28);
}

.bubble-one {
  width: min(46%, 120px);
  aspect-ratio: 1;
  left: 11%;
  top: 16%;
  background: radial-gradient(circle at 34% 27%, #fff 0 5%, #ffea6b 8%, #ff7b55 68%, #ca3a62);
}

.bubble-two {
  width: min(35%, 92px);
  aspect-ratio: 1;
  right: 11%;
  top: 9%;
  background: radial-gradient(circle at 34% 27%, #fff 0 5%, #93f5ff 8%, #4b98ff 68%, #6048c8);
}

.bubble-three {
  width: min(30%, 78px);
  aspect-ratio: 1;
  right: 26%;
  bottom: 12%;
  background: radial-gradient(circle at 34% 27%, #fff 0 5%, #dfff78 8%, #42d18f 68%, #168881);
}

.arcade-star {
  position: absolute;
  left: 42%;
  top: 43%;
  width: 52px;
  height: 52px;
  transform: rotate(45deg);
  border-radius: 14px 3px 14px 3px;
  background: #fff7c8;
  box-shadow: 0 0 28px rgba(255,247,200,0.72);
}

.bird-launch:focus-visible {
  outline: 5px solid #fff;
  outline-offset: -7px;
}

.bird-launch:active {
  transform: scale(0.965);
  filter: brightness(1.15);
}

@media (orientation: portrait) {
  .bird-launchers {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .bird-launch {
    grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
    grid-template-rows: 1fr;
    text-align: left;
  }

  .companion-window,
  .arcade-art {
    width: 100%;
    max-width: 170px;
  }

  .launch-copy {
    justify-self: start;
  }

  .launch-copy strong {
    font-size: clamp(1.5rem, 8vw, 2.65rem);
  }
}

@media (max-height: 650px) and (orientation: portrait) {
  .bird-main { gap: 7px; padding-top: 6px; }
  .bird-intro p { font-size: 0.95rem; }
  .bird-launchers { gap: 7px; }
  .bird-launch { border-radius: 22px; padding: 6px; }
  .launch-copy small { margin-top: 2px; }
  .bird-watch { min-height: 56px; padding-block: 6px; }
}

@media (max-width: 430px) {
  .bird-watch {
    column-gap: 8px;
    padding-inline: 10px;
  }

  .bird-watch strong {
    font-size: 0.78rem;
    letter-spacing: 0.015em;
  }

  .bird-watch small {
    font-size: 0.58rem;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .bird-topbar {
    min-height: calc(54px + var(--safe-top));
    padding-block: calc(4px + var(--safe-top)) 4px;
  }

  .bird-main {
    height: calc(100dvh - 54px - var(--safe-top));
    grid-template-columns: minmax(0, 1fr) minmax(220px, 28%);
    grid-template-rows: minmax(0, 1fr);
    padding-top: 8px;
  }

  .bird-intro { display: none; }
  .bird-watchers {
    grid-template-columns: 1fr;
    align-content: stretch;
  }
  .bird-watch { height: 100%; }
  .bird-launch { border-radius: 24px; padding: 7px; }
  .launch-copy strong { font-size: clamp(1rem, 3.5vw, 1.6rem); }
  .launch-copy small { margin-top: 2px; font-size: 0.64rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .bird-feather { animation: feather-float 3.4s ease-in-out infinite; }
  .choice-dots span { animation: dot-pulse 1.8s ease-in-out infinite; }
  .choice-dots span:nth-child(2) { animation-delay: 0.18s; }
  .choice-dots span:nth-child(3) { animation-delay: 0.36s; }
  .arcade-bubble { animation: bubble-drift 3.4s ease-in-out infinite; }
  .bubble-two { animation-delay: -1.1s; }
  .bubble-three { animation-delay: -2.1s; }
}

@keyframes feather-float {
  0%, 100% { transform: rotate(36deg) translateY(0); }
  50% { transform: rotate(30deg) translateY(-4px); }
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(0.75); opacity: 0.56; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes bubble-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -8px, 0) scale(1.04); }
}

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

/* --------------------------------------------------------------------------
   Bird Home 2.0 — warm, icon-led launcher and shared caregiver navigation
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;
  --bird-paper: #fff9e9;
  --bird-page: #f4ecd9;
  --bird-ink: #3b3127;
  --bird-muted: #746856;
  --bird-gold: #d7ae57;
  --bird-green: #4f7651;
  --bird-mint: #dff4e8;
  --bird-line: rgba(168, 125, 45, .34);
  --bird-header-h: 66px;
  --bird-dock-h: 78px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html,
body {
  background: var(--bird-page);
}

body {
  isolation: isolate;
  color: var(--bird-ink);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--bird-page);
}

body::before {
  z-index: -1;
  opacity: .16;
  background-image:
    radial-gradient(circle, rgba(105, 129, 85, .42) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(202, 157, 69, .34) 0 1.2px, transparent 1.8px);
  background-size: 72px 72px, 103px 103px;
}

.ambient-backdrop,
.scene-wash {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ambient-backdrop {
  z-index: -3;
  object-fit: cover;
  opacity: .17;
  filter: saturate(.72) sepia(.12) brightness(1.12);
}

.scene-wash {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 249, 233, .84), rgba(244, 236, 217, .82)),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .76), transparent 34%);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: .65rem .85rem;
  border-radius: 12px;
  color: var(--bird-paper);
  background: #173e3c;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

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

.bird-topbar[hidden],
.bird-intro[hidden] {
  display: none !important;
}

.bird-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: calc(var(--bird-header-h) + var(--safe-top));
  padding: calc(7px + var(--safe-top)) calc(10px + var(--safe-right)) 7px calc(10px + var(--safe-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--bird-line);
  background: rgba(255, 249, 233, .91);
  box-shadow: 0 8px 22px rgba(77, 58, 29, .10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.bird-brand > img {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(190, 145, 55, .45);
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(77, 58, 29, .12);
}

.bird-brand strong,
.bird-brand small { display: block; }

.bird-brand strong {
  overflow: hidden;
  color: var(--bird-ink);
  font: 700 clamp(1rem, 4vw, 1.28rem)/1 'Fredoka', system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bird-brand small {
  margin-top: 4px;
  color: var(--bird-muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.bird-care-button {
  position: relative;
  min-width: 72px;
  min-height: 50px;
  padding: 4px 10px 4px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--bird-line);
  border-radius: 17px;
  color: var(--bird-ink);
  background: rgba(255, 253, 244, .92);
  box-shadow: 0 5px 14px rgba(77, 58, 29, .10);
  font: 800 .75rem/1 'Source Sans 3', system-ui, sans-serif;
  touch-action: manipulation;
}

.bird-care-button img {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  object-fit: cover;
}

.bird-care-button::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 3px solid transparent;
  border-radius: 20px;
  pointer-events: none;
}

.bird-care-button[data-holding='true']::after {
  border-color: #5b8d72;
  animation: caregiver-hold .825s linear both;
}

.bird-main {
  position: fixed;
  z-index: 2;
  inset: calc(var(--bird-header-h) + var(--safe-top)) 0 calc(var(--bird-dock-h) + var(--safe-bottom));
  width: min(100%, 1120px);
  height: auto;
  margin-inline: auto;
  padding: clamp(8px, 1.7vh, 15px) calc(9px + var(--safe-right)) clamp(8px, 1.5vh, 13px) calc(9px + var(--safe-left));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(7px, 1.35vh, 12px);
  transition: bottom .22s ease;
}

html[data-bird-nav-visible='false'] .bird-main {
  bottom: var(--safe-bottom);
}

.bird-launchers {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1.5vw, 13px);
}

.bird-launch {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 1.7vh, 16px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 5px;
  overflow: hidden;
  border: 2px solid rgba(171, 129, 47, .38);
  border-radius: clamp(22px, 5vw, 34px);
  color: var(--bird-ink);
  text-decoration: none;
  background: rgba(255, 249, 233, .88);
  box-shadow: 0 8px 0 rgba(119, 85, 35, .12), 0 14px 30px rgba(77, 58, 29, .12);
  transform: translateZ(0);
  touch-action: manipulation;
}

.bird-launch::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 24% 12%, rgba(255, 255, 255, .75), transparent 30%);
}

.bird-launch-widget {
  border-color: rgba(64, 119, 83, .58);
  background: linear-gradient(145deg, rgba(226, 246, 231, .96), rgba(178, 219, 190, .88));
}

.bird-launch-buddy {
  border-color: rgba(180, 156, 50, .58);
  background: linear-gradient(145deg, rgba(251, 244, 199, .96), rgba(218, 224, 151, .90));
}

.bird-launch-arcade {
  background: linear-gradient(135deg, rgba(255, 239, 197, .96), rgba(216, 234, 214, .93));
}

.bird-launch-worlds {
  border-color: rgba(77, 121, 102, .55);
  background: linear-gradient(145deg, rgba(221, 240, 226, .96), rgba(187, 216, 206, .91));
}

.companion-window,
.arcade-art,
.worlds-art {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.companion-window img {
  width: min(94%, 235px);
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(67, 48, 23, .18));
}

.arcade-art img,
.worlds-art img {
  width: min(78%, 158px);
  max-height: 94%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid rgba(255, 253, 243, .9);
  border-radius: 26%;
  box-shadow: 0 8px 18px rgba(77, 58, 29, .18);
}

.launch-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  justify-self: center;
  text-align: center;
}

.launch-copy strong,
.launch-copy small { display: block; }

.launch-copy strong {
  color: var(--bird-ink);
  font: 700 clamp(1rem, 5vw, 1.65rem)/.96 'Fredoka', system-ui, sans-serif;
  letter-spacing: .015em;
}

.bird-launch-arcade .launch-copy strong,
.bird-launch-worlds .launch-copy strong {
  font-size: clamp(.9rem, 4vw, 1.38rem);
}

.launch-copy small {
  margin-top: 3px;
  color: var(--bird-muted);
  font-size: clamp(.56rem, 2vw, .72rem);
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.peck-ring { display: none; }

.bird-launch:focus-visible,
.bird-watch:focus-visible,
.bird-dock-item:focus-visible,
.bird-care-button:focus-visible,
.bird-care-drawer button:focus-visible,
.bird-care-drawer a:focus-visible {
  outline: 4px solid #315d4c;
  outline-offset: 2px;
}

.bird-launch:active,
.bird-watch:active,
.bird-dock-item:active {
  transform: scale(.97);
  filter: saturate(1.08) brightness(.98);
}

.bird-watchers {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1.5vw, 12px);
}

.bird-watch {
  min-height: clamp(58px, 8.2vh, 74px);
  padding: 5px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  border: 1px solid var(--bird-line);
  border-radius: 19px;
  color: var(--bird-ink);
  background: rgba(255, 249, 233, .88);
  box-shadow: 0 5px 14px rgba(77, 58, 29, .10);
  text-decoration: none;
}

.bird-watch-widget,
.bird-watch-parrot {
  border-color: var(--bird-line);
  background: rgba(255, 249, 233, .88);
}

.bird-watch > .watch-art {
  grid-row: 1 / 3;
  width: clamp(44px, 11vw, 58px);
  height: clamp(44px, 11vw, 58px);
  align-self: center;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(181, 141, 62, .32);
  border-radius: 14px;
  background: var(--bird-paper);
}

.watch-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bird-watch strong {
  overflow: hidden;
  color: var(--bird-ink);
  font: 700 clamp(.75rem, 3vw, 1rem)/1 'Fredoka', system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bird-watch small {
  overflow: hidden;
  color: var(--bird-muted);
  font-size: clamp(.53rem, 1.8vw, .68rem);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bird-context-dock {
  position: fixed;
  z-index: 30;
  inset: auto 0 0;
  height: calc(var(--bird-dock-h) + var(--safe-bottom));
  padding: 6px calc(7px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(7px + var(--safe-left));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--bird-line);
  background: rgba(255, 249, 233, .94);
  box-shadow: 0 -9px 24px rgba(77, 58, 29, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bird-dock-item {
  min-width: 0;
  min-height: 0;
  padding: 3px 4px 4px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 2px;
  border: 1px solid rgba(171, 129, 47, .38);
  border-radius: 15px;
  color: var(--bird-ink);
  background: rgba(255, 253, 244, .88);
  font-size: clamp(.58rem, 2.2vw, .7rem);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
}

.bird-dock-item.is-current {
  border-color: rgba(67, 115, 75, .55);
  background: var(--bird-mint);
}

.bird-dock-item img {
  width: clamp(34px, 9.5vw, 45px);
  height: clamp(34px, 9.5vw, 45px);
  border-radius: 11px;
  object-fit: cover;
}

.bird-dock-arrow {
  position: relative;
  width: clamp(34px, 9.5vw, 45px);
  height: clamp(34px, 9.5vw, 45px);
  display: block;
  border: 1px solid rgba(171, 129, 47, .42);
  border-radius: 11px;
  background: linear-gradient(145deg, #fffdf4, #efe1bd);
}

.bird-dock-arrow::before,
.bird-dock-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
}

.bird-dock-arrow::before {
  left: 24%;
  width: 52%;
  height: 3px;
  border-radius: 3px;
  background: #4f7651;
  transform: translateY(-50%);
}

.bird-dock-arrow::after {
  width: 10px;
  height: 10px;
  border-top: 3px solid #4f7651;
  border-right: 3px solid #4f7651;
}

.bird-dock-arrow--back::after {
  left: 23%;
  transform: translateY(-50%) rotate(-135deg);
}

.bird-dock-arrow--next::after {
  right: 23%;
  transform: translateY(-50%) rotate(45deg);
}

.bird-care-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(36, 31, 24, .42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.bird-care-backdrop[hidden] { display: none; }

.bird-care-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 390px);
  padding: calc(18px + var(--safe-top)) calc(18px + var(--safe-right)) calc(22px + var(--safe-bottom)) 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  color: var(--bird-paper);
  background: linear-gradient(165deg, #173e3c, #102e31 56%, #0a2128);
  box-shadow: -18px 0 50px rgba(27, 24, 19, .26);
  transform: translateX(105%);
  transition: transform .24s ease;
}

.bird-care-drawer.is-open { transform: translateX(0); }

.bird-care-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bird-care-drawer__header small {
  display: block;
  color: #a9d6c4;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.bird-care-drawer__header h2 {
  margin-top: 3px;
  color: var(--bird-paper);
  font: 700 1.55rem/1 'Fredoka', system-ui, sans-serif;
}

.bird-care-drawer__header button {
  min-width: 60px;
  min-height: 48px;
  padding: .6rem .75rem;
  border: 1px solid rgba(255, 249, 233, .24);
  border-radius: 14px;
  color: var(--bird-paper);
  background: rgba(255, 255, 255, .08);
  font: 800 .76rem/1 'Source Sans 3', system-ui, sans-serif;
}

.bird-care-note {
  padding: .75rem .85rem;
  border: 1px solid rgba(255, 249, 233, .16);
  border-radius: 14px;
  color: #cce6dc;
  background: rgba(0, 0, 0, .12);
  font-size: .84rem;
  line-height: 1.4;
}

.bird-care-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bird-care-links a {
  min-height: 48px;
  padding: .65rem .7rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 249, 233, .20);
  border-radius: 14px;
  color: var(--bird-paper);
  background: rgba(255, 255, 255, .07);
  font-size: .78rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

body.bird-care-open { overflow: hidden; }

@keyframes caregiver-hold {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (max-width: 360px), (max-height: 650px) {
  :root {
    --bird-header-h: 58px;
    --bird-dock-h: 70px;
  }

  .bird-header { padding-block: calc(5px + var(--safe-top)) 5px; }
  .bird-brand > img { width: 42px; height: 42px; border-radius: 13px; }
  .bird-care-button { min-height: 44px; min-width: 64px; padding-right: 7px; }
  .bird-care-button img { width: 34px; height: 34px; }
  .bird-main { padding-block: 7px; gap: 7px; }
  .bird-launchers { gap: 7px; }
  .bird-launch { padding: 7px; border-radius: 20px; }
  .bird-watch { min-height: 54px; }
  .bird-watch small { display: none; }
  .bird-context-dock { gap: 4px; padding-top: 4px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  :root {
    --bird-header-h: 56px;
    --bird-dock-h: 66px;
  }

  .bird-header { padding-block: calc(4px + var(--safe-top)) 4px; }
  .bird-brand > img { width: 43px; height: 43px; }
  .bird-care-button { min-height: 44px; }
  .bird-care-button img { width: 34px; height: 34px; }
  .bird-main {
    grid-template-columns: minmax(0, 4fr) minmax(150px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
    padding-block: 7px;
  }
  .bird-launchers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }
  .bird-watchers {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .bird-watch { height: 100%; min-height: 0; }
  .bird-watch small { display: none; }
  .companion-window img { width: min(90%, 170px); }
  .arcade-art img,
  .worlds-art img { width: min(70%, 120px); }
}

@media (min-width: 900px) and (min-height: 700px) {
  .bird-main { padding-inline: 18px; }
  .bird-launchers { gap: 16px; }
  .bird-watchers { gap: 16px; }
}
