/* Self-hosted copies of the Google Fonts the site has always used (Cinzel, EB Garamond), latin + latin-ext only. */
/* latin-ext */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cinzel-latin-ext-normal.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: 400;
  font-display: swap;
  src: url('fonts/cinzel-latin-normal.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: 600;
  font-display: swap;
  src: url('fonts/cinzel-latin-ext-normal.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/cinzel-latin-normal.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/cinzel-latin-ext-normal.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/cinzel-latin-normal.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: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-ext-italic.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/eb-garamond-latin-italic.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: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-ext-normal.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/eb-garamond-latin-normal.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: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-ext-normal.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: 500;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-normal.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;
}

/* ============================================================
   Argent Gryphon — styles.css
   ============================================================ */

/* --- Google Fonts loaded via <link> in index.html <head> --- */

/* --- CSS Variables --- */
:root {
    --color-bg-panel:       rgba(10, 8, 4, 0.72);
    --color-gold:           #ffd27a;
    --color-gold-light:     #ffe9b0;
    --color-gold-dim:       #c9a040;
    --color-text:           #e8dfc8;
    --color-text-muted:     #b0a080;
    --color-nav-bg:         rgba(5, 4, 2, 0.75);
    --color-nav-btn:        rgba(235, 220, 185, 0.92);
    --color-nav-btn-hover:  #ffd27a;

    --font-display:         'Cinzel', 'Georgia', serif;
    --font-body:            'EB Garamond', 'Georgia', serif;

    --radius-panel:         16px;
    --radius-btn:           8px;
    --radius-nav:           14px;

    --blur-panel:           blur(8px);
    --transition-fast:      0.2s ease;

    --panel-width:          640px;
    --panel-padding:        36px 40px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust:    100%;
    text-size-adjust:         100%;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    min-height: 100vh;
}

/* ============================================================
   Fixed Background
   ============================================================ */
.bg-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url("img/main/AGbg.webp") no-repeat center center;
    background-size: cover;
    transition: filter 0.4s ease;
}

.bg-fixed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("img/main/AGbgd.webp") no-repeat center center;
    background-size: cover;
    opacity: 0;
    filter: brightness(1) contrast(1) saturate(1);
    transition: opacity 0.5s ease, filter 1.2s ease;
}

/* ============================================================
   Dark Magic — Background States
   ============================================================ */
.bg-fixed.dark-magic::after {
    opacity: 1;
    filter: brightness(1) contrast(1) saturate(1);
}

.bg-fixed.dark-magic-anim {
    animation: darkPulse 1.6s infinite;
}

.bg-fixed.dark-magic-anim::after {
    transition: opacity 0.5s ease;
    animation: darkBgFlicker 1.6s infinite;
}

@keyframes darkBgFlicker {
    0%   { opacity: 1;    filter: brightness(1.0)  contrast(1.1)  saturate(1.2); }
    15%  { opacity: 0.88; filter: brightness(0.88) contrast(1.22) saturate(1.35) hue-rotate(-8deg); }
    30%  { opacity: 0.96; filter: brightness(1.0)  contrast(1.05) saturate(1.15); }
    50%  { opacity: 0.85; filter: brightness(0.85) contrast(1.28) saturate(1.45) hue-rotate(-12deg); }
    65%  { opacity: 0.93; filter: brightness(0.95) contrast(1.08) saturate(1.2); }
    80%  { opacity: 0.82; filter: brightness(0.83) contrast(1.25) saturate(1.4)  hue-rotate(-10deg); }
    100% { opacity: 1;    filter: brightness(1.0)  contrast(1.1)  saturate(1.2); }
}

@keyframes darkPulse {
    0%   { filter: brightness(0.95) contrast(1.05); }
    25%  { filter: brightness(0.85) contrast(1.12); }
    50%  { filter: brightness(0.92) contrast(1.0); }
    75%  { filter: brightness(0.84) contrast(1.14); }
    100% { filter: brightness(0.95) contrast(1.05); }
}

/* ============================================================
   Dark Magic — Scroll Icon (shake + glow while hovering)
   ============================================================ */
.dark-magic-active .member-points-icon {
    animation: scrollShake 0.25s infinite, scrollGlow 1.6s infinite;
}

