:root {
  --bg: #f7f3ec;
  --surface: #ffffff;
  --surface-2: #faf5ee;
  --text: #241f1b;
  --muted: #7c7266;
  --accent: #b0272e;
  --accent-soft: #f7e3e1;
  --gold: #a9812f;
  --border: #e9e0d3;
  --good: #2f7d4f;
  --good-soft: #e8f3ec;
  --shadow: 0 1px 2px rgba(60, 30, 20, .05), 0 10px 28px rgba(60, 30, 20, .07);
  --radius: 16px;
  --font-body: "Hanken Grotesk", "Baloo Chettan 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-title: "Hanken Grotesk", "Baloo Chettan 2", sans-serif;
  --font-button: "Hanken Grotesk", system-ui, sans-serif;
}
/* Dark palette: applied when the OS prefers dark (unless the user forced light),
   or when the user explicitly picks dark via the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130f;
    --surface: #211b16;
    --surface-2: #271f18;
    --text: #f1eae0;
    --muted: #a89d8d;
    --accent: #dd6a6f;
    --accent-soft: #3a201e;
    --gold: #d6a959;
    --border: #33291f;
    --good: #7fd39a;
    --good-soft: #17331f;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #17130f;
  --surface: #211b16;
  --surface-2: #271f18;
  --text: #f1eae0;
  --muted: #a89d8d;
  --accent: #dd6a6f;
  --accent-soft: #3a201e;
  --gold: #d6a959;
  --border: #33291f;
  --good: #7fd39a;
  --good-soft: #17331f;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }

.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: 0 0 auto; vertical-align: -.15em; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: env(safe-area-inset-top) 0 0;
}
.topbar-inner {
  display: flex; align-items: center;
  gap: 10px; max-width: 940px; margin: 0 auto; padding: 11px 20px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
}
.brand-icon { width: 22px; height: 22px; fill: var(--accent); }
.brand-logo { height: 46px; width: auto; display: block; }
.loop-ico {
  display: inline-block; width: 17px; height: 15px; flex: 0 0 auto; background: currentColor;
  -webkit-mask: url("../assets/loop.png") center / contain no-repeat;
  mask: url("../assets/loop.png") center / contain no-repeat;
  -webkit-mask-mode: alpha; mask-mode: alpha;
}
.topbar-link {
  margin-left: auto;   /* keep the service button + account chip grouped on the right */
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap;
  font-family: var(--font-button); font-size: .82rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 7px 13px; border-radius: 999px;
}
.topbar-link:hover { filter: brightness(1.08); }
.topbar-link svg { width: 15px; height: 15px; flex: 0 0 auto; fill: currentColor; }
.topbar-link .tl-date { opacity: .85; }
.topbar-link .tl-date:not(:empty)::before { content: " ("; }
.topbar-link .tl-date:not(:empty)::after { content: ")"; }
/* Phone: logo-only brand, and the service button shows the date (no label). */
@media (max-width: 620px) {
  .topbar-inner { gap: 8px; padding: 10px 14px; }
  .brand { font-size: 1.05rem; gap: 7px; }
  .topbar-link { padding: 7px 10px; }
  .topbar-link .tl-label { display: none; }               /* keep only the date on phones */
  .topbar-link .tl-date { margin-left: 1px; opacity: 1; }
  .topbar-link .tl-date:not(:empty)::before, .topbar-link .tl-date:not(:empty)::after { content: ""; }
}

.theme-toggle {
  display: none;   /* dark mode is the default; toggle hidden */
  position: relative; flex: 0 0 auto;
  width: 54px; height: 28px; padding: 0;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); cursor: pointer;
}
.theme-toggle .t-ico { position: absolute; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; fill: var(--muted); }
.theme-toggle .t-sun { left: 8px; }
.theme-toggle .t-moon { right: 8px; }
.theme-toggle .knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--accent); transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.theme-toggle.is-dark .knob { transform: translateX(26px); }

