:root{
  --bg:#f6f7f4; --panel:#ffffff; --ink:#22271f; --muted:#6b7466;
  --line:#e2e6dd; --accent:#3f7d54; --accent-ink:#fff; --active:#eaf3ec;
  --shadow:0 1px 3px rgba(0,0,0,.07);
}
*{box-sizing:border-box}
body{margin:0;font:15px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--ink);background:var(--bg)}
a{color:inherit;text-decoration:none}

.topbar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;
  padding:.7rem 1.1rem;background:var(--panel);border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:5}
.topbar h1{font-size:1.15rem;margin:0;font-weight:650}
.search{display:flex;align-items:center;gap:.4rem;margin-left:auto}
.search input[type=search]{padding:.45rem .6rem;border:1px solid var(--line);
  border-radius:8px;min-width:220px;background:#fff}
.search button{padding:.45rem .8rem;border:0;border-radius:8px;
  background:var(--accent);color:var(--accent-ink);cursor:pointer;font-weight:600}
.search .clear{color:var(--muted);font-size:.85rem}

.layout{display:grid;grid-template-columns:290px 1fr;gap:0;align-items:start}
.sidebar{padding:1rem;border-right:1px solid var(--line);position:sticky;top:57px;
  max-height:calc(100vh - 57px);overflow:auto}
.stats{color:var(--muted);font-size:.8rem;margin-bottom:.8rem;text-transform:uppercase;
  letter-spacing:.03em}

details.year>summary,details.month>summary{cursor:pointer;padding:.35rem .4rem;
  border-radius:6px;font-weight:600;display:flex;justify-content:space-between;
  align-items:center;list-style:none}
details.year>summary::-webkit-details-marker,
details.month>summary::-webkit-details-marker{display:none}
details.year>summary::before,details.month>summary::before{
  content:"▸";margin-right:.4rem;color:var(--muted);font-size:.8rem;transition:transform .15s}
details[open]>summary::before{transform:rotate(90deg)}
details.year{margin-bottom:.3rem}
.months{margin:.15rem 0 .35rem .6rem}
details.month>summary{font-weight:500}
.days{list-style:none;margin:.1rem 0 .4rem .8rem;padding:0}
.day{display:flex;justify-content:space-between;align-items:center;
  padding:.28rem .45rem;border-radius:6px;color:var(--muted)}
.day:hover{background:var(--active);color:var(--ink)}
.day.active{background:var(--accent);color:var(--accent-ink)}
.count{background:var(--line);color:var(--muted);border-radius:999px;
  font-size:.72rem;padding:.02rem .5rem;margin-left:.5rem}
.day.active .count{background:rgba(255,255,255,.28);color:#fff}
.empty{color:var(--muted)}

.content{padding:1.2rem 1.4rem}
.dayheading{font-size:1.05rem;margin:.2rem 0 1rem}
.hint{color:var(--muted);padding:2rem 0}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}
.card{margin:0;background:var(--panel);border:1px solid var(--line);
  border-radius:12px;overflow:hidden;box-shadow:var(--shadow)}
.card video{width:100%;aspect-ratio:16/9;background:#000;display:block}
.card figcaption{display:flex;justify-content:space-between;align-items:center;
  padding:.55rem .7rem}
.species{font-weight:600}
.clocktime{color:var(--muted);font-variant-numeric:tabular-nums}
.card.dimmed{display:none}

@media(max-width:760px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:static;max-height:none;border-right:0;border-bottom:1px solid var(--line)}
  .search input[type=search]{min-width:140px}
}
