/* Minimal, clean styling for standalone audio pages (light theme) */

:root{
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1d21;
  --muted: #6b7280;
  --stroke: #d2d6dc;
}
*{box-sizing: border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans";
  background: linear-gradient(180deg, var(--bg) 0%, #e9ecf1 100%);
  color: var(--text);
  display:flex; align-items:center; justify-content:center;
}
/* --- Top bar --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  justify-content: space-between; /* space between title and dropdown */
  padding: 0 1rem;
  z-index: 100;
}

.site-title {
  font-weight: 500;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

/* --- Menu button --- */
.menu {
  position: relative;
}

.menu-button {
  font-size: 22px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.menu-button:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* --- Dropdown list (same look, now scrolls gracefully) --- */
.menu-list {
  position: absolute;
  right: 0;
  top: 56px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 180px;
  z-index: 200;

  /* only additions/changes for scrolling */
  max-height: calc(100vh - 72px); /* stays on screen */
  overflow-y: auto;
  overscroll-behavior: contain;

  /* default hidden state */
  display: none;
}

.menu-list.open { display: block; }

/* keep items as they were */
.menu-list li { margin: 0; }
.menu-list a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.menu-list a:hover { background: var(--bg); }

/* slim, understated scrollbar (Firefox) */
.menu-list { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.12) transparent; }
/* WebKit scrollbars */
.menu-list::-webkit-scrollbar { width: 6px; }
.menu-list::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,.12);
  border-radius: 4px;
}
.menu-list:hover::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,.18);
}

/* make space for fixed header */
body {
  margin: 0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans";
  background: linear-gradient(180deg, var(--bg) 0%, #e9ecf1 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 56px;
}


/* add padding so the main box clears the fixed header */
body {
  margin: 0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans";
  background: linear-gradient(180deg, var(--bg) 0%, #e9ecf1 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 56px; /* new */
}

.page{
  width:min(720px, 92vw);
  padding: clamp(16px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.title{
  margin:0 0 16px;
  font-size: clamp(18px, 3.5vw, 26px);
}
.player{
  margin:0;
}
.player audio{
  width:100%; height: 44px;
  display:block;
}
.player figcaption{
  margin-top:8px;
  font-size: 13px;
  color: var(--muted);
}
.pages {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

