/* Floating Subscribe button + popover (main site theme) */
#fab-subscribe {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  background: rgb(99 102 241);
  color: white;
  border: none;
  border-radius: 9999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.dark #fab-subscribe { background: rgb(20 184 166); color: rgb(15 23 42); }
#fab-subscribe:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
#fab-subscribe svg { width: 16px; height: 16px; }

#fab-popover {
  position: fixed;
  right: 1.5rem;
  bottom: 4.5rem;
  z-index: 50;
  width: 320px;
  max-width: calc(100vw - 3rem);
  background: white;
  border: 2px solid rgb(15 23 42);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 4px 4px 0 0 rgba(15, 23, 42, 1);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.dark #fab-popover {
  background: rgb(30 41 59);
  border-color: rgb(203 213 225);
  box-shadow: 4px 4px 0 0 rgba(203, 213, 225, 1);
  color: rgb(226 232 240);
}
#fab-popover.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#fab-popover h3 { font-family: ui-monospace, monospace; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; }
#fab-popover h3 .fab-zh { font-size: 0.75rem; font-weight: 400; color: rgb(100 116 139); margin-left: 0.25rem; }
.dark #fab-popover h3 .fab-zh { color: rgb(148 163 184); }
#fab-popover p { font-size: 0.8rem; color: rgb(100 116 139); line-height: 1.5; margin-bottom: 0.4rem; }
#fab-popover p:last-of-type { margin-bottom: 0.85rem; }
.dark #fab-popover p { color: rgb(148 163 184); }
#fab-popover input[type="text"],
#fab-popover input[type="email"] {
  width: 100%; padding: 0.55rem 0.75rem;
  border: 2px solid rgb(15 23 42); border-radius: 0.5rem;
  background: rgb(248 250 252); color: rgb(15 23 42);
  font-family: ui-monospace, monospace; font-size: 0.85rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
.dark #fab-popover input[type="text"],
.dark #fab-popover input[type="email"] {
  border-color: rgb(203 213 225); background: rgb(15 23 42); color: white;
}
#fab-popover input:focus { outline: 2px solid rgb(99 102 241); outline-offset: 0; }
#fab-popover button[type="submit"] {
  width: 100%; padding: 0.55rem;
  background: rgb(15 23 42); color: white; border: 2px solid rgb(15 23 42);
  border-radius: 0.5rem; font-family: ui-monospace, monospace; font-size: 0.85rem;
  font-weight: 700; cursor: pointer; transition: transform 0.15s;
}
.dark #fab-popover button[type="submit"] { background: rgb(203 213 225); color: rgb(15 23 42); border-color: rgb(203 213 225); }
#fab-popover button[type="submit"]:hover { transform: translateY(-1px); }
#fab-popover .fab-close {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: transparent; border: none; cursor: pointer;
  color: rgb(148 163 184); font-size: 1.2rem; line-height: 1; padding: 0.25rem;
}
#fab-popover .fab-close:hover { color: rgb(15 23 42); }
.dark #fab-popover .fab-close:hover { color: white; }
#fab-popover .fab-rss {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(226 232 240);
  font-size: 0.75rem;
  color: rgb(100 116 139);
}
.dark #fab-popover .fab-rss { border-top-color: rgb(51 65 85); color: rgb(148 163 184); }
#fab-popover .fab-rss a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: rgb(249 115 22);
  font-family: ui-monospace, monospace; font-weight: 700;
  text-decoration: underline; text-decoration-color: rgba(249, 115, 22, 0.3);
  text-underline-offset: 2px;
  margin-left: 0.25rem;
}
#fab-popover .fab-rss a:hover { color: rgb(234 88 12); }
.dark #fab-popover .fab-rss a:hover { color: rgb(251 146 60); }