@keyframes scrollShake {
    0%   { transform: translate(0, 0)      rotate(0deg); }
    20%  { transform: translate(-2px, 1px) rotate(-3deg); }
    40%  { transform: translate(2px, -1px) rotate(3deg); }
    60%  { transform: translate(-1px, 2px) rotate(-2deg); }
    80%  { transform: translate(1px, -2px) rotate(2deg); }
    100% { transform: translate(0, 0)      rotate(0deg); }
}

@keyframes scrollGlow {
    0%   { filter: drop-shadow(0 0 4px  rgba(120, 0, 200, 0.6)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); }
    25%  { filter: drop-shadow(0 0 8px  rgba(180, 0, 255, 0.9)) drop-shadow(0 0 16px rgba(100, 0, 180, 0.5)); }
    50%  { filter: drop-shadow(0 0 5px  rgba(80,  0, 160, 0.7)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); }
    75%  { filter: drop-shadow(0 0 10px rgba(200, 50, 255, 1.0)) drop-shadow(0 0 20px rgba(120, 0, 200, 0.6)); }
    100% { filter: drop-shadow(0 0 4px  rgba(120, 0, 200, 0.6)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); }
}

/* ============================================================
   Layout
   ============================================================ */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 48px;
}

/* ============================================================
   Logo
   ============================================================ */
.logo {
    width: 180px;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
}

/* ============================================================
   Navigation Bar
   ============================================================ */
.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background: rgba(5, 4, 2, 0.9);
    padding: 14px 28px;
    border-radius: var(--radius-nav);
    border: 1px solid rgba(255, 210, 122, 0.15);
    margin-bottom: 24px;
    /* Sit above the content box so the dropdown menu overflows cleanly. */
    position: relative;
    z-index: 100;
}

.discord-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: -16px auto 16px;
}

/* ============================================================
   Discord link (always visible, under the navbar)
   ============================================================ */
.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px 4px 6px;
    border-radius: var(--radius-btn);
    border: none;
    background: rgba(5, 4, 2, 0.9);
    color: var(--color-gold-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.discord-link[hidden] { display: none; }
.discord-link:hover {
    color: #fff;
    transform: translateY(-1px);
}
.discord-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

/* ============================================================
   Navigation Buttons
   ============================================================ */
.nav-button {
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    background: var(--color-nav-btn);
    color: #1a1208;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-button:hover {
    background: var(--color-nav-btn-hover);
    color: #0d0900;
    transform: translateY(-1px);
}

.nav-button:active {
    transform: translateY(0);
}

/* Active page — filled buttons stay gold; show a subtle ring so the
   current destination reads at a glance without changing the layout. */
.nav-button.active {
    background: var(--color-nav-btn-hover);
    color: #0d0900;
    box-shadow: 0 0 0 1px var(--color-gold-dim), 0 0 14px rgba(255, 210, 122, 0.25);
}

/* ============================================================
   Navbar dropdown group ("Chronicle")
   ============================================================ */
.nav-group {
    position: relative;
    display: inline-flex;
}

.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.nav-caret {
    font-size: 0.7em;
    line-height: 1;
    transition: transform var(--transition-fast);
}
.nav-group.open .nav-caret {
    transform: rotate(180deg);
}

.nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: rgba(20, 15, 8, 0.97);
    border: 1px solid rgba(255, 210, 122, 0.2);
    border-radius: var(--radius-btn);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 50;
}
.nav-group.open .nav-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Menu rows read as quiet text links, not bright filled pills */
.nav-menu-item {
    text-align: left;
    padding: 9px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}
.nav-menu-item:hover {
    background: rgba(255, 210, 122, 0.12);
    color: var(--color-gold-light);
}
.nav-menu-item.active {
    background: rgba(255, 210, 122, 0.16);
    color: var(--color-gold);
}

/* ============================================================
   Content Panel
   ============================================================ */
.content-box {
    background: rgba(10, 8, 4, 0.78);
    padding: var(--panel-padding);
    border-radius: var(--radius-panel);
    border: 1px solid rgba(255, 210, 122, 0.12);
    width: var(--panel-width);
    max-width: 96vw;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    /* Isolate this blur layer so switching pages doesn't re-composite the
       whole background behind it (the Chromium/Firefox flicker source). */
    isolation: isolate;
    transform: translateZ(0);
}

/* ============================================================
   Pages (show/hide)
   ============================================================ */
