:root{
  --bg: #fbfbff;
  --ink: #1f2430;
  --muted: #5a6376;

  --card: rgba(255,255,255,0.86);
  --stroke: rgba(25, 30, 45, 0.12);

  --a: #ffd6e8; /* pastel pink */
  --b: #d8f5ff; /* pastel sky */
  --c: #e9f7d1; /* pastel green */
  --d: #fff0c9; /* pastel butter */

  --shadow: 0 12px 40px rgba(30, 35, 50, 0.10);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body{
  margin: 0;
  font-family: "Fredoka", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 20% 10%, var(--b), transparent 55%),
    radial-gradient(900px 600px at 80% 15%, var(--a), transparent 55%),
    radial-gradient(800px 600px at 30% 80%, var(--c), transparent 55%),
    radial-gradient(900px 650px at 80% 85%, var(--d), transparent 60%),
    var(--bg);
}

.top{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(251, 251, 255, 0.65);
  border-bottom: 1px solid rgba(25,30,45,0.08);
}

.brand{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo{
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(25,30,45,0.10);
  box-shadow: 0 10px 30px rgba(30, 35, 50, 0.08);
}

h1{
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.2px;
}

.sub{
  margin: 2px 0 0 0;
  color: var(--muted);
}

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}

.card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro{
  padding: 18px 18px 16px;
}

.intro h2{
  margin: 0 0 6px 0;
  font-size: 18px;
}

.intro p{
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.meta{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill{
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(25,30,45,0.18);
  background: rgba(255,255,255,0.55);
  color: var(--muted);
  font-size: 14px;
}

.pill-warn{
  border-style: solid;
}

.grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 720px){
  .grid{ grid-template-columns: 1fr; }
}

.animal{
  position: relative;
  padding: 16px 16px 14px;
  cursor: pointer;
  user-select: none;
  outline: none;
  transform: translateY(0);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.animal:focus-visible{
  box-shadow: 0 0 0 4px rgba(40, 120, 255, 0.20), var(--shadow);
}

.animal:hover{
  transform: translateY(-2px);
}

.animal-top{
  display: flex;
  justify-content: flex-end;
}

.badge{
  font-size: 12px;
  letter-spacing: 1px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31,36,48,0.86);
  color: white;
}

.pic{
  margin: 12px auto 10px;
  width: min(220px, 70%);
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  border: 1px solid rgba(25,30,45,0.10);
  background: rgba(255,255,255,0.70);
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

.emoji{
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(30,35,50,0.12));
}

.name{
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.hint{
  margin: 8px 0 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.flip{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px dashed rgba(25,30,45,0.16);
  background: rgba(255,255,255,0.55);
  display: none;
}

.flip-label{
  margin: 0 0 4px 0;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(31,36,48,0.70);
}

.flip-fact{
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.animal.is-open .flip{ display: block; }
.animal.is-open .hint{ display: none; }

.footer{
  margin-top: 18px;
  padding: 16px 18px;
  color: var(--muted);
  line-height: 1.45;
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  background: rgba(31,36,48,0.08);
  padding: 2px 6px;
  border-radius: 8px;
}