/* Species portraits are a read-only view of the existing observation totals. */
.bird-panel { container-type: inline-size; }
.species-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.species-card { min-width: 0; padding: 14px 12px 0; border: 1px solid #dce1d0; border-radius: 11px; background: #fffdf6; color: var(--forest-3); text-align: left; transition: background .15s ease, border-color .15s ease; }
.species-card[aria-pressed="true"] { background: #e9eedf; border-color: #a9b597; }
.species-card:hover { background: #f0f2e7; }
.species-card-name { display: block; font-size: .9rem; font-weight: 600; }
.species-sprite { display: block; width: 112px; max-width: 100%; aspect-ratio: 1; height: auto; margin: 2px auto 0; background-size: 200% 200%; background-repeat: no-repeat; background-position: 0 0; transition: transform .18s ease-out; }
.species-art-lirype { background-image: url('./assets/journey-lirype-v47.webp'); }
.species-art-orrfugl { background-image: url('./assets/journey-orrfugl-v47.webp'); }
.species-art-tiur { background-image: url('./assets/journey-tiur-v47.webp'); }
.species-art-rugde { background-image: url('./assets/journey-rugde-v47.webp'); }
.species-sprite.species-art-fjellrype { background-image:url('./assets/journey-fjellrype-v82.webp'); }
.species-sprite.species-art-orrhone { background-image:url('./assets/journey-orrhone-v82.webp'); }
.species-sprite.species-moving { animation: species-flutter 1.5s step-end, species-takeoff 1.5s ease-in-out; }
@keyframes species-flutter { 0%,100% { background-position: 0 0; } 16%,84% { background-position: 100% 0; } 32%,65% { background-position: 0 100%; } 48% { background-position: 100% 100%; } }
@keyframes species-takeoff { 0%,100% { transform: translateY(0); } 32%,65% { transform: translateY(-9px) rotate(-2deg); } }
@keyframes species-hover-wings { 0%,100% { background-position: 0 100%; } 50% { background-position: 100% 100%; } }
@media (hover:hover) and (pointer:fine) {
  .species-card:hover .species-sprite, .species-encounter:hover .species-sprite {
    animation: species-hover-wings .8s step-end infinite;
    transform: translateY(-9px) rotate(-2deg);
  }
}
.species-counts { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px; margin-top: 8px; }
.species-observed { font-size: 1.9rem; font-weight: 500; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.species-observed small { display: block; color: var(--muted); font-size: .69rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; margin-top: 5px; }
.species-felled { color: #96603c; font-size: .77rem; white-space: nowrap; }
.species-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; padding: 9px 0 10px; border-top: 1px solid #dbe1d0; color: var(--muted); font-size: .69rem; }
.species-card-foot > span:last-child { color: #96603c; font-size: 1rem; }
.species-trip-list { margin-top: 20px; }
.species-list-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 10px; margin-bottom: 7px; }
.species-list-heading strong { font-weight: 500; font-size: .8rem; color: var(--forest-3); }
.species-list-heading > span { font-size: .69rem; color: var(--muted); }
.species-trip { display: grid; grid-template-columns: 34px minmax(0,1fr) 16px; gap: 10px; align-items: center; min-height: 64px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid #dce1d0; text-align: left; background: none; color: var(--forest-3); }
.species-trip > span:nth-child(2) { min-width: 0; }
.species-trip strong { display: block; font-size: .81rem; font-weight: 500; overflow-wrap: anywhere; }
.species-trip small { display: block; color: var(--muted); font-size: .69rem; margin-top: 3px; }
.species-trip-date { text-align: center; }.species-trip-date b { display: block; font-weight: 500; font-size: 1.2rem; line-height: 1; }.species-trip-date small { font-size: .68rem; }
.species-trip-arrow { color: #96603c; font-size: 1.05rem; }.species-trip:hover strong { color: #96603c; }
.species-all-trips { width: 100%; min-height: 44px; display: flex; gap: 12px; justify-content: space-between; align-items: center; border: 0; border-top: 1px solid #dce1d0; padding: 10px 0 0; color: var(--forest-3); background: none; font-size: .75rem; text-align: left; }
.species-all-trips:hover { color: #96603c; }
.species-recording-note { color: var(--muted); font-size: .69rem; line-height: 1.6; margin: 12px 0 0; }
.species-empty { color: var(--muted); font-size: .8rem; line-height: 1.7; margin: 8px 0; }
.species-original-chart { margin-top: 18px; border-top: 1px solid #dce1d0; padding-top: 7px; }
.species-original-chart > summary { cursor: pointer; color: var(--muted); min-height: 42px; align-content: center; font-size: .74rem; padding: 8px 0; }
.species-original-chart .bird-chart { padding-top: 12px; }
.species-detail .species-met-total { margin: -4px 0 12px; color: var(--muted); font-size: .73rem; }
.species-encounters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,165px),1fr)); gap: 9px; }
.species-encounter { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid #dce1d0; border-radius: 10px; color: var(--forest-3); background: #fffdf6; text-align: left; }
.species-encounter:hover, .species-encounter[aria-expanded="true"] { background: #edf0e3; }
.species-encounter .species-sprite { width: 62px; height: 62px; margin: 0; flex-shrink: 0; }
.species-encounter strong { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 3px; }.species-encounter small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.6; }.species-encounter small.species-felled { color: #96603c; }
.species-detail .species-met-info { color: #57674e; font-size: .74rem; line-height: 1.65; padding: 11px 12px; border-radius: 7px; background: #edf0e3; margin: 10px 0 0; }
.species-met-info[hidden] { display: none; }
.species-card:focus-visible, .species-trip:focus-visible, .species-all-trips:focus-visible, .species-encounter:focus-visible, .species-original-chart > summary:focus-visible { outline: 2px solid #96603c; outline-offset: 3px; }
@container (min-width:580px) { .species-cards { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media(max-width:600px) { .species-card { padding: 13px 11px 0; }.species-sprite { width: 108px; }.species-card-name { font-size: .86rem; }.species-encounter { min-height: 82px; }.species-encounter .species-sprite { width: 62px; }.species-encounters { grid-template-columns: 1fr; } }
@media(prefers-reduced-motion:reduce) { .species-sprite { animation: none !important; transform: none !important; transition: none; }.species-card { transition: none; } }
@media print { .species-sprite { animation: none !important; transform: none !important; transition: none; background-position: 0 0; } }

/* Same four-frame hover, click and reduced-motion behaviour as other birds. */
.species-sprite.species-art-roy{background-image:url("/assets/journey-roy-v1.svg")}
.species-sprite.species-art-jerpe{background-image:url("/assets/journey-jerpe-v1.svg")}