.page        { display: none; }
.page.active { display: block; }

/* ============================================================
   Typography
   ============================================================ */
h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-gold-light);
    letter-spacing: 0.04em;
    margin: 0 0 8px;
}

p {
    margin-bottom: 14px;
    color: var(--color-text);
}

p:last-child { margin-bottom: 0; }

em     { color: var(--color-text-muted); font-style: italic; }
strong { color: var(--color-gold-light); font-weight: 500; }

/* Status messages: failed loads and empty sections */
.load-error { color: #ff8888; }
.empty-note { color: var(--color-text-muted); font-style: italic; }

/* ============================================================
   Section Divider
   ============================================================ */
.section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 210, 122, 0.12);
}

.section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ============================================================
   Shared — Row Card (Codex, Ranks, Members)
   ============================================================ */
.codex-item,
.rank-item,
.member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 210, 122, 0.04);
    border: 1px solid rgba(255, 210, 122, 0.08);
    width: 100%;
    transition: background var(--transition-fast);
}

.codex-item:last-child,
.rank-item:last-child,
.member-card:last-child { margin-bottom: 0; }

.codex-item:hover,
.rank-item:hover,
.member-card:hover { background: rgba(255, 210, 122, 0.08); }

/* Members — rank group header (badge + name, sits above each rank's block of cards) */
.member-rank-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 210, 122, 0.18);
}

.member-rank-header:first-child { margin-top: 0; }

.member-rank-header img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.member-rank-header h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.05em;
    margin: 0;
}

/* Shared — Badge / Icon */
.rank-icon,
.member-badge {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    flex-grow: 0;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

/* Shared — Text column */
.rank-text,
.member-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-width: 0;
}

/* ============================================================
   Codex
   ============================================================ */
.codex-item {
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.codex-icon {
    width: 44px;
    height: 44px;
    margin-top: 3px;
    opacity: 0.9;
    flex-shrink: 0;
}

.codex-item strong {
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* ============================================================
   Diplomacy — Treaty Block
   ============================================================ */

/* ============================================================
   Ranks
   ============================================================ */
.rank-text strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    color: var(--color-gold-light);
    margin-bottom: 1px;
}

.rank-text span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.4;
    overflow-wrap: break-word;
}

/* Ranks — Branching paths (Chancery / Legion) */
.rank-paths {
    display: grid;
    grid-template-columns: repeat(var(--rank-cols, 2), 1fr);
    grid-template-rows: auto repeat(3, minmax(158px, 1fr));
    column-gap: 22px;
    row-gap: 8px;
    margin-bottom: 10px;
    position: relative;
    align-items: stretch;
}

/* Central "fork" divider between the two paths */
.rank-paths::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 210, 122, 0.28) 12%,
        rgba(255, 210, 122, 0.28) 88%,
        transparent
    );
    pointer-events: none;
}

.rank-path-header {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-gold);
    padding-bottom: 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255, 210, 122, 0.22);
}

/* Secondary line under a path header (e.g. "for lore") */
.rank-path-sublabel {
    display: block;
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--color-text-muted);
    margin-top: 3px;
}

/* Small glyph flanking each path header label */
.rank-path-label::before,
.rank-path-label::after {
    content: "\2726";
    display: inline-block;
    margin: 0 8px;
    color: var(--color-gold-dim);
    font-size: 0.7em;
    vertical-align: middle;
}

/* Cards inside the paths stretch to fill their (uniform) grid row */
.rank-paths .rank-item {
    margin-bottom: 0;
    height: 100%;
    align-items: flex-start;
}

.rank-item-empty {
    background: transparent;
    border-color: transparent;
}

.rank-affiliate-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-gold-dim);
    margin: 8px 0 10px;
}

.rank-fork-note {
    text-align: center;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.86rem;
    color: var(--color-text-muted);
    margin: 4px 0 12px;
}

/* ============================================================
   Members
   ============================================================ */
.member-name {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-gold-light);
    letter-spacing: 0.02em;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.member-rank-label {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--color-gold-dim);
    line-height: 1.4;
}

.member-points {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.member-points-number {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
}

.member-points-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

/* Sheet icon — binder icon linking to character sheet */
.sheet-icon-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.sheet-icon-link:hover {
    opacity: 1;
    transform: scale(1.12);
}

.sheet-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* ============================================================
   Journal
   ============================================================ */

.journal-entry-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 210, 122, 0.12);
}