.app { max-width: 940px; margin: 0 auto; padding: 20px; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 18px 44px; }
.empty { color: var(--muted); text-align: center; padding: 26px; }
.notice.error { background: #fdecec; color: #9b1c1c; border: 1px solid #f5c2c2; padding: 14px 16px; border-radius: var(--radius); }

.back {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); font-weight: 600; margin-bottom: 14px; font-size: .92rem;
}

/* ---- Landing ---- */
.hero { padding: 18px 0 10px; text-align: center; }
.hero-art { display: block; width: min(470px, 86%); height: auto; margin: 0 auto 6px; }
.hero h1 { margin: 6px 0 6px; font-size: 2.3rem; }
.hero .sub { color: var(--muted); margin: 0 auto 24px; max-width: 34ch; }

.selector {
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  max-width: 620px; margin: 0 auto; text-align: left;
}
.sel-field { display: flex; flex-direction: column; padding: 12px 16px; position: relative; }
.sel-field + .sel-field { border-left: 1px solid var(--border); }
.sel-field label { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.sel-field select, .sel-field input {
  border: none; background: transparent; color: var(--text);
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 600;
  padding: 2px 0; width: 100%; appearance: none; cursor: pointer;
}
.sel-field input { cursor: text; }
.sel-field select:focus, .sel-field input:focus { outline: none; }
.sel-field.disabled { opacity: .45; }
.sel-field.disabled select { cursor: not-allowed; }
.sel-field select:required:invalid, .sel-field .placeholder { color: var(--muted); font-weight: 500; }
.jump-msg { min-height: 1.3em; margin: 16px 2px 0; color: var(--accent); font-weight: 600; }
.tune-matches { max-width: 620px; margin: 14px auto 0; text-align: left; }
.tm-label { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--accent);
  font-family: var(--font-button); font-weight: 700; font-size: .82rem; padding: 6px 12px; border-radius: 999px;
}
.tm-chip:hover { border-color: var(--accent); }
.browse-cta { margin-top: 26px; }
.browse-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .selector { grid-template-columns: 1fr; }
  .sel-field + .sel-field { border-left: none; border-top: 1px solid var(--border); }
  .hero h1 { font-size: 1.9rem; }
}

/* ---- Browse ---- */
.list-head h1 { margin: 4px 0 2px; font-size: 1.75rem; }
.list-head .sub { margin: 0 0 14px; color: var(--muted); }
.search {
  width: 100%; padding: 13px 16px; font-size: 1rem; font-family: var(--font-body);
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow);
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 15px; border-radius: 999px; cursor: pointer; font-size: .86rem; font-weight: 600; font-family: var(--font-button); }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; cursor: pointer; }

