/* FoxHonk Hub — skins via CSS vars; glass top bar; mobile-first */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--fg);
  background-color: var(--bg-colour);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  transition: background .4s ease, color .3s ease;
}
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ---------- top bar (windows-taskbar-style glass) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-radius: 0;
  border-left: none; border-right: none; border-top: none;
  backdrop-filter: blur(calc(var(--blur) + 6px)) saturate(1.4);
  -webkit-backdrop-filter: blur(calc(var(--blur) + 6px)) saturate(1.4);
}
.brand { font-weight: 800; font-size: 1.05rem; color: var(--fg); }
.navlinks { display: flex; gap: 6px; margin-left: auto; }
.navlinks a, .bottomnav a {
  padding: 8px 12px; border-radius: 10px; color: var(--fg);
  font-size: .9rem; transition: background .2s;
}
.navlinks a span, .bottomnav a span { margin-left: 4px; }
.navlinks a:hover, .bottomnav a:hover, .navlinks a.active, .bottomnav a.active { background: var(--panel); }
.pfpwrap { position: relative; }
.pfpbtn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--panel);
  display: grid; place-items: center; font-size: 1.1rem; overflow: hidden;
}
.pfpbtn img { width: 100%; height: 100%; object-fit: cover; }
.pfpmenu {
  position: absolute; right: 0; top: 46px; min-width: 160px;
  background: var(--glass); backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border); border-radius: 12px; padding: 6px; z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
}
.pfpmenu a, .pfpmenu button {
  background: none; border: none; text-align: left; padding: 9px 12px;
  border-radius: 8px; color: var(--fg); font-size: .92rem; width: 100%;
}
.pfpmenu a:hover, .pfpmenu button:hover { background: var(--panel); }