.journal-entry-body p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: 12px;
}

.journal-entry-body p:last-child { margin-bottom: 0; }

/* ============================================================
   Character Sheet
   ============================================================ */
.char-back {
    display: inline-block;
    margin-bottom: 24px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    color: var(--color-gold-dim);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.char-back::before { content: '‹ '; }

.char-back:hover {
    opacity: 1;
    color: var(--color-gold);
}

.char-header { margin-bottom: 24px; }

.char-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.08em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
}

.char-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.char-badge {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.char-rank {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.07em;
    color: var(--color-gold-dim);
}

.char-separator {
    color: rgba(255, 210, 122, 0.25);
    font-size: 0.75rem;
}

.char-order {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.char-portrait-wrap {
    width: 100%;
    margin-bottom: 28px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 210, 122, 0.14);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
    line-height: 0;
}

.char-portrait {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.char-rule {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        rgba(255, 210, 122, 0.25) 20%,
        rgba(255, 210, 122, 0.25) 80%,
        transparent);
    margin: 24px 0;
}

.char-body p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.char-body p:last-child { margin-bottom: 0; }

/* ============================================================
   Homepage Blocks
   ============================================================ */
.home-figure {
    margin: 16px 0;
    text-align: center;
    line-height: 0;
}

.home-img-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.home-img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 210, 122, 0.14);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
    cursor: crosshair;
    touch-action: none; /* lets JS handle touch so page won't scroll during zoom */
}

/* Magnifier lens */
.map-magnifier {
    position: fixed;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px solid var(--color-gold-dim);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.6),
        0 0 28px rgba(0,0,0,0.7),
        inset 0 0 12px rgba(0,0,0,0.4);
    pointer-events: none;
    display: none;
    overflow: hidden;
    z-index: 9999;
    background-repeat: no-repeat;
}