.hymn-grid { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.card {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  padding: 8px 14px; box-shadow: var(--shadow); transition: border-color .12s ease;
}
.card:hover { border-color: var(--accent); }
.card-code {
  flex: 0 0 auto; min-width: 54px; text-align: center; align-self: center;
  font-family: var(--font-button); font-weight: 700; font-size: .8rem; letter-spacing: .01em;
  color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 9px;
}
.card-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.card-title { font-family: var(--font-title); font-weight: 600; font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; }
.card-title.ml { font-size: .98rem; line-height: 1.15; }
.card-sub { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.card-lyric { color: var(--muted); font-size: .82rem; font-style: italic; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; flex: 0 0 auto; }
.audio-ico { height: 12px; width: auto; display: block; fill: currentColor; }
.book-tag, .parts-tag, .tunes-tag, .code-tag, .page-tag { font-size: .67rem; font-weight: 700; letter-spacing: .01em; padding: 2px 8px; border-radius: 999px; }
.code-tag { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.page-tag { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); font-weight: 600; }
.hymn-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.book-tag { background: var(--accent-soft); color: var(--accent); }
.parts-tag { background: var(--good-soft); color: var(--good); display: inline-flex; align-items: center; padding: 4px 8px; }
.tunes-tag { background: #f6ecd8; color: var(--gold); }
@media (prefers-color-scheme: dark) { .tunes-tag { background: #33291699; } }

/* ---- Hymn view ---- */
.hymn-head { display: flex; gap: 15px; align-items: center; margin-bottom: 18px; }
.hymn-num {
  flex: 0 0 auto; align-self: flex-start; min-width: 62px; height: 62px; padding: 0 9px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600;
  font-size: 1.1rem; color: var(--accent); background: var(--accent-soft); border-radius: 15px;
}
/* English (or Manglish when no Malayalam) title -> Fraunces; Malayalam -> Noto Serif Malayalam. */
.hymn-head h1 { font-family: var(--font-display); margin: 0 0 3px; font-size: 1.5rem; }
.hymn-head h1.ml { font-family: "Noto Serif Malayalam", serif; font-size: 1.35rem; }
.hymn-sub { color: var(--muted); margin-bottom: 4px; }
.hymn-sub.ml { font-family: "Noto Serif Malayalam", serif; }

section.tune-picker, section.player, section.notation {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px;
}
section h2 { margin: 0 0 13px; font-size: 1.1rem; }
.player.muted { opacity: .9; }
.tune-peers {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 18px; font-size: .9rem; line-height: 1.9;
}
.tp-label { color: var(--muted); }
.tp-link { color: var(--accent); font-weight: 600; }
.tp-link:hover { text-decoration: underline; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: var(--font-button); font-weight: 600; padding: 9px 17px; border-radius: 999px; cursor: pointer; font-size: .9rem;
  transition: transform .12s ease, box-shadow .14s ease, background .14s ease, color .14s ease, border-color .14s ease;
}
.tab:hover:not(.disabled):not(.active) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 3px 11px color-mix(in srgb, var(--accent) 34%, transparent);
}
.tab.disabled { opacity: .4; cursor: not-allowed; }

.mix-hint { color: var(--muted); font-size: .84rem; margin: 10px 0 14px; }
.transport { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.controls-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.speeds { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: .85rem; }
.ctrl {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 8px 13px; border-radius: 10px; cursor: pointer; font-size: .85rem; font-weight: 600;
  font-family: var(--font-button);
  transition: transform .12s ease, box-shadow .14s ease, background .14s ease, color .14s ease, border-color .14s ease;
}
.ctrl:hover:not(:disabled):not(.active) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ctrl.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 9px color-mix(in srgb, var(--accent) 30%, transparent); }
.ctrl:disabled { opacity: .4; cursor: default; }
.play-btn {
  min-width: 118px; padding: 10px 20px; justify-content: center; border: none; color: #fff; font-size: .9rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 38%, transparent);
}
.play-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 46%, transparent); color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff) 0%, var(--accent) 100%); }
.play-btn:active { transform: translateY(0); }
.play-btn .icon { width: 1.05em; height: 1.05em; }
.time { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.seek { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat, var(--border);
  background-size: var(--seek, 0%) 100%; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.seek::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); cursor: pointer; }

