﻿/* —— Flappy Plane overlay —— */
.flappy-overlay {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 12px;
  background: rgba(14, 18, 14, 0.55);
  backdrop-filter: blur(6px);
}
.flappy-overlay[hidden] {
  display: none !important;
}
.flappy-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  height: min(720px, calc(100vh - 24px));
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg, #f4f1ea);
  border: 1px solid rgba(15, 61, 31, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.flappy-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid rgba(15, 61, 31, 0.1);
  background: rgba(255, 255, 255, 0.72);
  min-height: 44px;
  white-space: nowrap;
}
.flappy-bar-end {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}
.flappy-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  min-width: 0;
  justify-self: start;
}
.flappy-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.flappy-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg, #141413);
}
.flappy-scores {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-self: center;
  gap: 14px;
  margin: 0;
  font-size: 13px;
  color: var(--fg-2, #5c5c56);
}
.flappy-scores strong {
  color: var(--fg, #141413);
  font-variant-numeric: tabular-nums;
}
.flappy-collect {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg-2, #5c5c56);
  font: inherit;
  font-size: 13px;
  cursor: default;
  appearance: none;
  -webkit-appearance: none;
}
.flappy-collect strong {
  color: var(--fg, #141413);
  font-variant-numeric: tabular-nums;
}
.flappy-chips {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  pointer-events: auto;
}
.flappy-chip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  opacity: 0.38;
  text-decoration: none;
  color: inherit;
  filter:
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.85))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.flappy-chip.is-on {
  opacity: 1;
  filter:
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.95))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.32));
}
.flappy-chip:hover,
.flappy-chip:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  outline: none;
}
.flappy-chip img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  background: transparent !important;
}
.flappy-chip-tip {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(calc(-50% + var(--chip-tip-shift, 0px)));
  max-width: min(220px, calc(100vw - 24px));
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(20, 20, 19, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 5;
}
.flappy-chip:hover .flappy-chip-tip,
.flappy-chip:focus-visible .flappy-chip-tip,
.flappy-chip.is-tip .flappy-chip-tip {
  opacity: 1;
}
.flappy-close {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--fg, #141413);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  flex: none;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.flappy-close svg {
  display: block;
  width: 20px;
  height: 20px;
  transition: transform 0.16s ease;
}
.flappy-close:hover,
.flappy-close:focus-visible {
  background: #e8f5d4;
  color: var(--green-dark, #0f3d1f);
  box-shadow: 0 4px 14px rgba(15, 61, 31, 0.22);
  transform: scale(1.08);
  outline: none;
}
.flappy-close:hover svg,
.flappy-close:focus-visible svg {
  transform: rotate(90deg);
}
.flappy-close:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(15, 61, 31, 0.18);
}
body.flappy-page {
  margin: 0;
  min-height: 100vh;
  background: #0e120e;
}
body.flappy-page .flappy-overlay {
  padding: 0;
  background: #0e120e;
  backdrop-filter: none;
}
body.flappy-page .flappy-shell {
  width: 100%;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
@media (max-width: 720px) {
  .flappy-overlay {
    padding: 0;
    align-items: stretch;
  }
  .flappy-shell {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: 0;
  }
  .flappy-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 10px;
    min-height: 40px;
  }
  .flappy-kicker { display: none; }
  .flappy-brand {
    flex: 1 1 auto;
    min-width: 0;
    justify-self: unset;
  }
  .flappy-title { font-size: 0.88rem; }
  /* Scores sit right, immediately left of the X */
  .flappy-scores {
    order: 2;
    flex: 0 0 auto;
    justify-self: unset;
    margin-left: auto;
    gap: 6px;
    font-size: 11px;
  }
  .flappy-bar-end {
    order: 3;
    flex: 0 0 auto;
    justify-self: unset;
    gap: 0;
  }
  /* Ícones leaves the top bar on mobile — lives on game-over instead */
  .flappy-bar .flappy-collect {
    display: none;
  }
  .flappy-over-collect {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(14, 18, 14, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-shadow: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  }
  .flappy-over-collect[aria-expanded="true"] {
    background: rgba(40, 72, 22, 0.95);
    border-color: rgba(198, 232, 74, 0.85);
  }
  .flappy-collect {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(15, 61, 31, 0.08);
    font-weight: 600;
    font-size: 11px;
  }
  .flappy-collect[aria-expanded="true"] {
    background: rgba(122, 181, 29, 0.22);
  }
  .flappy-chips {
    display: none;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    z-index: 5;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    background: transparent;
    justify-content: center;
  }
  .flappy-chips.is-open {
    display: flex;
  }
  .flappy-chip {
    width: 44px;
  }
  .flappy-chip img {
    width: 44px;
    height: 44px;
  }
  .flappy-close {
    width: 36px;
    height: 36px;
  }
  .flappy-close svg {
    width: 20px;
    height: 20px;
  }
  .flappy-ready {
    top: 42%;
    width: min(260px, 92vw);
  }
  .flappy-howto {
    width: min(200px, 78vw);
    padding: 12px 12px 24px;
    border-radius: 14px;
  }
  .flappy-howto-title {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }
  .flappy-howto-fly {
    margin: 0 0 6px;
    font-size: 12px;
  }
  .flappy-howto-controls {
    gap: 10px;
    margin: 0 0 8px;
  }
  .flappy-howto-ctl {
    gap: 4px;
    min-width: 56px;
    font-size: 11px;
  }
  .flappy-howto-ico {
    width: 56px;
    height: 42px;
    padding: 6px;
    border-radius: 9px;
  }
  .flappy-howto-tips {
    margin: 0 0 10px;
    padding: 0 0 8px;
    font-size: 11px;
    line-height: 1.35;
  }
  .flappy-howto-tips li + li {
    margin-top: 3px;
  }
  .flappy-hint {
    margin-top: -18px;
    width: min(280px, 88vw);
    min-width: min(280px, 88vw);
    padding: 11px 22px 9px;
  }
  .flappy-hint-main {
    font-size: 15px;
  }
  .flappy-hint-sub {
    font-size: 11px;
  }
  .flappy-howto-chars {
    margin-top: 22px;
    width: min(280px, 88vw);
    max-width: min(280px, 88vw);
    height: 124px;
    min-height: 124px;
    max-height: 124px;
  }
  .flappy-char-picker {
    height: 96px;
    min-height: 96px;
    max-height: 96px;
    flex-basis: 96px;
  }
  .flappy-char-pill {
    width: 88px;
    height: 88px;
    min-height: 88px;
    max-height: 88px;
  }
  .flappy-char-edit {
    transform: translateX(22px);
  }
  .flappy-howto-chars.is-picking .flappy-char-edit {
    transform: translateX(calc(min(140px, 44vw) - 14px));
  }
  .flappy-char-change {
    font-size: 14px;
  }
  .flappy-char-media {
    width: 44px;
    height: 34px;
  }
  .flappy-char img {
    max-width: 44px;
    max-height: 34px;
  }
  .flappy-char-change {
    font-size: 15px;
  }
  .flappy-over {
    gap: 6px;
    padding: 18px 16px;
  }
  .flappy-over-title {
    font-size: 1.35rem;
  }
  .flappy-over-score {
    margin: 0 0 4px;
    font-size: 0.95rem;
  }
}
.flappy-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #e8f2df;
}
.flappy-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.flappy-ready {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(280px, 88vw);
  pointer-events: none;
  opacity: 0;
}
.flappy-ready[hidden] {
  display: none !important;
}
.flappy-ready.is-in {
  animation: flappy-ready-in 0.28s ease both;
}
.flappy-howto {
  position: relative;
  box-sizing: border-box;
  width: min(236px, 72vw);
  margin: 0;
  padding: 16px 14px 28px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(10, 14, 10, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #f4f7f0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.flappy-howto[hidden] {
  display: none !important;
}
.flappy-howto-title {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c6e84a;
}
.flappy-howto-fly {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}
.flappy-howto-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 0 12px;
}
.flappy-howto-ctl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 64px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}
.flappy-howto-ico {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 64px;
  height: 48px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #c6e84a;
}
.flappy-howto-ico svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.flappy-howto-tips {
  margin: 0 0 12px;
  padding: 0 0 10px;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: rgba(244, 247, 240, 0.92);
}
.flappy-howto-tips li + li {
  margin-top: 4px;
}
.flappy-howto-traffic {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 78px;
}
.flappy-howto-traf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 72px;
  min-height: 68px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: center;
}
.flappy-howto-traf-img {
  display: block;
  box-sizing: border-box;
  width: 56px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.flappy-howto-traf-bad .flappy-howto-traf-img {
  width: 56px;
  height: 40px;
  filter: brightness(0) saturate(100%) invert(42%) sepia(62%) saturate(1800%) hue-rotate(338deg) brightness(1.05);
}
.flappy-howto-traf-ok .flappy-howto-traf-img {
  width: 44px;
  height: 32px;
  opacity: 0.92;
  filter: brightness(0) saturate(100%) invert(72%) sepia(48%) saturate(520%) hue-rotate(42deg) brightness(1.05);
}
.flappy-howto-traffic.is-plane .flappy-howto-traf-bad .flappy-howto-traf-img,
.flappy-howto-traffic.is-plane .flappy-howto-traf-ok .flappy-howto-traf-img {
  transform: scaleX(-1);
}
.flappy-howto-traffic.is-brain .flappy-howto-traf-bad .flappy-howto-traf-img,
.flappy-howto-traffic.is-brain .flappy-howto-traf-ok .flappy-howto-traf-img {
  transform: scaleX(-1) rotate(16deg);
}
.flappy-howto-traf-bad {
  color: #ffc9b8;
}
.flappy-howto-traf-ok {
  color: #d4f0a8;
}
.flappy-howto-touch { display: none; }
@media (hover: none), (max-width: 720px) {
  .flappy-howto-desk { display: none; }
  .flappy-howto-touch { display: flex; }
}
@keyframes flappy-ready-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.flappy-hint {
  position: relative;
  z-index: 4;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: -20px 0 0;
  width: min(280px, 88vw);
  min-width: min(280px, 88vw);
  padding: 12px 28px 10px;
  border-radius: 999px;
  border: 2px solid #c6e84a;
  background: #c6e84a;
  color: #141413;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}
.flappy-hint-main {
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.flappy-hint-sub {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(20, 20, 19, 0.72);
}
.flappy-hint:hover,
.flappy-hint:focus-visible {
  background: #d4f05a;
  border-color: #d4f05a;
  outline: none;
}
.flappy-hint[hidden] {
  display: none !important;
}
.flappy-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(14, 18, 14, 0.45);
  color: #fff;
  text-align: center;
  padding: 24px;
}
.flappy-over[hidden] {
  display: none !important;
}
.flappy-over-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.flappy-over-score {
  margin: 0 0 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.flappy-over-collect {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 10px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(14, 18, 14, 0.92);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.flappy-over-collect:hover,
.flappy-over-collect:focus-visible {
  background: rgba(40, 72, 22, 0.95);
  border-color: rgba(198, 232, 74, 0.85);
  outline: none;
}
.flappy-over-collect strong {
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.flappy-again {
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--green-dark, #1f5c2e);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.flappy-again:hover,
.flappy-again:focus-visible {
  background: var(--green-deep, #0f3d1f);
  outline: none;
}
body.flappy-open .erasmus-plane {
  visibility: hidden !important;
  pointer-events: none !important;
}
[data-theme="dark"] .flappy-chip {
  background: transparent;
  border: 0;
}
@media (max-width: 720px) {
  [data-theme="dark"] .flappy-collect {
    background: rgba(255, 255, 255, 0.08);
  }
  [data-theme="dark"] .flappy-collect[aria-expanded="true"] {
    background: rgba(122, 181, 29, 0.28);
  }
  [data-theme="dark"] .flappy-chips {
    background: transparent;
    border: 0;
  }
}
[data-theme="dark"] .flappy-shell {
  background: #141814;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .flappy-bar {
  background: rgba(28, 34, 28, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .flappy-title,
[data-theme="dark"] .flappy-scores strong,
[data-theme="dark"] .flappy-collect strong {
  color: #f2f4f0;
}
[data-theme="dark"] .flappy-scores,
[data-theme="dark"] .flappy-collect {
  color: rgba(242, 244, 240, 0.72);
}
[data-theme="dark"] .flappy-kicker {
  color: var(--green-light, #b8e986);
}
[data-theme="dark"] .flappy-stage {
  background: #1a2218;
}
[data-theme="dark"] .flappy-close {
  background: rgba(28, 34, 28, 0.92);
  color: #f2f4f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .flappy-close:hover,
[data-theme="dark"] .flappy-close:focus-visible {
  background: rgba(122, 181, 29, 0.28);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

/* Character select under the start CTA; change control is quiet and below */
.flappy-howto-chars {
  position: relative;
  margin-top: 28px;
  box-sizing: border-box;
  width: min(280px, 88vw);
  max-width: min(280px, 88vw);
  height: 134px;
  min-height: 134px;
  max-height: 134px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  font-family: inherit;
  border-radius: 28px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.flappy-howto-chars::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42px;
  z-index: 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  background: radial-gradient(
    circle,
    rgba(198, 232, 74, 0.55) 0%,
    rgba(122, 181, 29, 0.28) 42%,
    rgba(122, 181, 29, 0) 72%
  );
  box-shadow: 0 0 0 0 rgba(198, 232, 74, 0);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}
.flappy-howto-chars:hover::before,
.flappy-howto-chars:focus-within::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 28px 6px rgba(198, 232, 74, 0.35);
}
.flappy-howto-chars:hover,
.flappy-howto-chars:focus-within {
  transform: translateY(-2px);
}
.flappy-howto-chars > * {
  position: relative;
  z-index: 1;
}
.flappy-howto-chars .flappy-char-picker {
  order: 1;
  flex: 0 0 auto;
}
.flappy-howto-chars .flappy-char-change {
  order: 2;
  margin-top: auto;
  align-self: center;
}
/* Light: black fill + white outline. Dark: white fill + black outline */
.flappy-char-label-outline {
  color: #141413;
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0 0 3px rgba(255, 255, 255, 0.95);
}
[data-theme="dark"] .flappy-char-label-outline {
  color: #fff;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000,
     0 0 3px rgba(0, 0, 0, 0.9);
}
.flappy-char-change {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #141413;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: none;
  transition: color 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0 0 3px rgba(255, 255, 255, 0.95);
}
.flappy-char-change:hover,
.flappy-char-change:focus-visible {
  color: #1f5c2e;
  text-decoration: none;
  background: transparent;
  outline: none;
  transform: scale(1.04);
}
.flappy-howto-chars:hover .flappy-char-pill:not(.is-open),
.flappy-howto-chars:focus-within .flappy-char-pill:not(.is-open) {
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(198, 232, 74, 0.55);
  transform: scale(1.04);
}
[data-theme="dark"] .flappy-char-change {
  color: #fff;
  text-decoration: none;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000,
     0 0 3px rgba(0, 0, 0, 0.9);
}
[data-theme="dark"] .flappy-char-change:hover,
[data-theme="dark"] .flappy-char-change:focus-visible {
  color: #fff;
  text-decoration: none;
}
.flappy-char-picker {
  position: relative;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 104px;
  min-height: 104px;
  max-height: 104px;
  flex: 0 0 104px;
}
/* Closed: black ball + white outline. Open: white pill (outline expands). */
.flappy-char-pill {
  position: relative;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 96px;
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  margin: 0 auto;
  padding: 0;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #141413;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition:
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    padding 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.22s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.flappy-char-pill.is-open {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  padding: 0;
  background: #fff;
  border-color: #fff;
}
.flappy-char-knob {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #141413;
  box-shadow: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.28s ease,
    left 0.28s ease,
    height 0.28s ease,
    box-shadow 0.28s ease;
  pointer-events: none;
}
.flappy-char-pill.is-open .flappy-char-knob {
  top: 0;
  left: 0;
  width: calc(100% / 3);
  height: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.flappy-char-pill.is-open[data-selected="0"] .flappy-char-knob {
  transform: translateX(0);
}
.flappy-char-pill.is-open[data-selected="1"] .flappy-char-knob {
  transform: translateX(100%);
}
.flappy-char-pill.is-open[data-selected="2"] .flappy-char-knob {
  transform: translateX(200%);
}
.flappy-char-pill:not(.is-open) .flappy-char-knob {
  transform: none !important;
}
.flappy-char {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f4f7f0;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  box-shadow: none;
  text-shadow: none;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.flappy-char-pill:not(.is-open) .flappy-char.is-on {
  opacity: 1;
  pointer-events: auto;
}
.flappy-char-pill:not(.is-open) .flappy-char:not(.is-on) {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.flappy-char-pill.is-open .flappy-char {
  opacity: 1;
  color: #141413;
}
.flappy-char-pill.is-open .flappy-char.is-on {
  color: #f4f7f0;
}
.flappy-char-pill.is-open .flappy-char:not(.is-on):hover,
.flappy-char-pill.is-open .flappy-char:not(.is-on):focus-visible {
  color: #141413;
  outline: none;
}
.flappy-char-edit {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid #fff;
  background: #c6e84a;
  color: #141413;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(26px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.flappy-howto-chars.is-picking .flappy-char-edit {
  transform: translateX(calc(min(140px, 44vw) - 14px));
  opacity: 0.92;
}
.flappy-char-edit:hover,
.flappy-char-edit:focus-visible {
  background: #d4f05a;
  outline: none;
}
.flappy-char-edit svg {
  display: block;
  pointer-events: none;
}
.flappy-char-media {
  display: grid;
  place-items: center;
  width: 52px;
  height: 40px;
  flex: 0 0 auto;
  overflow: visible;
}
.flappy-char-name {
  display: block;
  max-width: 100%;
  min-height: 1.15em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.flappy-char img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 52px;
  max-height: 40px;
  object-fit: contain;
  pointer-events: none;
  /* Same edge read as in-game sprites */
  filter:
    drop-shadow(1px 0 0 rgba(0, 0, 0, 0.72))
    drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.72))
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.72))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.72))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.flappy-char-pill.is-open .flappy-char.is-on img {
  filter:
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.35))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.35))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.35))
    drop-shadow(1px 0 0 rgba(0, 0, 0, 0.55))
    drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.flappy-char.is-on,
.flappy-char:hover,
.flappy-char:focus-visible {
  outline: none;
}
