:root{
  --bg:#0b1220;
  --card:rgba(255,255,255,.08);
  --card2:rgba(255,255,255,.06);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --line:rgba(255,255,255,.14);
  --accent:#6ee7b7;
  --accent2:#60a5fa;
  --danger:#fb7185;
  --sun:#fb7185;
  --sat:#60a5fa;
  --wk:rgba(255,255,255,.9);
  --shadow:0 18px 45px rgba(0,0,0,.35);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:radial-gradient(1200px 800px at 15% 10%, rgba(110,231,183,.18), transparent 55%),
radial-gradient(1000px 700px at 90% 20%, rgba(96,165,250,.16), transparent 60%),
var(--bg); color:var(--text); font-family: ui-sans-serif, system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;}
a{color:inherit}
.wrap{max-width:1100px;margin:0 auto;padding:0 16px;}

.topbar{
  position:sticky;top:0;z-index:10;
  backdrop-filter: blur(10px);
  background:linear-gradient(to bottom, rgba(11,18,32,.95), rgba(11,18,32,.60));
  border-bottom:1px solid var(--line);
}
.topbar .wrap{padding:14px 16px;}
.kicker{font-size:12px;color:var(--muted);letter-spacing:.06em}
.title h1{margin:2px 0 0 0;font-size:18px}

.actions{
  margin-top:10px;
  display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-start; align-items:center;
}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 12px;border-radius:999px;
  background:linear-gradient(135deg, rgba(110,231,183,.22), rgba(96,165,250,.18));
  border:1px solid rgba(255,255,255,.16);
  text-decoration:none; font-weight:700; font-size:13px;
}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,.18);}

.yearpick{display:flex; gap:8px; align-items:center;}
.yearinput{
  width:88px;
  padding:10px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.92);
  font-size:14px;
}

/* ★フィルタバー */
.filterbar{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.18);
}
.filterrow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.search{
  flex:1 1 220px;
  min-width:180px;
  padding:12px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.92);
  font-size:14px;
}
.select{
  flex:0 0 auto;
  min-width:180px;
  padding:12px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.92);
  font-size:14px;
}
.filtermeta{
  margin-top:8px;
  color:rgba(255,255,255,.65);
  font-size:12px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  padding:18px 0 26px;
}

.month-card{
  background:linear-gradient(180deg, var(--card), var(--card2));
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  min-height:160px;
}
.month-head{
  display:flex;align-items:baseline;justify-content:space-between;
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.month-title{font-size:16px;font-weight:900}
.month-count{font-size:12px;color:var(--muted)}
.empty{padding:18px 14px;color:var(--muted);}

.list{padding:8px 10px 12px;}

.item{
  display:flex;
  gap:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  margin-top:10px;
}
.item:first-child{margin-top:0;}

.date{
  width:64px; flex:0 0 64px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:8px 6px;
}
.date .md{font-weight:900;font-size:14px;line-height:1.1}
.date .dow{font-size:12px;color:var(--muted);margin-top:4px}
.date.sun .md, .date.sun .dow{color:var(--sun)}
.date.sat .md, .date.sat .dow{color:var(--sat)}
.date.wk .md{color:var(--wk)}
.date.wk .dow{color:var(--muted)}

.body{flex:1; min-width:0;}
.line1{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:6px}
.time{font-size:12px;color:var(--muted)}
.badge{
  font-size:11px; font-weight:900;
  padding:4px 8px; border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
}
.badge.holiday{border-color: rgba(110,231,183,.35); background: rgba(110,231,183,.10)}
.badge.cake{border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.10)}
.badge.cat{border-color: rgba(96,165,250,.35); background: rgba(96,165,250,.10)}

.title-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
}
.evt-title{
  font-weight:900;
  font-size:14px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.link{
  font-size:12px; font-weight:900;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.07);
  text-decoration:none;
  flex:0 0 auto;
}
.detail{
  margin-top:6px;
  color:rgba(255,255,255,.78);
  font-size:12px;
  line-height:1.5;
  overflow-wrap:anywhere;
}

.undated{
  margin:8px 0 26px;
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}
.undated h2{margin:0 0 12px;font-size:15px}
.undated-list{display:grid; grid-template-columns:1fr; gap:10px}
.undated-item{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  border-radius:14px;
  padding:12px;
}
.u-head{display:flex; align-items:center; justify-content:space-between; gap:10px}
.u-title{font-weight:900; overflow-wrap:anywhere;}

.footer{padding:0 0 40px; color:var(--muted); font-size:13px}
.footer a{text-decoration:none}

@media (max-width: 980px){
  .grid{grid-template-columns: repeat(2, minmax(0,1fr));}
}
@media (max-width: 640px){
  .actions{gap:8px}
  .grid{grid-template-columns: 1fr;}
  .date{width:58px; flex-basis:58px}
  .yearinput{width:84px}
  .select{min-width:160px}
}
