/* Self-hosted Cinzel + EB Garamond (SIL OFL 1.1). See fonts/FONT-NOTICE.txt */
/* latin-ext */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/8vIJ7ww63mVu7gt7-GT7LEc.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/8vIJ7ww63mVu7gt79mT7.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/8vIJ7ww63mVu7gt7-GT7LEc.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/8vIJ7ww63mVu7gt79mT7.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL9wU6ingQ.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL95U6ingQ.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL9xU6ingQ.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL9-U6ingQ.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL9yU6ingQ.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL9zU6ingQ.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QL99U6g.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR4SDktYw.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GRxSDktYw.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR5SDktYw.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR2SDktYw.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR6SDktYw.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR7SDktYw.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR1SDk.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR4SDktYw.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GRxSDktYw.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR5SDktYw.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR2SDktYw.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR6SDktYw.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR7SDktYw.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/SlGUmQSNjdsmc35JDF1K5GR1SDk.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Imperial archive — dark stone, brass filigree, crimson seal. Server-rendered catalog. */

:root {
  --bg-deep: #050403;
  --bg-mid: #0c0908;
  --panel: #100c0b;
  --panel-raised: #161110;
  --border: #2a221c;
  --border-lit: #4a3d2e;
  --gold: #c9a962;
  --gold-dim: #7d6b45;
  --gold-glow: rgba(201, 169, 98, 0.12);
  --crimson: #5c1218;
  --crimson-bright: #8b1c28;
  --text: #ebe4d8;
  --muted: #9c9488;
  --link: #e8c97a;
  --font-display: "Cinzel", "Source Han Serif SC", "Noto Serif SC", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: "EB Garamond", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Garamond, "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
}

/* Subtle altar-light vignette + grain */
.sacral-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(92, 18, 24, 0.35), transparent 55%),
    radial-gradient(ellipse 90% 60% at 80% 100%, rgba(125, 107, 69, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0807 0%, var(--bg-deep) 45%, #030201 100%);
}

.sacral-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 40px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: #f0deb0;
  text-decoration: none;
}

/* ——— Banner ——— */
.banner {
  margin-bottom: 4px;
}

.banner-inner {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 18px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 28px var(--gold-glow);
}

.subhead {
  margin: 10px 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
}

.banner-ornament {
  height: 10px;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 3px double var(--gold-dim);
  opacity: 0.85;
}

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 10px 14px;
  border: 1px solid var(--border-lit);
  background: linear-gradient(180deg, var(--panel-raised) 0%, var(--panel) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav a:hover {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, #1c1814 0%, #12100e 100%);
  color: #f0deb0;
}

/* ——— Panels & cards ——— */
.card {
  position: relative;
  background: linear-gradient(165deg, var(--panel-raised) 0%, var(--panel) 40%, #0b0908 100%);
  border: 1px solid var(--border-lit);
  border-radius: 2px;
  padding: 18px 20px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(201, 169, 98, 0.06);
}

.card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 169, 98, 0.08);
  border-radius: 1px;
  pointer-events: none;
}

a.card:hover {
  border-color: var(--gold-dim);
  box-shadow:
    0 0 0 1px rgba(201, 169, 98, 0.15),
    0 20px 56px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(201, 169, 98, 0.1);
}

