:root{
  --bg-dark-1:#151823;
  --bg-dark-2:#1e2231;
  --bg-dark-3:#23283a;
  --ink:#eef0f4;
  --ink-muted:#b9beca;
  --light:#f5f6f8;
  --light-card:#ffffff;
  --border:#e2e5ea;
  --accent:#b4576f;
  --accent-2:#3b6fb6;
  --pill:#2a2f42;
  --pill-active:#343a52;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:#101114;
  background:#0f1118;
}
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 18px;
  background:#0f1118;
  border-bottom:1px solid #1b1f2c;
}
.brand{display:flex; align-items:center; gap:10px;}
.logo{
  width:34px; height:34px; border-radius:8px;
  display:grid; place-items:center;
  background:#dfe3ff; color:#1a1f2c; font-weight:800; letter-spacing:.5px;
}
.brand-title{font-weight:700; color:var(--ink)}
.brand-sub{font-size:12px; color:var(--ink-muted)}
.nav{display:flex; gap:6px; flex-wrap:wrap}
.navlink{
  background:transparent; border:none; color:var(--ink-muted);
  padding:7px 10px; border-radius:8px; cursor:pointer; font-weight:600;
}
.navlink.active{color:var(--ink); background:#1a1f2c}
.signin{
  background:#151a28; color:var(--ink); border:1px solid #252b3e;
  padding:7px 12px; border-radius:999px; cursor:pointer; font-weight:600;
}

.hero{
  background: radial-gradient(900px circle at 70% 20%, #2b3150 0%, transparent 50%),
              radial-gradient(900px circle at 0% 100%, #3a1f2c 0%, transparent 55%),
              linear-gradient(160deg, #1b1f2c 0%, #141722 60%, #121420 100%);
  color:var(--ink);
  padding:70px 16px 90px;
  text-align:center;
}
.hero-inner{max-width:940px; margin:0 auto;}
.hero h1{
  margin:0 0 8px;
  color:#f6f7fb;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing:1px;
}
.hero-line{
  font-size: clamp(16px, 2vw, 20px);
  color:#d7dae2;
  margin-bottom:10px;
}
.hero-sub{
  max-width:730px; margin:0 auto 20px;
  color:var(--ink-muted); line-height:1.4;
}
.pill-row{
  display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
  margin:18px 0 18px;
}
.pill{
  background:var(--pill); color:var(--ink);
  border:1px solid #3a4059; border-radius:999px;
  padding:8px 14px; font-weight:700; cursor:pointer;
}
.pill.active{background:var(--pill-active); box-shadow: inset 0 0 0 1px #525a78;}
.hero-card{
  width:min(520px, 95vw);
  margin:0 auto;
  background:#fff;
  color:#101114;
  border-radius:14px;
  padding:18px 18px 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  text-align:left;
}
.card-title{font-weight:800; font-size:14px; text-align:center; letter-spacing:.5px}
.card-sub{text-align:center; color:#555; font-size:13px; margin:6px 0 12px}
.hero-card label, .profile-form label, .dark-card label, .light-card label{
  display:block; font-size:12px; font-weight:700; margin:8px 0 4px;
}
input, select{
  width:100%; padding:10px 11px; border-radius:8px;
  border:1px solid #d7dbe2; font-size:15px;
}
.primary{
  width:100%; margin-top:10px;
  background:var(--accent); color:white; border:none;
  padding:11px 14px; border-radius:10px; font-size:15px; font-weight:800; cursor:pointer;
}
.primary.blue{background:var(--accent-2)}
.ghost{
  width:100%; margin-top:8px;
  background:transparent; color:var(--ink); border:1px dashed #444c66;
  padding:10px 14px; border-radius:10px; font-weight:700; cursor:pointer;
}
.card-foot{
  margin-top:6px; text-align:center; font-size:12px; color:#666;
}
.linklike{
  background:transparent; border:none; color:#2f67c1; font-weight:800; cursor:pointer;
}
.quote{
  margin-top:18px; font-style:italic; color:#c9cdd8;
}

.section{padding:52px 14px;}
.section-inner{max-width:980px; margin:0 auto;}
.section-light{background:var(--light); color:#101114;}
.section-dark{background:var(--bg-dark-1); color:var(--ink);}
.two-col{display:grid; grid-template-columns:1.1fr .9fr; gap:18px;}
@media (max-width:900px){.two-col{grid-template-columns:1fr;}}

.card{border-radius:12px; padding:16px; }
.light-card{background:var(--light-card); border:1px solid var(--border);}
.dark-card{background:var(--bg-dark-2); border:1px solid #2d3348;}
.muted{color:#606673;}
.muted-dark{color:var(--ink-muted);}

.profile-form{
  display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end;
  margin-top:8px;
}

.result{margin-top:16px;}
.result .card{margin-top:10px;}

.animals-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
@media (max-width:800px){.animals-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.animals-grid{grid-template-columns:1fr}}

.animal-tile{
  display:flex; gap:12px; align-items:center;
  padding:12px; border-radius:12px;
  border:1px solid var(--border); background:#fff;
  cursor:pointer;
  min-height:104px;
}
.animal-tile img{
  width:86px; height:86px; border-radius:12px; flex:0 0 auto;
  object-fit:cover;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.animal-title{font-weight:800; font-size:18px;}
.animal-meta{font-size:12px; color:#5a6070; line-height:1.25; margin-top:2px;}

.member-row{
  display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end;
  margin-top:10px; padding-top:10px; border-top:1px dashed #3a4057;
}
.member-row .remove{
  background:#2a2f42; color:var(--ink); border:1px solid #3a4059;
  padding:8px 10px; border-radius:8px; cursor:pointer; font-weight:700;
}

.pair-badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 8px; border-radius:999px; font-weight:800; font-size:12px;
}
.badge-green{background:#e8f7ea; color:#176a2b; border:1px solid #bfe8c6;}
.badge-yellow{background:#fff4d8; color:#7a5200; border:1px solid #f0d49b;}
.badge-red{background:#fde2e0; color:#8e1b16; border:1px solid #f2b8b4;}

.table{
  width:100%; border-collapse:collapse; margin-top:8px; background:#fff; border-radius:10px; overflow:hidden;
}
.table th, .table td{padding:8px 10px; border-bottom:1px solid #eef1f5; text-align:left; font-size:14px;}
.table th{background:#f0f2f6; font-weight:800; font-size:13px;}

.section-dark .table{background:#171b27; color:var(--ink);}
.section-dark .table th{background:#23283a; color:var(--ink);}
.section-dark .table td{border-bottom:1px solid #2d3348;}

.modal-backdrop{
  position:fixed; inset:0; background:rgba(10,12,16,.6); z-index:100;
}
.modal{
  position:fixed; inset:auto 50% 50% auto; transform:translate(50%,50%);
  width:min(520px, 94vw);
  background:#fff; color:#101114; z-index:101;
  border-radius:14px; padding:16px 16px 12px; box-shadow:0 18px 60px rgba(0,0,0,.45);
}
.hidden{display:none;}
.modal-close{
  position:absolute; right:10px; top:6px; border:none; background:transparent;
  font-size:26px; cursor:pointer;
}

.footer{
  text-align:center; font-size:12px; color:#8b90a0; padding:18px; background:#0f1118;
}