/* ---------- layout ---------- */
.wrap { max-width: 1000px; margin: 0 auto; padding: 16px 14px 90px; }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pagehead h1 { font-size: 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.hidden { display: none !important; }
.avatar-big { font-size: 1.3rem; }

/* ---------- cards ---------- */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card {
  background: var(--panel);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.linkcard { transition: transform .15s ease, border-color .2s; }
.linkcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { font-size: 1.05rem; }
.card p { color: var(--muted); font-size: .88rem; }
.cardicon { font-size: 1.6rem; }
.pill {
  display: inline-block; background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; margin: 2px 4px 2px 0; font-size: .8rem; color: var(--fg);
}
.tag {
  display: inline-block; background: var(--panel); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: .75rem;
}

/* ---------- week strip / mini calendar ---------- */
.bigclock {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 26px; border-radius: 22px; text-decoration: none;
  background: var(--glass);
  backdrop-filter: blur(calc(var(--blur) + 4px));
  -webkit-backdrop-filter: blur(calc(var(--blur) + 4px));
  border: 1px solid var(--border); color: var(--fg);
  transition: border-color .2s, transform .15s;
}
.bigclock:hover { border-color: var(--accent); transform: translateY(-1px); }
.bigtime { font-size: 2.7rem; font-weight: 800; line-height: 1; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.bigdate { font-size: 1.05rem; color: var(--muted); }
.greet { margin-left: auto; }
.minicalcard { margin-bottom: 16px; }
.minicalhead { display: flex; align-items: center; justify-content: center; gap: 14px; }
.minicalhead h3 { font-size: 1.05rem; min-width: 150px; text-align: center; }
.minicalnav {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  width: 34px; height: 34px; font-size: 1.1rem; color: var(--fg);
}
.minicalnav:hover { border-color: var(--accent); }
.minicalgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0 6px; }
.minidow { text-align: center; font-size: .7rem; color: var(--muted); padding: 2px 0; }
.miniday {
  width: 40px; height: 40px; margin: 0 auto; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: none; border: 2px solid transparent; color: var(--fg); font-size: .88rem; cursor: pointer;
  position: relative; padding: 0;
}
.miniday:hover { background: var(--panel); }
.miniday.other { opacity: .35; }
.miniday.today { border-color: var(--accent); }
.miniday.sel { background: var(--accent); color: #111; font-weight: 700; }
.miniday .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.miniday.sel .dot { background: #111; }
.minievents {
  margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px;
  display: flex; flex-direction: column; gap: 6px; min-height: 44px;
}
.minievents .ev {
  display: flex; align-items: center; gap: 8px; font-size: .85rem;
  padding: 7px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
}
.minievents .when { color: var(--accent); font-weight: 700; min-width: 52px; }
.weekstrip { display: flex; gap: 6px; padding: 10px; margin-bottom: 16px; overflow-x: auto; }
.daychip { flex: 1; min-width: 60px; text-align: center; padding: 8px 4px; border-radius: 10px; font-size: .8rem; color: var(--muted); }
.daychip.today { background: var(--panel); color: var(--accent); font-weight: 700; }

/* ---------- buttons & forms ---------- */
.btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--fg);
  border-radius: 12px; padding: 9px 16px; font-size: .9rem; transition: background .2s;
}
.btn:hover { background: color-mix(in srgb, var(--panel) 80%, var(--accent) 20%); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 700; }
.btn.small { padding: 4px 10px; font-size: .78rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; width: 100%; outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
input[type="color"] { padding: 2px; height: 38px; width: 60px; }
input[type="range"] { padding: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.err { color: #ff8b8b; font-size: .82rem; min-height: 1em; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: .82rem; cursor: pointer;
}
.chip input { width: auto; accent-color: var(--accent); }

/* ---------- auth ---------- */
.authcard {
  max-width: 380px; margin: 8vh auto; padding: 26px;
  background: var(--glass); backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border); border-radius: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.authlogo { font-size: 2.4rem; text-align: center; }
.authcard h1 { text-align: center; }
.tabrow { display: flex; background: var(--panel); border-radius: 12px; padding: 4px; }
.tab { flex: 1; background: none; border: none; color: var(--muted); padding: 8px; border-radius: 9px; }
.tab.active { background: var(--accent); color: #111; font-weight: 700; }
.authform { display: flex; flex-direction: column; gap: 10px; }

/* ---------- skin picker ---------- */
.skinpanel { margin-top: 16px; }
.skinrow { display: flex; flex-wrap: wrap; gap: 8px; }
.skinbtn {
  background: var(--panel); border: 1px solid var(--border); color: var(--fg);
  border-radius: 999px; padding: 7px 14px; font-size: .85rem;
}
.skinbtn.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.prefrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.prefrow label { font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.prefbtns { display: flex; gap: 8px; align-items: center; }

/* ---------- calendar ---------- */
.calbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; }
.calbar h2 { font-size: 1.15rem; flex: 1; text-align: center; }
.calnav {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  width: 36px; height: 36px; font-size: 1.1rem; color: var(--fg);
}
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.caldow { text-align: center; font-size: .72rem; color: var(--muted); padding: 4px 0; }
.calcell {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  font-size: .9rem; cursor: pointer; position: relative;
}
.calcell:hover { border-color: var(--accent); }
.calcell.other { opacity: .4; }
.calcell.today { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.calcell .dnum { font-weight: 600; }
.calcell .dots { display: flex; gap: 3px; margin-top: 3px; }
.calcell .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.calcell .busydot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .9; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; margin-bottom: 12px; }
.switchline { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.switch { position: relative; width: 44px; height: 24px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; transition: .25s;
}
.slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: var(--muted); transition: .25s; }
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); background: #111; }

/* ---------- day panel ---------- */
.daypanel {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center;
  background: rgba(0,0,0,.4); backdrop-filter: blur(2px);
}
.daycard {
  width: min(560px, 100vw); max-height: 88vh; overflow-y: auto;
  padding: 20px; position: relative; border-radius: 20px 20px 0 0;
}
.daycard .x { position: absolute; right: 14px; top: 12px; background: none; border: none; font-size: 1.1rem; color: var(--muted); }
.daylist { list-style: none; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.daylist li {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
}
.daylist .when { font-size: .8rem; color: var(--accent); font-weight: 700; min-width: 52px; }
.daylist .who { font-size: .78rem; color: var(--muted); }
.daylist .del { margin-left: auto; background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 2px 8px; }
.busyli { opacity: .75; font-style: italic; }
.eventform { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.whofree h4 { margin-bottom: 6px; color: var(--accent); }
.whofree .free-name { display: inline-block; margin: 2px 6px 2px 0; }

/* ---------- santa ---------- */
.pplist { display: flex; flex-wrap: wrap; gap: 6px; }
.santa-card {
  max-width: 260px; text-align: center; padding: 18px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 16px;
}
.santa-blur { font-size: 1.3rem; letter-spacing: 2px; filter: blur(4px); user-select: none; }
.santa-secret { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.groupcard { margin-bottom: 12px; }

/* ---------- profile ---------- */
.pfpedit { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.pfpbig { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 50%; overflow: hidden; }
.pfpbig img { width: 100%; height: 100%; object-fit: cover; }
.avatars { display: flex; flex-wrap: wrap; gap: 4px; }
.avataropt { font-size: 1.2rem; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 4px 8px; }
.friendlist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.friendlist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.friendlist .tierbtn { font-size: .72rem; padding: 3px 8px; border-radius: 8px; background: none; border: 1px solid var(--border); color: var(--muted); }
.friendlist .tierbtn.close { border-color: var(--accent); color: var(--accent); }
.grouplist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.groupitem { padding: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.groupitem .gname { font-weight: 700; }
.groupitem .gmembers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.groupitem .chip input { display: none; }
.groupitem .chip.on { border-color: var(--accent); }

/* ---------- circle card / friend boxes ---------- */
.circlecard { margin-bottom: 16px; }
.fboxlist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.fbox {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 8px 12px; min-width: 0;
}
.favatar { font-size: 1.5rem; flex: 0 0 auto; }
.fname {
  flex: 1; min-width: 0; max-width: 16ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
}
.star {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  color: var(--muted); padding: 2px 6px; border-radius: 8px;
}
.star.on { color: #ffd23e; text-shadow: 0 0 6px rgba(255,210,62,.5); }
.fdel {
  background: none; border: none; font-size: 1rem; cursor: pointer;
  color: var(--muted); padding: 2px 8px; border-radius: 8px;
}
.fdel:hover { color: #ff8b8b; background: rgba(255,80,80,.12); }
.addfriend { display: flex; gap: 8px; margin-top: 10px; }
.addfriend input { flex: 1; }
.reqsec { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.reqpill {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--panel); border: 1px dashed var(--border); border-radius: 12px;
  padding: 8px 12px; font-size: .9rem;
}
.reqpill span { flex: 1; }
.countdown { text-align: center; color: var(--accent); font-size: .88rem; font-weight: 600; }
.btn.del { border-color: rgba(255,120,120,.5); color: #ff8b8b; }
.btn.del:hover { background: rgba(255,80,80,.15); }
.notice {
  background: rgba(255,210,62,.12); border: 1px solid rgba(255,210,62,.45);
  border-radius: 12px; padding: 8px 12px; font-size: .88rem; margin-bottom: 10px;
}

/* ---------- availability filter list ---------- */
.filters { padding: 12px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.fsearch {
  width: 100%; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel); color: var(--fg);
  margin-bottom: 6px;
}
.frow {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
.frow:hover { background: var(--panel); }
.frow input { accent-color: var(--accent); }
.fsec {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 10px 4px 2px;
}
.hidden { display: none !important; }

/* ---------- admin ---------- */
.inviteout { font-weight: 800; color: var(--accent); font-size: 1.05rem; }
.admintable { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .85rem; }
.admintable th, .admintable td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.admintable th { color: var(--muted); font-weight: 600; }
.admintable code { color: var(--accent); }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: none; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0; border-bottom: none;
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; padding: 6px 12px; }
.bottomnav a span { margin: 0; }

@media (max-width: 640px) {
  .navlinks a span { display: none; }
  .navlinks a { font-size: 1.05rem; padding: 8px 10px; }
  .bottomnav { display: flex; }
  .cardgrid { grid-template-columns: 1fr 1fr; }
  .calcell { font-size: .8rem; }
  .daypanel { place-items: end center; }
  .wrap { padding-bottom: 100px; }
}
@media (max-width: 420px) {
  .cardgrid { grid-template-columns: 1fr; }
  .authcard { margin: 4vh auto; }
}