a.card {
  display: block;
  color: inherit;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Item detail previews: auto-fit collapses empty tracks so one card spans the wrap;
   slightly wider min column than chapter tiles when multiple previews exist. */
.grid.grid--item-detail {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.muted {
  color: var(--muted);
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-title--chapter {
  font-size: 1.1rem;
}

.page-title--card {
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.page-title--item {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.lead {
  margin-top: 8px;
  font-size: 1.05rem;
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 1px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}

a.pill:hover {
  border-color: var(--gold);
  color: #f0deb0;
  background: rgba(92, 18, 24, 0.25);
}

.pill.is-active {
  background: rgba(92, 18, 24, 0.45);
  border-color: var(--crimson-bright);
  color: #f5e6c8;
}

span.pill.pill--disabled {
  cursor: not-allowed;
  opacity: 0.38;
  border-color: rgba(212, 175, 55, 0.22);
  color: var(--muted);
  pointer-events: none;
}

.cta {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 1px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5efe4;
  background: linear-gradient(180deg, var(--crimson-bright) 0%, var(--crimson) 55%, #3a0a0e 100%);
  border: 1px solid #6b2028;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cta:hover {
  filter: brightness(1.08);
  color: #fff;
}

.cta-secondary {
  background: linear-gradient(180deg, #2a2622 0%, #1a1715 100%);
  border-color: var(--border-lit);
  color: var(--gold);
}

.cta-secondary:hover {
  border-color: var(--gold-dim);
  color: #f0deb0;
}

.img-fullsize {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: zoom-in;
}

.img-fullsize:hover .img,
.img-fullsize:focus-visible .img {
  border-color: var(--gold-dim);
}

.img-fullsize:focus-visible {
  outline: 2px solid var(--gold-dim);
  outline-offset: 3px;
  border-radius: 2px;
}

.img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1px;
  border: 1px solid var(--border-lit);
  background: var(--bg-mid);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 98, 0.06);
}

.img.img-qr {
  max-width: 380px;
  aspect-ratio: 1 / 1;
}

input[type="text"] {
  width: 100%;
  max-width: 520px;
  padding: 11px 14px;
  border-radius: 1px;
  border: 1px solid var(--border-lit);
  background: var(--bg-mid);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}

input[type="text"]::placeholder {
  color: #6a6258;
  font-style: italic;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(201, 169, 98, 0.25);
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.row--start {
  align-items: flex-start;
}

.split-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.form-reset {
  margin: 0;
}

.form-reset--grow {
  flex: 1;
  min-width: 0;
}

.mt-6 {
  margin-top: 6px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-14 {
  margin-top: 14px;
}

.tag-row-label {
  font-size: 0.95rem;
}

/* Chapter browse: tag pills collapsible on narrow viewports */
.tag-filter-panel {
  border: 1px solid rgba(201, 169, 98, 0.12);
  border-radius: 1px;
  padding: 0;
  background: rgba(0, 0, 0, 0.18);
}

.tag-filter-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-body);
}

.tag-filter-panel__summary::-webkit-details-marker {
  display: none;
}

.tag-filter-panel__summary-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.tag-filter-panel__summary-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.tag-filter-panel__summary-meta {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.tag-filter-panel__chevron {
  flex-shrink: 0;
  width: 0.55em;
  height: 0.55em;
  border-right: 2px solid var(--gold-dim);
  border-bottom: 2px solid var(--gold-dim);
  transform: rotate(45deg);
  margin-top: -0.2em;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tag-filter-panel[open] .tag-filter-panel__chevron {
  transform: rotate(225deg);
  margin-top: 0.15em;
  border-color: var(--gold);
}

.tag-filter-panel__body {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(201, 169, 98, 0.08);
}

.tag-filter-panel[open] .tag-filter-panel__body {
  border-top-color: transparent;
  padding-top: 4px;
}

.tag-filter-panel__body .row {
  gap: 10px;
}

@media (min-width: 768px) {
  .tag-filter-panel {
    border: none;
    background: transparent;
  }

  .tag-filter-panel__summary {
    padding: 0 0 8px;
  }

  /* After JS syncs open state; keeps pills usable without trapping clicks on summary */
  .tag-filter-panel.tag-filter-panel--desktop-sync .tag-filter-panel__summary {
    cursor: default;
    pointer-events: none;
  }

  .tag-filter-panel__chevron {
    display: none;
  }

  .tag-filter-panel__body {
    padding: 0;
    border-top: none;
  }

  .tag-filter-panel[open] .tag-filter-panel__body {
    padding-top: 0;
  }
}

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spacer-md {
  height: 16px;
}

.spacer-lg {
  height: 32px;
}

.footer-note {
  margin: 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
}

code {
  font-size: 0.92em;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 1px;
  color: var(--gold);
}

@media (max-width: 520px) {
  .wrap {
    padding: 20px 16px 32px;
  }

  .brand {
    font-size: 1.2rem;
    letter-spacing: 0.12em;
  }
}

/* Staff analytics (/dashboard/) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.staff-dashboard {
  max-width: 960px;
  margin: 0 auto;
}

.staff-dashboard-header {
  margin-bottom: 1.5rem;
}

.staff-dashboard-title {
  font-family: var(--font-display, "Cinzel", serif);
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.staff-dashboard-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.staff-dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
}

.staff-dashboard-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.staff-dashboard-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.staff-dashboard-select,
.staff-dashboard-input {
  font: inherit;
  padding: 0.35rem 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 2px;
  min-width: 6rem;
}

.staff-dashboard-btn {
  font: inherit;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  background: rgba(201, 169, 98, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 2px;
}

.staff-dashboard-btn:hover {
  background: rgba(201, 169, 98, 0.35);
}

.staff-dashboard-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.staff-dashboard-links a {
  color: var(--gold);
}

.staff-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.staff-dashboard-card {
  padding: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.staff-dashboard-card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.staff-dashboard-card-value {
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  margin: 0.35rem 0;
  color: var(--text);
}

.staff-dashboard-card-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.staff-dashboard-section {
  margin-bottom: 2rem;
}

.staff-dashboard-h2 {
  font-family: var(--font-display, "Cinzel", serif);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.staff-dashboard-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.staff-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.staff-dashboard-table th,
.staff-dashboard-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.staff-dashboard-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-weight: 600;
}

.staff-dashboard-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.staff-dashboard-table .path-cell code {
  word-break: break-all;
}

.staff-dashboard-empty {
  color: var(--muted);
  font-style: italic;
}

.staff-dashboard-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.staff-dashboard-footnote a {
  color: var(--gold);
}

/* Staff import (/import/) */
.staff-import {
  max-width: 960px;
  margin: 0 auto;
  /* Native <select> list follows UA color scheme; dark avoids light-grey popup + pale text */
  color-scheme: dark;
}

.staff-import-header {
  margin-bottom: 1.5rem;
}

.staff-import-title {
  font-family: var(--font-display, "Cinzel", serif);
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.staff-import-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.staff-import-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.staff-import-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.staff-import-links a {
  color: var(--gold);
}

.staff-import-section {
  margin-bottom: 2rem;
}

.staff-import-h2 {
  font-family: var(--font-display, "Cinzel", serif);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.staff-import-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.staff-import-select {
  font: inherit;
  max-width: 32rem;
  padding: 0.35rem 0.5rem;
  background-color: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 2px;
}

.staff-import-select option {
  background-color: var(--bg-deep);
  color: var(--text);
}

.staff-import-select option[value=""] {
  color: var(--muted);
}

.staff-import-dropzone {
  min-height: 8rem;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.staff-import-dropzone:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.staff-import-dropzone-active {
  border-color: var(--gold);
  background: rgba(201, 169, 98, 0.08);
}

.staff-import-dropzone-uploading {
  pointer-events: none;
  opacity: 0.65;
  cursor: wait;
}

.staff-import-upload-progress {
  margin-top: 1rem;
  padding: 0.75rem 0;
}

.staff-import-upload-progress-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.staff-import-upload-progress-bar {
  display: block;
  width: 100%;
  height: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  accent-color: var(--gold, #c9a962);
}

.staff-import-upload-progress-detail {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.staff-import-dropzone-text {
  margin: 0;
  color: var(--muted);
}

.staff-import-file-input {
  display: none;
}

.staff-import-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.staff-import-queue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.staff-import-btn {
  font: inherit;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  background: rgba(201, 169, 98, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 2px;
}

.staff-import-btn:hover {
  background: rgba(201, 169, 98, 0.35);
}

.staff-import-btn-danger {
  border-color: #c44;
  color: #e88;
  background: rgba(200, 68, 68, 0.12);
}

.staff-import-btn-danger:hover {
  background: rgba(200, 68, 68, 0.22);
}

.staff-import-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.staff-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.staff-import-table th,
.staff-import-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.staff-import-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-weight: 600;
}

.staff-import-table .num {
  font-variant-numeric: tabular-nums;
}

.staff-import-empty {
  color: var(--muted);
  font-style: italic;
}