/* Crosshair lines */
.map-magnifier::before,
.map-magnifier::after {
    content: '';
    position: absolute;
    background: rgba(255, 210, 122, 0.3);
    pointer-events: none;
    z-index: 2;
}
.map-magnifier::before {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}
.map-magnifier::after {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.home-img-caption {
    display: block;
    margin-top: 10px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-style: italic;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.4;
}

.home-quote {
    margin: 20px 0;
    padding: 14px 20px;
    border-left: 3px solid var(--color-gold-dim);
    background: rgba(255, 210, 122, 0.04);
    border-radius: 0 8px 8px 0;
}

.home-quote p {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.home-quote cite {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--color-gold-dim);
    font-style: normal;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 680px) {
    :root { --panel-padding: 20px 16px; }

    h2 { font-size: 1.4rem; }

    .navbar { padding: 12px 16px; }

    .nav-button {
        font-size: 13px;
        padding: 8px 14px;
    }

    /* Keep the dropdown from running off-screen on narrow viewports */
    .nav-menu {
        min-width: 160px;
        max-width: calc(100vw - 32px);
    }
    .nav-menu-item {
        font-size: 13px;
        padding: 10px 14px;
    }

    .rank-icon,
    .member-badge {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .rank-text strong,
    .member-name { font-size: 0.82rem; }

    .rank-text span,
    .member-rank-label { font-size: 0.78rem; }

    /* Phones: keep the two paths side by side, but stack each card vertically
       (badge on top, text below) so descriptions get the full column width. */
    .rank-paths {
        column-gap: 10px;
        row-gap: 8px;
    }
    .rank-paths .rank-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: 12px 10px;
    }
    .rank-paths .rank-item .rank-text {
        align-items: center;
    }
    .rank-path-header { font-size: 0.74rem; letter-spacing: 0.03em; }
    .rank-path-label::before,
    .rank-path-label::after { margin: 0 3px; }
    .rank-path-sublabel { font-size: 0.66rem; }

    .member-points-number { font-size: 0.95rem; }

    .member-points-icon {
        width: 17px;
        height: 17px;
    }

    .journal-entry-title { font-size: 0.9rem; }

    .journal-entry-body p { font-size: 0.93rem; }

    .char-name { font-size: 1.55rem; }
}

/* ============================================================
   Library
   ============================================================ */

/* ── Series grid ── */
.library-intro {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.library-series-item { cursor: pointer; }

.library-series-count {
    font-family: var(--font-body);
    font-size: 0.82em;
    font-style: italic;
    color: var(--color-text-muted);
}

/* ── Series reader ── */
.lib-reader {
    display: flex;
    flex-direction: column;
    gap: 1.1em;
}

.lib-reader-bigbook,
.lib-series-bigbook {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

/* ── Book shelf ── */
.lib-shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55em;
    align-items: flex-end;
    padding: 0.6em 0;
}

.lib-book-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    position: relative;
    display: inline-block;
    transition: transform var(--transition-fast);
}

.lib-book-btn img {
    width: 40px;
    height: 40px;
    display: block;
    filter: brightness(0.85);
    transition: filter var(--transition-fast);
}

.lib-book-btn:hover img { filter: brightness(1); }

.lib-book-btn.active img {
    filter: brightness(1.15) drop-shadow(0 0 5px rgba(255, 210, 122, 0.7));
}

.lib-book-btn:hover  { transform: translateY(-3px); }
.lib-book-btn.active { transform: translateY(-4px); }

/* ── Book shelf wrapper ── */
.lib-nav {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* ============================================================
   Diplomacy
   ============================================================ */

.dip-category-pill {
    color: var(--color-gold-dim);
    font-style: italic;
}

.dip-doc-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.mis-doc-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.dip-article {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dip-article-desc {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.dip-category-badge {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold-dim);
    background: rgba(255, 210, 122, 0.08);
    border: 1px solid rgba(255, 210, 122, 0.2);
    border-radius: 4px;
    padding: 2px 10px;
}

/* ============================================================
   Highscores page
   ------------------------------------------------------------
   ============================================================ */
.hs-intro { color: var(--color-text-muted); font-style: italic; margin-bottom: 18px; }
.hs-intro strong { font-style: normal; }

/* Status strip: progress bar + label + refresh */
.hs-status {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    margin-bottom: 26px; padding: 12px 14px;
    border: 1px solid rgba(255, 210, 122, 0.14); border-radius: var(--radius-btn);
    background: rgba(0, 0, 0, 0.35);
}
.hs-status-text { flex: 1 1 260px; font-size: 0.95rem; color: var(--color-text-muted); }
.hs-status-text.is-error { color: #ff8888; }
.hs-bar {
    flex: 1 1 100%; height: 6px; border-radius: 3px; overflow: hidden;
    background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 210, 122, 0.15);
}
.hs-bar-fill {
    height: 100%; width: 0; background: linear-gradient(90deg, #c9a040, #ffd27a);
    transition: width 0.25s ease;
}
.hs-status.is-done .hs-bar { display: none; }
.hs-refresh {
    font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.06em;
    color: var(--color-gold-light); background: rgba(255, 210, 122, 0.06);
    border: 1px solid rgba(255, 210, 122, 0.25); border-radius: var(--radius-btn);
    padding: 7px 14px; cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.hs-refresh:hover:not(:disabled) { background: rgba(255, 210, 122, 0.14); border-color: rgba(255, 210, 122, 0.45); }
.hs-refresh:focus-visible { outline: 2px solid var(--color-gold-dim); outline-offset: 2px; }
.hs-refresh:disabled { opacity: 0.45; cursor: default; }

/* Category grid */
.hs-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px 28px;
}
.hs-cat h3 {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding-bottom: 6px; margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 210, 122, 0.22);
}
.hs-cat h3 small {
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 400;
    letter-spacing: 0; color: var(--color-text-muted); font-style: italic;
}
.hs-cat.is-pending h3 { opacity: 0.55; }

.hs-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.45; table-layout: fixed; }
.hs-table col.c-pos   { width: 2em; }
.hs-table col.c-score { width: 6.5em; }
.hs-table col.c-world { width: 5em; }
.hs-table th {
    font-family: var(--font-display); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.06em;
    color: var(--color-gold-dim); text-align: left; padding: 2px 6px 6px;
}
.hs-table td { padding: 5px 6px; border-top: 1px solid rgba(255, 210, 122, 0.08); vertical-align: baseline; }
.hs-table tr:first-child td { border-top: none; }
.hs-table .pos   { color: var(--color-text-muted); }
.hs-table .name  { overflow: hidden; text-overflow: ellipsis; }
.hs-table .name a { color: var(--color-text); text-decoration: none; }
.hs-table .name a:hover { color: var(--color-gold); text-decoration: underline; }
.hs-table .voc   { display: block; font-size: 0.8rem; color: var(--color-text-muted); font-style: italic; }
.hs-table .score { text-align: right; font-weight: 500; color: var(--color-gold-light); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hs-table .world { text-align: right; color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hs-table th.score, .hs-table th.world { text-align: right; }
/* The category leader wears gold */
.hs-table tr.lead .name a { color: var(--color-gold); }
.hs-table tr.lead .pos    { color: var(--color-gold); }
.hs-note { color: var(--color-text-muted); font-style: italic; font-size: 0.9rem; padding: 6px 6px 0; }
.hs-note.is-error { color: #ff8888; font-style: normal; }
.hs-note button {
    background: none; border: none; padding: 0; margin-left: 6px; cursor: pointer;
    color: var(--color-gold-dim); font: inherit; text-decoration: underline;
}

.hs-footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255, 210, 122, 0.12);
    font-size: 0.85rem; color: var(--color-text-muted); font-style: italic; }
.hs-footer a { color: var(--color-gold-dim); }

@media (prefers-reduced-motion: reduce) { .hs-bar-fill { transition: none; } }
@media (max-width: 680px) { .hs-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Screenshots — thumbnail grid
   ============================================================ */
.ss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.ss-thumb {
    display: block; width: 100%; padding: 0; margin: 0;
    aspect-ratio: 16 / 10; overflow: hidden;
    border: 1px solid rgba(255, 210, 122, 0.18);
    border-radius: var(--radius-btn);
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: border-color var(--transition-fast), transform 0.12s ease;
}
.ss-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    opacity: 0; transition: opacity 0.3s ease;
}
.ss-thumb img.is-loaded { opacity: 1; }
.ss-thumb:hover, .ss-thumb:focus-visible {
    border-color: var(--color-gold);
    transform: translateY(-2px);
    outline: none;
    box-shadow: 0 0 0 1px var(--color-gold-dim), 0 4px 18px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   Screenshots — full-screen viewer
   ============================================================ */
.ss-viewer {
    position: fixed; inset: 0; z-index: 1000;
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    grid-template-rows: 1fr auto;
    align-items: center;
    background: rgba(6, 4, 2, 0.94);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    touch-action: pan-y;
    -webkit-user-select: none; user-select: none;
}
.ss-viewer[hidden] { display: none; }
.ss-stage {
    grid-column: 2; grid-row: 1;
    position: relative;
    height: calc(100vh - 88px); height: calc(100dvh - 88px);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.ss-stage img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    transition: opacity 0.18s ease, transform 0.18s ease;
    will-change: transform;
}
.ss-stage img.is-loading { opacity: 0.25; }
.ss-spinner {
    position: absolute; width: 38px; height: 38px;
    border: 3px solid rgba(255, 210, 122, 0.25); border-top-color: var(--color-gold);
    border-radius: 50%; animation: ss-spin 0.8s linear infinite;
}
.ss-spinner[hidden] { display: none; }
@keyframes ss-spin { to { transform: rotate(360deg); } }

.ss-nav, .ss-close {
    background: rgba(255, 210, 122, 0.06);
    border: 1px solid rgba(255, 210, 122, 0.25);
    color: var(--color-gold-light);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.ss-nav:hover, .ss-close:hover { background: rgba(255, 210, 122, 0.16); border-color: rgba(255, 210, 122, 0.5); }
.ss-nav:focus-visible, .ss-close:focus-visible { outline: 2px solid var(--color-gold-dim); outline-offset: 2px; }
.ss-nav {
    grid-row: 1; justify-self: center; z-index: 2;
    width: 44px; height: 44px;
    font-family: var(--font-body); font-size: 2rem; line-height: 1;
    padding: 0 0 4px;
}
.ss-prev { grid-column: 1; }
.ss-next { grid-column: 3; }
.ss-nav:disabled { opacity: 0.25; cursor: default; }
.ss-close {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    width: 40px; height: 40px;
    font-family: var(--font-body); font-size: 1.7rem; line-height: 1;
}
.ss-bar {
    grid-column: 1 / -1; grid-row: 2;
    min-height: 56px; padding: 10px 70px 18px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-align: center;
}
.ss-count {
    font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.08em;
    color: var(--color-gold-dim);
}
.ss-desc {
    max-width: 60ch; font-size: 0.92rem; color: var(--color-text); line-height: 1.5;
}
.ss-desc[hidden] { display: none; }
.ss-meta {
    font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.06em;
    color: var(--color-gold-dim); opacity: 0.85;
}

@media (max-width: 680px) {
    .ss-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
    .ss-viewer { grid-template-columns: 0 1fr 0; }
    .ss-stage { height: calc(100vh - 80px); height: calc(100dvh - 80px); }
    .ss-stage img { border-radius: 0; }
    /* Arrows sit over the image edges on small screens; swiping does most of the work */
    .ss-nav {
        position: absolute; top: 50%; transform: translateY(-50%);
        width: 38px; height: 38px; font-size: 1.6rem;
        background: rgba(6, 4, 2, 0.55);
    }
    .ss-prev { left: 8px; }
    .ss-next { right: 8px; }
    .ss-bar { padding: 8px 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .ss-thumb, .ss-thumb img, .ss-stage img { transition: none; }
}

/* ============================================================
   Library — sealed books
   ============================================================ */
.library-series-item.is-locked .lib-series-bigbook { opacity: 0.55; }
.library-series-count .lock { margin-right: 4px; }

.lib-seal { margin: 18px 0 26px; padding: 18px 20px; text-align: center;
    border: 1px solid rgba(255, 210, 122, 0.2); border-radius: var(--radius-btn); background: rgba(0, 0, 0, 0.3); }
.lib-seal-text { font-style: italic; color: var(--color-text-muted); margin-bottom: 4px; }
.lib-seal-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.lib-seal-btn {
    font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.06em;
    color: var(--color-gold-light); background: rgba(255, 210, 122, 0.12);
    border: 1px solid var(--color-gold-dim); border-radius: var(--radius-btn); padding: 8px 18px; cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.lib-seal-btn:hover:not(:disabled) { background: rgba(255, 210, 122, 0.22); }
.lib-seal-btn:disabled { opacity: 0.5; cursor: default; }

/* Discord role gate */
a.lib-seal-btn { display: inline-block; text-decoration: none; }

/* ── Rank requirement tag (badge + name) ── */
.rank-req {
    display: inline-flex; align-items: center; gap: 5px;
    margin-left: 10px; padding: 1px 8px 1px 4px; vertical-align: middle;
    font-family: var(--font-body); font-size: 0.72rem; font-weight: normal; letter-spacing: 0.03em;
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 210, 122, 0.25); border-radius: 999px; background: rgba(0, 0, 0, 0.28);
}
.rank-req img { width: 18px; height: 18px; object-fit: contain; }
.library-series-item.is-locked .rank-req { opacity: 0.85; }

/* ── Story shelf: rank filter ── */
.lib-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.lib-filter[hidden] { display: none; }
.lib-filter-chip {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 4px 12px 4px 8px; font-family: var(--font-body); font-size: 0.85rem;
    color: var(--color-text-muted); background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 210, 122, 0.25); border-radius: 999px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lib-filter-chip:not(:has(img)) { padding-left: 12px; }
.lib-filter-chip img { width: 20px; height: 20px; object-fit: contain; }
.lib-filter-chip:hover, .lib-filter-chip:focus-visible { border-color: rgba(255, 210, 122, 0.6); color: var(--color-text); outline: none; }
.lib-filter-chip.active { border-color: var(--color-gold, #ffd27a); background: rgba(255, 210, 122, 0.14); color: var(--color-gold, #ffd27a); }
.lib-filter-count { font-size: 0.75em; opacity: 0.7; }

/* ── Pictures inserted into text with the editor's Picture button ── */
.content-img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: var(--radius-btn); }

/* ── The rank that opens a book, shown under its title when the book is opened ── */
.lib-rank-line { margin: 0 0 14px; }
.lib-rank-line .rank-req {
    margin-left: 0; gap: 10px; padding: 4px 16px 4px 8px;
    font-size: 1rem; letter-spacing: 0.06em; color: var(--color-gold-light, #ffe9b0);
    border-color: rgba(255, 210, 122, 0.35);
}
.lib-rank-line .rank-req img { width: 38px; height: 38px; }

/* ── Library: links and sharing ── */
a.library-series-item { color: inherit; text-decoration: none; }
