/* Add-Bird modal */
.ab-back {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,7,13,.78);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  animation: ab-fade .2s ease;
}
@keyframes ab-fade { from { opacity: 0; } to { opacity: 1; } }
.ab-modal {
  width: 100%; max-width: 560px;
  background: linear-gradient(180deg,#161a30 0%,#0c0e22 100%);
  border: 2px solid rgba(255,216,107,.4);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6),
              0 0 0 4px #1a2f7a inset,
              0 0 60px rgba(255,216,107,.18);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  animation: ab-pop .3s cubic-bezier(.2,.9,.3,1.2);
}
[data-theme="light"] .ab-modal {
  background: linear-gradient(180deg,#fff 0%,#eef2ff 100%);
  border-color: rgba(29,63,168,.5);
  box-shadow: 0 30px 80px rgba(0,0,0,.2), 0 0 0 4px #1d3fa8 inset;
}
@keyframes ab-pop { from { transform: scale(.85) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.ab-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 2px dashed rgba(255,216,107,.25);
  background: linear-gradient(135deg,rgba(255,216,107,.12),transparent);
}
.ab-hdr h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px; margin: 0; color: #FFD86B;
  text-shadow: 0 2px 0 #6b3a00, 0 0 14px rgba(255,216,107,.5);
  letter-spacing: .04em;
}
.ab-x {
  appearance: none; border: 0; cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.08); color: #fff;
  font-size: 14px;
}
.ab-x:hover { background: rgba(255,94,168,.4); }
.ab-body {
  padding: 18px 20px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.ab-dex {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px; color: var(--neon);
  letter-spacing: .04em;
  padding: 8px 12px; border-radius: 6px;
  background: rgba(125,249,255,.08);
  border: 1px solid rgba(125,249,255,.25);
  align-self: flex-start;
  text-shadow: 0 0 10px rgba(125,249,255,.5);
}
.ab-row { display: flex; flex-direction: column; gap: 6px; }
.ab-row > span:first-child {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 0 #6b3a00;
}
.ab-row input[type="text"], .ab-row input:not([type]), .ab-row input[type="date"], .ab-fact {
  appearance: none;
  padding: 11px 12px; border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--ink); font-family: 'Fredoka', sans-serif;
  font-size: 14px; outline: none;
}
.ab-row input:focus, .ab-fact:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(125,249,255,.15);
}
[data-theme="light"] .ab-row input, [data-theme="light"] .ab-fact {
  background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.12);
}
.ab-fact { margin-top: 6px; }
.ab-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .ab-grid2 { grid-template-columns: 1fr; } }
.ab-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-pill {
  appearance: none; border: 0; cursor: pointer;
  padding: 7px 11px 6px; border-radius: 999px;
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.06);
  color: var(--ink-dim);
  border: 1px solid rgba(255,255,255,.1);
  display: inline-flex; align-items: center; gap: 5px;
}
.ab-pill > span { font-family: 'Fredoka', sans-serif; font-size: 12px; }
.ab-pill.on {
  color: #06070d;
  background: linear-gradient(135deg,#7df9ff,#84cc16);
  border-color: transparent;
  box-shadow: 0 2px 0 rgba(0,0,0,.4), 0 0 14px rgba(125,249,255,.35);
}
.ab-photo {
  display: flex; align-items: center; justify-content: center;
  height: 140px; border-radius: 10px;
  border: 2px dashed rgba(255,216,107,.4);
  background: rgba(255,255,255,.03);
  cursor: pointer; overflow: hidden; position: relative;
}
.ab-photo:hover { border-color: var(--neon); background: rgba(125,249,255,.04); }
.ab-photo img { width: 100%; height: 100%; object-fit: cover; }
.ab-ph-empty {
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  color: var(--ink-dim); letter-spacing: .04em; text-transform: uppercase;
}
.ab-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px;
  border-top: 2px dashed rgba(255,216,107,.25);
  background: rgba(0,0,0,.2);
}
[data-theme="light"] .ab-foot { background: rgba(0,0,0,.03); }
.ab-btn {
  appearance: none; border: 0; cursor: pointer;
  padding: 11px 18px 10px; border-radius: 10px;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  letter-spacing: .04em; text-transform: uppercase;
}
.ab-btn.ghost {
  background: rgba(255,255,255,.06); color: var(--ink-dim);
  border: 1px solid rgba(255,255,255,.12);
}
.ab-btn.ghost:hover { background: rgba(255,255,255,.12); color: var(--ink); }
.ab-btn.primary {
  background: linear-gradient(135deg,#FFD86B,#fb923c);
  color: #1a2f7a;
  box-shadow: 0 4px 0 #6b3a00, 0 0 18px rgba(255,216,107,.4);
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.ab-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #6b3a00; }
.ab-btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #6b3a00; }

/* Add button in filter bar */
.add-btn {
  appearance: none; border: 0; cursor: pointer;
  padding: 10px 14px; border-radius: 10px;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  letter-spacing: .04em; text-transform: uppercase;
  background: linear-gradient(135deg,#FFD86B,#fb923c);
  color: #1a2f7a;
  box-shadow: 0 3px 0 #6b3a00, 0 0 14px rgba(255,216,107,.4);
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
  white-space: nowrap;
}
.add-btn:hover { transform: translateY(-1px); }
.add-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b3a00; }

/* Flying birds around hero */
.fly-layer {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.flybird {
  position: absolute;
  font-size: 28px;
  opacity: .85;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.4));
  animation: fly-x linear infinite, flap .35s ease-in-out infinite alternate;
}
.flybird.b1 { top: 22%; left: -6%; font-size: 32px; animation-duration: 22s, .35s; animation-delay: 0s, 0s; }
.flybird.b2 { top: 56%; left: -8%; font-size: 22px; opacity: .7; animation-duration: 30s, .42s; animation-delay: -8s, 0s; }
.flybird.b3 { top: 12%; left: -10%; font-size: 36px; animation-duration: 26s, .32s; animation-delay: -14s, 0s; }
.flybird.b4 { top: 70%; left: -12%; font-size: 18px; opacity: .55; animation-duration: 36s, .5s; animation-delay: -3s, 0s; }
.flybird.b5 { top: 38%; left: -7%; font-size: 26px; animation-duration: 28s, .38s; animation-delay: -18s, 0s; }
@keyframes fly-x {
  0%   { transform: translateX(0)        translateY(0); }
  25%  { transform: translateX(28vw)     translateY(-14px); }
  50%  { transform: translateX(56vw)     translateY(8px); }
  75%  { transform: translateX(84vw)     translateY(-10px); }
  100% { transform: translateX(112vw)    translateY(0); }
}
@keyframes flap {
  from { filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)) brightness(1); }
  to   { filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)) brightness(1.2); }
}

/* Feather decorations near title */
.feather {
  position: absolute; pointer-events: none;
  font-size: 30px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
  animation: feather-float 5s ease-in-out infinite;
}
.feather.f1 { top: 8%;  left: 8%;  animation-delay: 0s;   transform: rotate(-22deg); }
.feather.f2 { top: 14%; right: 9%; animation-delay: 1s;   transform: rotate(18deg); font-size: 26px; }
.feather.f3 { top: 60%; left: 13%; animation-delay: 2s;   transform: rotate(-8deg); font-size: 22px; }
.feather.f4 { top: 64%; right: 12%; animation-delay: 1.6s; transform: rotate(28deg); font-size: 24px; }
@keyframes feather-float {
  0%,100% { transform: translateY(0) rotate(var(--r,0deg)); }
  50%     { transform: translateY(-12px) rotate(calc(var(--r,0deg) + 6deg)); }
}

/* Custom-bird marker on cards */
.collno.custom { color: var(--neon); border-color: rgba(125,249,255,.5); }
.delbtn {
  position: absolute; left: 8px; top: 8px;
  width: 26px; height: 26px;
  background: rgba(159,18,57,.85);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity .15s;
  z-index: 5;
}
.card-wrap:hover .delbtn { opacity: 1; }