.pdf-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pdf-nav { display: inline-flex; gap: 8px; align-items: center; }
.pageinfo { color: var(--muted); font-size: .85rem; }
.pdf-canvas-wrap { text-align: center; overflow: auto; }
.pdf-canvas { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

/* ---- This Sunday's service ---- */
.svc-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); color: #fff; border-radius: 14px; padding: 13px 18px;
  margin-bottom: 16px; box-shadow: var(--shadow); text-decoration: none;
}
.svc-cta:hover { filter: brightness(1.06); }
.svc-cta-txt { display: flex; flex-direction: column; gap: 1px; }
.svc-cta-k { font-family: var(--font-button); font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.svc-cta-t { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.svc-cta .icon { width: 22px; height: 22px; flex: 0 0 auto; fill: #fff; }

.svc-head { margin: 6px 0 18px; }
.svc-date { font-family: var(--font-button); font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.svc-head h1 { margin: 3px 0 4px; font-size: 1.7rem; }
.svc-week { color: var(--muted); font-size: .95rem; }
.svc-theme { margin: 12px 0 0; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 9px 13px; font-size: .95rem; }
.svc-theme-k { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }

.svc-lessons { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 22px; }
.lesson { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; }
.lesson-label { font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.lesson-ref { font-weight: 600; font-size: .95rem; }

.svc-h2 { font-size: 1.15rem; margin: 0 0 12px; }
.svc-list { display: flex; flex-direction: column; gap: 15px; }
.svc-group { display: flex; flex-direction: column; gap: 5px; }
.svc-occasion { font-family: var(--font-button); font-size: .73rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); padding-left: 2px; }
.card.is-plain { cursor: default; opacity: .65; }
.card.is-plain:hover { border-color: var(--border); }

/* ---- Auth (login / setup / request) ---- */
body.auth-gate .topbar-link, body.auth-gate .footer { display: none; }
.auth-wrap { display: flex; justify-content: center; padding: 6vh 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 24px; box-shadow: var(--shadow); }
.auth-card h1 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 4px; }
.auth-sub { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.auth-in { width: 100%; padding: 11px 13px; margin-bottom: 10px; font-size: 1rem; font-family: var(--font-body);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.auth-in:focus { outline: none; border-color: var(--accent); }
.auth-btn { width: 100%; padding: 11px; margin-top: 4px; font-family: var(--font-button); font-weight: 700;
  font-size: .95rem; color: #fff; background: var(--accent); border: none; border-radius: 10px; cursor: pointer; }
.auth-btn:hover:not(:disabled) { filter: brightness(1.06); } .auth-btn:disabled { opacity: .6; cursor: default; }
.auth-error { color: var(--accent); font-size: .88rem; min-height: 1.1em; margin-bottom: 6px; }
.auth-alt { margin-top: 14px; font-size: .88rem; color: var(--muted); text-align: center; }
.auth-link { background: none; border: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
textarea.auth-in { resize: vertical; }

/* ---- Account menu in the top bar ---- */
.topbar-account { position: relative; margin-left: 2px; flex: 0 0 auto; }
.acct-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.acct-btn:hover { border-color: var(--accent); color: var(--accent); }
.acct-btn svg { width: 18px; height: 18px; fill: currentColor; }
.acct-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 158px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.acct-menu-name { padding: 6px 10px 8px; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; background: none;
  border: none; color: var(--text); font-family: var(--font-button); font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.acct-menu-item:hover { background: var(--accent-soft); color: var(--accent); }

/* ---- Admin dashboard ---- */
.admin { max-width: 900px; }
.admin h1 { font-family: var(--font-display); font-size: 1.7rem; margin: 6px 0 16px; }
.admin-sec { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.admin-sec h2 { font-size: 1.15rem; margin: 0 0 10px; }
.admin-empty, .admin-dim { color: var(--muted); font-size: .88rem; }
.admin-toolbar { margin-bottom: 10px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--border); }
.admin-row:first-of-type { border-top: none; }
.admin-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.admin-btn { font-family: var(--font-button); font-weight: 600; font-size: .8rem; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.admin-btn:hover { border-color: var(--accent); }
.admin-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.acct-badge { display: inline-block; margin-left: 6px; font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 999px; }
.cred-note { background: var(--good-soft); border: 1px solid var(--good); border-radius: 10px; padding: 10px 13px; margin: 8px 0; font-size: .9rem; }
.cred-note code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.cred-hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.admin-table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .85rem; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.member { border-top: 1px solid var(--border); }
.member:first-of-type { border-top: none; }
.member .admin-row { border-top: none; }
.member-head { min-width: 0; }
.member-name { background: none; border: none; padding: 0; cursor: pointer; color: var(--text); font: inherit;
  display: inline-flex; align-items: center; gap: 5px; }
.member-name .caret { color: var(--muted); font-size: .8em; }
.member-name:hover strong { color: var(--accent); }
.member-detail { padding: 2px 0 12px 20px; }
.sess-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sess { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 12px; font-size: .82rem; padding: 7px 11px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.sess-when { color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .sess { grid-template-columns: 1fr; gap: 2px; } }
