@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@500;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

  :root {
    --navy-950: #04142f;
    --navy-900: #082650;
    --navy-800: #0b4ea2;
    --navy-700: #2363bb;
    --slate-100: #eef4fb;
    --slate-200: #dde7f4;
    --slate-300: #c4d4ea;
    --gold-400: #d8ad43;
    --gold-300: #f0ca73;
    --ink-900: #132033;
    --ink-700: #46566e;
    --white: #ffffff;
    --success-100: #e7f6ee;
    --success-700: #1e7b4f;
    --error-100: #fdeceb;
    --error-700: #a23b32;
    --warning-100: #fff7df;
    --warning-700: #8c6317;
    --surface-default-bg: rgba(4, 20, 47, 0.62);
    --surface-default-border: rgba(242, 197, 92, 0.62);
    --surface-default-text: rgba(255, 255, 255, 0.92);
    --surface-default-muted: rgba(255, 255, 255, 0.78);
      --surface-green-bg: rgba(70, 120, 70, 0.35);
    --surface-green-border: rgba(99, 222, 159, 0.34);
    --surface-green-text: rgba(242, 255, 247, 0.96);
    --surface-yellow-bg: rgba(106, 77, 22, 0.62);
    --surface-yellow-border: rgba(242, 197, 92, 0.42);
    --surface-yellow-text: rgba(255, 245, 205, 0.96);
      --surface-red-bg: rgba(150, 70, 70, 0.4);
    --surface-red-border: rgba(255, 152, 152, 0.34);
    --surface-red-text: rgba(255, 239, 236, 0.96);
    --field-dark-bg: rgba(24, 31, 43, 0.8);
    --field-dark-border: rgba(255, 255, 255, 0.14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-lg: 0 24px 60px rgba(4, 20, 47, 0.18);
    --shadow-md: 0 16px 35px rgba(4, 20, 47, 0.12);
    --ui-button-frame: none;
    --ui-button-selected-frame: none;
    --ui-portrait-frame: none;
  }

  * {
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0;
    min-height: 100%;
  }

  html {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  body {
    position: relative;
    isolation: isolate;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--ink-900);
    background: var(--navy-950);
    overflow-x: hidden;
  }

  .page-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
  }

  .page-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .page-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 20, 44, 0.38), rgba(6, 20, 44, 0.58));
  }

  img {
    display: block;
    max-width: 100%;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  .page-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 20px 0 38px;
  }

  @supports not (scrollbar-gutter: stable) {
    html {
      overflow-y: scroll;
    }
  }

  .nav-shell {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
  }

  .tab-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    padding: 12px;
    border-radius: 999px;
    background: rgba(4, 20, 47, 0.3);
    border: 1px solid rgb(96, 96, 96);
    box-shadow: 0 16px 36px rgba(4, 20, 47, 0.18);
  }

  .tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    background-color: transparent;
    background-image: var(--ui-button-frame);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border: 0;
    transition: transform 0.18s ease, filter 0.18s ease;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.38);
  }

  .tab-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
  }

  .tab-link.active {
    background-image: var(--ui-button-selected-frame);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff6d5;
    box-shadow: 0 12px 24px rgba(216, 173, 67, 0.25);
    text-shadow: 0 1px 8px rgba(66, 37, 0, 0.32);
  }

  .app-main {
    margin-top: 10px;
  }

  .notice-host {
    min-height: 10px;
  }

  .notice {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-md);
    backdrop-filter: none;
  }

  .notice.success {
    background: var(--surface-green-bg);
    color: var(--surface-green-text);
    border-color: var(--surface-green-border);
  }

  .notice.error {
    background: var(--surface-red-bg);
    color: var(--surface-red-text);
    border-color: var(--surface-red-border);
  }

  .notice.warning {
    background: var(--surface-yellow-bg);
    color: var(--surface-yellow-text);
    border-color: var(--surface-yellow-border);
  }

  .app-mount {
    display: grid;
    gap: 18px;
  }

  .panel {
    background: rgba(247, 249, 253, 0.82);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 26px;
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.42);
  }

  .panel h2,
  .panel h3 {
    margin-top: 0;
    font-family: 'Bitter', serif;
    color: var(--navy-950);
  }

  .panel h2 {
    margin-bottom: 10px;
    font-size: 1.95rem;
  }

  .panel p:last-child {
    margin-bottom: 0;
  }

  .panel-stack {
    display: grid;
    gap: 18px;
  }

  .page-panel {
    background-color: transparent;
    background-image: linear-gradient(var(--surface-default-bg), var(--surface-default-bg));
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--surface-default-border);
    color: var(--surface-default-text);
    backdrop-filter: none;
    padding: 40px 36px 34px;
  }

  .page-panel h2,
  .page-panel h3 {
    color: var(--white);
  }

  .page-panel > p,
  .page-panel .helper-text,
  .page-panel .fine-print,
  .page-panel .summary-list,
  .page-panel .meta-line {
    color: rgba(255, 255, 255, 0.78);
  }

  .page-header-shell {
    width: 100%;
    margin: 0 0 20px;
  }

  .page-header-frame {
    width: min(920px, 100%);
    margin: 0 auto;
  }

  .page-header-copy {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  }

  .page-header-copy h2 {
    margin: 0 0 10px;
    font-size: 1.9rem;
  }

  .page-header-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.98rem;
    line-height: 1.42;
  }

  .page-header-copy p + p {
    margin-top: 10px;
  }

  .home-intro-header .page-header-copy p {
    font-size: 1.08rem;
    line-height: 1.55;
  }

  .home-disclaimer {
    margin: 18px auto 16px;
    max-width: 920px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-red-bg);
    border: 1px solid var(--surface-red-border);
    color: var(--surface-red-text);
    font-size: 0.92rem;
    line-height: 1.45;
    box-shadow: 0 10px 20px rgba(112, 39, 39, 0.14);
  }

  .home-disclaimer strong {
    color: #fff6f2;
  }

  .meeting-spotlight {
    margin: 12px auto 0;
    width: min(940px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.92fr);
    gap: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    background: var(--surface-yellow-bg);
    border: 1px solid var(--surface-yellow-border);
    box-shadow: 0 16px 28px rgba(242, 197, 92, 0.12);
    color: var(--surface-yellow-text);
  }

  .meeting-spotlight-empty {
    grid-template-columns: minmax(0, 1fr);
  }

  .meeting-spotlight-secondary {
    display: grid;
    gap: 14px;
    align-content: start;
  }

  .meeting-kicker,
  .meeting-secondary-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 245, 205, 0.74);
  }

  .meeting-primary-date {
    margin-top: 6px;
    font-family: 'Bitter', serif;
    font-size: clamp(1.7rem, 3.2vw, 2.45rem);
    line-height: 1;
    color: #fff8de;
  }

  .meeting-primary-meta {
    margin: 8px 0 0;
    color: rgba(255, 245, 205, 0.88);
    font-size: 0.94rem;
  }

  .meeting-primary-location {
    margin: 10px 0 0;
    color: rgba(255, 245, 205, 0.78);
    font-size: 1rem;
    line-height: 1.45;
  }

  .meeting-upcoming-block {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .meeting-upcoming-list {
    margin-top: 10px;
    display: grid;
    gap: 8px;
  }

  .meeting-upcoming-item {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(11, 29, 56, 0.24);
    border: 1px solid rgba(242, 197, 92, 0.16);
  }

  .meeting-upcoming-date {
    display: block;
    font-weight: 800;
    color: #fff8de;
  }

  .meeting-upcoming-meta {
    display: block;
    margin-top: 4px;
    color: rgba(255, 245, 205, 0.76);
    font-size: 0.88rem;
  }

  .meeting-upcoming-location {
    display: block;
    margin-top: 4px;
    color: rgba(255, 245, 205, 0.68);
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .policy-stack {
    display: grid;
    gap: 18px;
    margin-top: 22px;
  }

  .policy-section {
    padding: 18px 20px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--surface-default-border);
    box-shadow: none;
  }

  .policy-section h3 {
    margin: 0 0 10px;
  }

  .policy-list,
  .policy-sublist {
    margin: 0;
    padding-left: 1.25rem;
  }

  .policy-list {
    display: grid;
    gap: 10px;
  }

  .policy-sublist {
    margin-top: 8px;
    display: grid;
    gap: 6px;
  }

  .policy-list li,
  .policy-sublist li {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
  }

  .choice-grid,
  .candidate-grid,
  .loan-grid,
  .book-grid {
    display: grid;
    gap: 16px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-grid,
  .loan-grid,
  .book-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .catalog-grid-shell {
    margin-top: 18px;
    padding: 18px;
    border-radius: 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .candidate-card,
  .loan-card,
  .book-card {
    position: relative;
    background: var(--surface-default-bg);
    border: 1px solid var(--surface-default-border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 12px 24px rgba(4, 20, 47, 0.18);
    backdrop-filter: none;
  }

  .candidate-card,
  .loan-card,
  .book-card {
    color: var(--surface-default-text);
  }

  .candidate-card h3,
  .loan-card h3,
  .book-card h3 {
    margin-bottom: 8px;
    color: var(--white);
  }

  .action-card {
    background: var(--surface-default-bg);
    border: 1px solid var(--surface-default-border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    color: var(--surface-default-text);
    backdrop-filter: none;
  }

  .action-card h3 {
    margin-bottom: 8px;
    color: var(--white);
  }

  .action-card p {
    color: var(--surface-default-muted);
  }

  .catalog-book-card {
    backdrop-filter: none;
  }

  .catalog-book-card.available-card {
    background: var(--surface-green-bg);
    border-color: var(--surface-green-border);
    box-shadow: 0 14px 26px rgba(20, 88, 58, 0.18);
  }

  .catalog-book-card.on-loan-card {
    background: var(--surface-red-bg);
    border-color: var(--surface-red-border);
    box-shadow: 0 14px 26px rgba(112, 39, 39, 0.18);
  }

  .catalog-card-trigger {
    width: 100%;
    padding: 0;
    padding-right: 20px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .book-card-title {
    display: block;
    font-family: 'Bitter', serif;
    font-size: 1.18rem;
    line-height: 1.2;
    color: var(--white);
  }

  .catalog-book-card .book-card-title {
    display: -webkit-box;
    min-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .book-card-author {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
  }

  .book-card-topic,
  .book-card-skill {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.86rem;
    letter-spacing: 0.02em;
  }

  .book-card-topic {
    text-transform: none;
  }

  .book-card-skill {
    color: rgba(255, 245, 205, 0.92);
    font-weight: 700;
    text-transform: uppercase;
  }

  .book-card-id {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    line-height: 1.1;
    letter-spacing: 0.03em;
  }

  .catalog-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-actions .btn {
    width: 100%;
  }

  .catalog-actions .btn-ghost {
    background: rgba(10, 28, 52, 0.84);
    border-color: rgba(242, 197, 92, 0.48);
  }

  .book-skill-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(4, 20, 47, 0.18);
  }

  .book-skill-dot.skill-beginner {
    background: rgb(0, 255, 0);
  }

  .book-skill-dot.skill-novice {
    background: rgb(255, 255, 0);
  }

  .book-skill-dot.skill-intermediate {
    background: rgb(255, 135, 0);
  }

  .book-skill-dot.skill-hard {
    background: rgb(255, 0, 0);
  }

  .book-skill-dot.skill-reference {
    background: rgb(0, 0, 0);
    border-color: rgba(255, 255, 255, 0.82);
  }

  .catalog-status-line {
    margin: 10px 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
  }

  .catalog-book-card.available-card .catalog-status-line {
    color: var(--surface-green-text);
  }

  .catalog-book-card.on-loan-card .catalog-status-line {
    color: var(--surface-red-text);
  }

  .catalog-book-card.reference-card .catalog-status-line {
    color: rgba(255, 245, 205, 0.96);
  }

  .catalog-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    justify-content: center;
  }

  .catalog-summary-row {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .catalog-difficulty-legend {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: min(720px, 100%);
    min-height: 0;
    margin: 0 auto 10px;
    padding: 18px 22px 20px;
    background: rgba(6, 24, 48, 0.7);
    border: 1px solid rgba(242, 197, 92, 0.34);
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  }

  .catalog-difficulty-art-shell {
    width: min(920px, 100%);
    padding: 0;
    min-height: 0;
    margin-top: -2px;
    background-image: none !important;
    background-color: transparent;
  }

  .catalog-difficulty-art {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .catalog-difficulty-legend-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 16px;
    width: 100%;
    margin: 0 auto;
  }

  .catalog-difficulty-legend-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    letter-spacing: 0.03em;
    font-weight: 700;
  }

  .catalog-difficulty-legend-item {
    display: grid;
    grid-template-columns: 12px auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 1.9vw, 1.15rem);
    font-weight: 700;
    text-align: center;
    justify-self: center;
  }

  .catalog-difficulty-legend-item .book-skill-dot {
    position: static;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    box-shadow: none;
  }

  .catalog-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: min(760px, 100%);
    margin: 0;
  }

  .catalog-metrics-art-shell {
    position: relative;
    display: block;
    width: min(760px, 100%);
    max-width: 760px;
    aspect-ratio: 738 / 225;
  }

  .catalog-metrics-placard-shell {
    width: min(760px, 100%);
    max-width: 760px;
    aspect-ratio: 738 / 225;
  }

  .catalog-metrics-art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .catalog-metric {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 112px;
    padding: 16px 18px 18px;
    background: rgba(6, 24, 48, 0.72);
    border: 1px solid rgba(242, 197, 92, 0.34);
    border-radius: 24px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  }

  .catalog-metrics-art-shell .catalog-metric {
    position: absolute;
    top: 61.5%;
    min-width: 110px;
    transform: translate(-50%, -50%);
    padding: 0;
  }

  .catalog-metrics-art-shell .catalog-metric-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .catalog-metric-left {
    left: 25.9%;
  }

  .catalog-metric-center {
    left: 50.6%;
  }

  .catalog-metric-right {
    left: 75.3%;
  }

  .catalog-metric-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    letter-spacing: 0.03em;
    font-weight: 700;
  }

  .catalog-metric-value {
    color: #ffffff;
    font-size: clamp(2.45rem, 4.2vw, 3.25rem);
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  }

  .rankings-list {
    display: grid;
    gap: 16px;
  }

  .page-subnav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 18px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(4, 20, 47, 0.34);
    border: 1px solid rgba(242, 197, 92, 0.42);
  }

  .page-subnav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
  }

  .page-subnav-link:hover,
  .page-subnav-link:focus-visible {
    color: #ffffff;
    border-color: rgba(242, 197, 92, 0.34);
    background: rgba(255, 255, 255, 0.06);
  }

  .page-subnav-link.active {
    background: linear-gradient(180deg, rgba(242, 197, 92, 0.92), rgba(224, 157, 56, 0.92));
    color: #1c1408;
    border-color: rgba(255, 239, 180, 0.44);
    box-shadow: 0 10px 24px rgba(242, 197, 92, 0.16);
  }

  .admin-dashboard {
    display: grid;
    gap: 18px;
  }

  .admin-grid,
  .admin-report-grid {
    display: grid;
    gap: 18px;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
  }

  .admin-section,
  .admin-form-card {
    background: transparent;
    border: 1px solid var(--surface-default-border);
    color: var(--surface-default-text);
    border-radius: 22px;
    padding: 20px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .admin-section-header,
  .admin-list-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .admin-section-header h3,
  .admin-report-panel h4 {
    margin: 0 0 8px;
    color: var(--white);
  }

  .admin-button-row-tight {
    margin-top: 0;
  }

  .admin-section-actions-shell {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    flex-wrap: wrap;
  }

  .admin-section-actions-left {
    margin-right: auto;
  }

  .admin-section-actions-right {
    justify-content: flex-end;
  }

  .admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
  }

  .admin-status-tile,
  .admin-note-card,
  .admin-report-panel,
  .admin-empty,
  .admin-token-row {
    padding: 14px 16px;
    border-radius: 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .admin-page .admin-list-card {
    background: transparent;
    box-shadow: none;
  }

  .admin-collapsible-body {
    margin-top: 18px;
  }

  .admin-collapsible-summary {
    margin: 8px 0 0;
  }

  .admin-status-label,
  .admin-label {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-status-value {
    display: block;
    margin-top: 8px;
    color: #ffffff;
    font-size: 1rem;
  }

  .admin-inline-separator {
    padding: 0 8px;
    color: rgba(255, 255, 255, 0.48);
  }

  .admin-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
  }

  .admin-list-card h3 {
    margin: 0;
  }

  .admin-report-output {
    min-height: 220px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(255, 255, 255, 0.88);
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .admin-inline-checkbox {
    margin-top: 8px;
    margin-bottom: 2px;
  }

  .admin-form-spacer {
    height: 8px;
  }

  .admin-subsection-toggle {
    margin-bottom: 16px;
  }

  .admin-inline-form-shell,
  .admin-terms-section-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
  }

  .admin-inline-form-shell {
    margin-bottom: 18px;
  }

  .admin-terms-section-card-header {
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
  }

  .admin-terms-section-card-header h4 {
    margin: 0;
    color: var(--white);
  }

  .admin-member-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .admin-member-loans-field {
    margin-top: 8px;
  }

  .admin-member-loan-list {
    display: grid;
    gap: 12px;
  }

  .admin-member-loan-card strong {
    color: var(--white);
  }

  .admin-terms-stack {
    display: grid;
    gap: 14px;
    margin-top: 16px;
  }

  .static-value {
    display: flex;
    align-items: center;
    min-height: 52px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(4, 20, 47, 0.28);
  }

  .admin-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 22px;
    margin: 6px 0 14px;
  }

  .admin-report-filter {
    color: rgba(255, 255, 255, 0.88);
  }

  .admin-qr-result {
    margin-top: 18px;
    display: grid;
    gap: 14px;
  }

  .admin-qr-result-grid {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .admin-qr-image-shell {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.84);
  }

  .admin-qr-image {
    width: 100%;
    height: auto;
  }

  .admin-link-box {
    min-height: 124px;
    margin-top: 8px;
  }

  .admin-token-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.92rem;
  }

  .ranking-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
    border-radius: 22px;
    background: var(--surface-default-bg);
    border: 1px solid var(--surface-default-border);
    color: var(--surface-default-text);
  }

  .ranking-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 20px;
    background: rgba(242, 197, 92, 0.16);
    border: 1px solid rgba(242, 197, 92, 0.36);
    color: #fff4c8;
    font-family: 'Bitter', serif;
    font-size: 1.2rem;
    font-weight: 700;
  }

  .ranking-copy h3 {
    margin: 0;
  }

  .result-player-card {
    height: 100%;
  }

  .results-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
  }

  .results-panel-copy h3 {
    margin: 0 0 8px;
  }

  .results-panel-copy .helper-text {
    margin: 0;
  }

  .results-panel-copy .helper-text + .helper-text {
    margin-top: 8px;
  }

  .results-panel > * {
    min-width: 0;
  }

  .results-submit-form {
    min-width: 0;
  }

  .results-player-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .results-reverse-row {
    margin-top: 0;
  }

  .results-score-key {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(4, 20, 47, 0.3);
    border: 1px solid rgba(242, 197, 92, 0.24);
  }

  .results-score-key-row {
    margin-top: 10px;
  }

  .results-score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 800;
    border: 1px solid transparent;
  }

  .results-score-chip-white {
    background: rgba(255, 251, 235, 0.96);
    border-color: rgba(255, 255, 255, 0.7);
    color: #1b2431;
  }

  .results-score-chip-black {
    background: rgba(6, 16, 40, 0.96);
    border-color: rgba(242, 197, 92, 0.44);
    color: rgba(255, 244, 213, 0.96);
  }

  .results-score-chip-draw {
    background: rgba(93, 109, 136, 0.42);
    border-color: rgba(191, 208, 237, 0.3);
    color: rgba(248, 252, 255, 0.96);
  }

  .result-player-card-white {
    background: rgba(255, 251, 235, 0.96);
    border-color: rgba(255, 255, 255, 0.68);
    color: #1b2431;
  }

  .result-player-card-white h3,
  .result-player-card-white .fine-print,
  .result-player-card-white .meta-line {
    color: #1b2431;
  }

  .result-player-card-black {
    background: rgba(6, 16, 40, 0.96);
    border-color: rgba(242, 197, 92, 0.38);
    color: rgba(255, 248, 228, 0.96);
  }

  .result-player-card-black h3,
  .result-player-card-black .fine-print,
  .result-player-card-black .meta-line {
    color: rgba(255, 248, 228, 0.96);
  }

  .remembered-profile-card {
    margin-bottom: 14px;
  }

  .remembered-profile-note {
    margin-top: 10px;
  }

  .legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.95rem;
    color: var(--white);
    border: 1px solid transparent;
    font-weight: 800;
  }

  .legend-chip::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.8;
  }

  .legend-chip-square::before {
    border-radius: 2px;
  }

  .legend-chip.available {
    background: var(--surface-green-bg);
    border-color: var(--surface-green-border);
    color: var(--surface-green-text);
  }

  .legend-chip.on-loan {
    background: var(--surface-red-bg);
    border-color: var(--surface-red-border);
    color: var(--surface-red-text);
  }

  .legend-chip.reference {
    background: rgba(7, 18, 42, 0.94);
    border-color: rgba(242, 197, 92, 0.62);
    color: rgba(255, 245, 205, 0.96);
  }

  .rolecall-meeting-banner {
    background-color: transparent;
    background-image: var(--ui-button-frame);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border: 0;
    border-color: transparent;
    overflow: hidden;
    box-shadow: none;
  }

  @media (max-width: 820px) {
    .catalog-metrics {
      grid-template-columns: 1fr;
    }

    .catalog-difficulty-legend {
      width: 100%;
    }

    .admin-member-detail-grid {
      grid-template-columns: 1fr;
    }

    .catalog-difficulty-legend-items {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-player-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .ranking-card {
      grid-template-columns: 1fr;
      text-align: center;
    }

    .ranking-rank {
      margin: 0 auto;
    }

    .page-subnav {
      width: 100%;
      justify-content: stretch;
    }

    .page-subnav-link {
      flex: 1 1 100%;
    }

    .admin-grid,
    .admin-report-grid,
    .admin-summary-grid,
    .admin-qr-result-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .admin-token-row {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .selected-loan-card {
    border-color: var(--surface-yellow-border);
    box-shadow: 0 16px 34px rgba(242, 197, 92, 0.16);
  }

  .return-target-banner {
    background: var(--surface-yellow-bg);
    border-color: var(--surface-yellow-border);
    color: var(--surface-yellow-text);
  }

  .catalog-target-summary > span {
    display: block;
  }

  .inline-title {
    font-size: 1.06rem;
  }

  .inline-author {
    margin-top: 4px;
  }

  .book-inline-id {
    margin-top: 8px;
  }

  .meta-line {
    color: rgba(255, 255, 255, 0.78);
    margin: 6px 0 0;
  }

  .action-card .meta-line,
  .candidate-card .meta-line,
  .loan-card .meta-line,
  .book-card .meta-line {
    color: rgba(255, 255, 255, 0.78);
  }

  .chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.93rem;
    font-weight: 600;
  }

  .notice .chip {
    background: rgba(4, 20, 47, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: inherit;
  }

  .field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .field-grid.single {
    grid-template-columns: minmax(0, 1fr);
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .field label {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
  }

  .page-panel .field label {
    color: rgba(255, 255, 255, 0.92);
  }

  .text-input,
  .text-area,
  .select-input {
    width: 100%;
    border: 1px solid var(--field-dark-border);
    border-radius: 14px;
    padding: 13px 14px;
    background: var(--field-dark-bg);
    color: rgba(255, 255, 255, 0.92);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  }

  .text-input::placeholder,
  .text-area::placeholder,
  .select-input::placeholder {
    color: rgba(255, 255, 255, 0.52);
  }

  .text-input:focus,
  .text-area:focus,
  .select-input:focus {
    outline: none;
    border-color: rgba(242, 197, 92, 0.72);
    box-shadow: 0 0 0 4px rgba(242, 197, 92, 0.12);
    transform: translateY(-1px);
  }

  .text-area {
    min-height: 128px;
    resize: vertical;
  }

  .checkbox-label {
    color: rgba(255, 255, 255, 0.92);
  }

  .terms-link {
    color: #7db9ff;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .terms-link:hover {
    color: #a9d3ff;
  }

  .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
  }

  .btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 13px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
  }

  .btn-primary {
    background: linear-gradient(135deg, var(--gold-400), #f2c55c);
    color: #2b2104;
    box-shadow: 0 14px 24px rgba(216, 173, 67, 0.3);
  }

  .btn-secondary {
    background: rgba(11, 29, 56, 0.78);
    color: var(--white);
    border-color: rgba(242, 197, 92, 0.48);
    box-shadow: 0 14px 24px rgba(4, 20, 47, 0.22);
  }

  .btn-ghost {
    background: rgba(10, 28, 52, 0.74);
    color: rgba(255, 255, 255, 0.94);
    border-color: rgba(242, 197, 92, 0.48);
    box-shadow: 0 10px 20px rgba(4, 20, 47, 0.16);
  }

  .helper-text {
    color: var(--ink-700);
    font-size: 0.98rem;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
  }

  .status-pill.available {
    background: var(--surface-green-bg);
    color: var(--surface-green-text);
    border: 1px solid var(--surface-green-border);
  }

  .status-pill.on-loan {
    background: var(--surface-red-bg);
    color: var(--surface-red-text);
    border: 1px solid var(--surface-red-border);
  }

  .status-pill.unavailable {
    background: var(--surface-yellow-bg);
    color: var(--surface-yellow-text);
    border: 1px solid var(--surface-yellow-border);
  }

  .catalog-line {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.82);
    white-space: pre-line;
  }

  .catalog-toggle {
    margin-top: 16px;
  }

  .page-footer {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 22px;
    background: rgba(4, 20, 47, 0.44);
    border: 1px solid rgb(96, 96, 96);
    box-shadow: var(--shadow-md);
    color: rgba(255, 255, 255, 0.86);
    backdrop-filter: none;
  }

  .footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }

  .footer-meta {
    display: flex;
    flex-direction: column;
    min-width: 220px;
  }

  .footer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-left: auto;
    padding-top: 2px;
  }

  .footer-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
  }

  .footer-line {
    display: block;
    margin-top: 3px;
    font-size: 0.94rem;
  }

  .footer-link {
    display: inline-block;
    color: #7db9ff;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: 0.92rem;
  }

  .footer-link:hover {
    color: #a9d3ff;
  }

  .footer-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
  }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  @media (max-width: 640px) {
    .footer-actions {
      margin-left: 0;
      width: 100%;
      justify-content: flex-start;
      padding-top: 8px;
    }
  }

  .summary-list {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-700);
  }

  .loading-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0 2px;
    color: rgba(255, 255, 255, 0.96);
    font-weight: 700;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  }

  .spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.26);
    border-top-color: rgba(242, 197, 92, 0.98);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(24, 31, 43, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 1000;
  }

  .modal-card {
    width: min(520px, 100%);
    border-radius: 26px;
    background: var(--surface-default-bg);
    border: 1px solid var(--surface-default-border);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    color: var(--surface-default-text);
  }

  .modal-card h3 {
    margin-top: 0;
    font-family: 'Bitter', serif;
    color: var(--white);
  }

  .modal-card .field label {
    color: rgba(255, 255, 255, 0.92);
  }

  .catalog-modal-card {
    width: min(680px, 100%);
  }

  .modal-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .modal-close-btn {
    flex-shrink: 0;
  }

  .catalog-modal-meta {
    margin-top: 18px;
  }

  .catalog-modal-title {
    margin: 0;
    font-family: 'Bitter', serif;
    font-size: 1.35rem;
    line-height: 1.3;
    color: var(--white);
  }

  .catalog-modal-author {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
  }

  .catalog-modal-note {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--field-dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.6;
  }

  .catalog-modal-note-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 8px;
  }

  .catalog-modal-note-list li {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.45;
  }

  .fine-print {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.94rem;
  }

  .sponsor-entry {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 28px 30px;
    border-radius: 24px;
    background: transparent;
    border: 1px solid var(--surface-default-border);
    box-shadow: var(--shadow-md);
    color: var(--surface-default-text);
  }

  .sponsor-logo-panel {
    width: 100%;
    max-width: 220px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(4, 20, 47, 0.18);
  }

  .sponsor-logo {
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    justify-self: center;
  }

  .sponsor-logo-placeholder {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    font-size: 2rem;
    font-weight: 800;
  }

  .sponsor-copy h3 {
    margin: 0 0 10px;
    color: var(--white);
  }

  .sponsor-copy p {
    margin: 0 0 10px;
  }

  .sponsor-copy .helper-text {
    color: rgba(255, 255, 255, 0.78);
  }

  .sponsor-link {
    color: #7db9ff;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
  }

  .sponsor-link:hover {
    color: #a9d3ff;
  }

  .file-input {
    padding: 12px;
    line-height: 1.2;
  }

  .admin-sponsor-logo-preview-shell {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
  }

  .admin-sponsor-logo-preview {
    display: block;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    margin: 0 auto;
  }

  .admin-sponsor-card-logo {
    max-width: 120px;
    max-height: 56px;
    object-fit: contain;
    border-radius: 12px;
  }

  @media (max-width: 900px) {
    .choice-grid,
    .field-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .meeting-spotlight {
      grid-template-columns: minmax(0, 1fr);
    }

    .sponsor-entry {
      grid-template-columns: minmax(0, 1fr);
      text-align: center;
    }
  }

  @media (max-width: 700px) {
    .page-shell {
      width: min(100vw - 18px, 100%);
      padding-top: 10px;
    }

    .panel {
      padding: 18px;
      border-radius: 24px;
    }

    .catalog-grid-shell {
      padding: 8px 0 0;
    }

    .catalog-metrics {
      width: 100%;
    }

    .catalog-metric-value {
      font-size: clamp(1rem, 4.2vw, 1.35rem);
    }
  }
