/* Site-wide visual language: quiet surfaces, useful contrast, BoardingPassMuseum blue. */
:root {
  --bpm-accent: #77b8d8;
  --bpm-accent-strong: #8cc7e3;
  --bpm-accent-ink: #102733;
  --bpm-bg: #101417;
  --bpm-text: #f2f4f5;
  --bpm-muted: #b8c0c5;
  --bpm-card: #191f23;
  --bpm-input: #151a1d;
  --bpm-border: #354047;
  --bpm-header: #191f23;
  color-scheme: dark;
}

html.light-theme {
  --bpm-accent: #dcebf1;
  --bpm-accent-strong: #174b68;
  --bpm-accent-ink: #14272f;
  --bpm-bg: #f3f5f6;
  --bpm-text: #151a1d;
  --bpm-muted: #4e5960;
  --bpm-card: #ffffff;
  --bpm-input: #f8f9fa;
  --bpm-border: #d4dadd;
  --bpm-header: #ffffff;
  color-scheme: light;
}

html.light-theme .sa-panel input,
html.light-theme .sa-panel textarea {
  background: var(--bpm-input);
  color: var(--bpm-text);
  border-color: var(--bpm-border);
}

html.light-theme .sa-panel button,
html.light-theme .submit-form button,
html.light-theme #submitBtn {
  color: #14272f;
  background: #dcebf1;
  border: 1px solid #9aafb8;
}

html.light-theme .sa-panel button:hover,
html.light-theme .submit-form button:hover,
html.light-theme #submitBtn:hover {
  background: #c9e0e9;
}

html,
body {
  background-color: var(--bpm-bg);
  color: var(--bpm-text);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

body > header:not(.menubar) {
  background: var(--bpm-card);
  color: var(--bpm-text);
}

.menubar {
  background: var(--bpm-header);
  color: var(--bpm-text);
  border-bottom: 1px solid var(--bpm-border);
}

.menubar a,
.menubar .brand,
.menubar #userMenuBtn {
  color: var(--bpm-text);
}

.menubar nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--bpm-accent);
  text-underline-offset: 5px;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bpm-form-page a,
.sa-panel a,
.profile-page a,
.account-card a,
.bpm-info-page .bpm-panel a,
.bpm-auto-footer a {
  color: var(--bpm-accent-strong);
}

.bpm-page-hero span,
.bpm-section-heading span,
.bpm-page-hero p,
.bpm-section-heading p,
.bpm-form-actions p,
.bpm-notice-page small {
  color: var(--bpm-muted);
  letter-spacing: normal;
  text-transform: none;
}

.bpm-page-hero h1,
.bpm-form-page > h1 {
  color: var(--bpm-text);
  font-family: inherit;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.16;
}

.card,
.community-post,
.community-comment,
.account-card,
.profile-card,
.admin-card,
.sa-panel,
.modal,
.panel,
.bpm-panel,
.bpm-form-page form,
.bpm-dialog,
.flight-footprint,
.bpm-related-exhibits,
.bpm-notice-page .bpm-panel,
.bpm-moderation-row {
  background-color: var(--bpm-card);
  color: var(--bpm-text);
  border-color: var(--bpm-border);
  border-radius: 8px;
  box-shadow: none;
}

.bpm-info-page .bpm-panel {
  border-radius: 8px;
  box-shadow: none;
}

.card {
  transition: border-color .16s ease, transform .16s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: none;
  border-color: var(--bpm-accent);
}

.card h3,
.card p,
.community-post h2,
.community-comment h3,
.profile-card h1,
.profile-card h2,
.account-card h2,
.admin-card h2,
.sa-panel h2 {
  color: var(--bpm-text);
}

.card p,
.gallery-desc,
.profile-info p,
.community-notice,
.community-post-meta,
.community-post-rule,
.museum-result-count {
  color: var(--bpm-muted);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
textarea,
select {
  background-color: var(--bpm-input);
  color: var(--bpm-text);
  border-color: var(--bpm-border);
  border-radius: 4px;
}

input::placeholder,
textarea::placeholder {
  color: var(--bpm-muted);
  opacity: .82;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--bpm-accent);
  outline-offset: 2px;
}

button {
  background: var(--bpm-card);
  color: var(--bpm-text);
  border-color: var(--bpm-border);
  border-radius: 5px;
  font: inherit;
}

button:hover {
  border-color: var(--bpm-accent);
  filter: none;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.enter-btn,
.bpm-install-app,
.bpm-moderation-page button,
.bpm-notice-page button,
.ai-recognition-controls button,
.bpm-staff-chat-dialog form button {
  background: var(--bpm-accent);
  color: var(--bpm-accent-ink);
  border-color: var(--bpm-accent);
}

.bpm-footer {
  background: var(--bpm-card);
  color: var(--bpm-text);
  border-color: var(--bpm-border);
}

.bpm-footer p {
  color: var(--bpm-muted);
}

.theme-toggle {
  color: var(--bpm-text);
}

@media (max-width: 700px) {
  body > .menubar {
    background: color-mix(in srgb, var(--bpm-card) 78%, transparent);
    border-bottom-color: color-mix(in srgb, var(--bpm-border) 75%, transparent);
    box-shadow: 0 5px 20px color-mix(in srgb, #06111a 12%, transparent);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
  }

  .menubar nav {
    background: color-mix(in srgb, var(--bpm-card) 88%, transparent) !important;
    border-color: var(--bpm-border) !important;
    box-shadow: 0 14px 32px color-mix(in srgb, #06111a 24%, transparent) !important;
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
  }

  .menubar > .user-menu .user-dropdown {
    background: color-mix(in srgb, var(--bpm-card) 88%, transparent) !important;
    border: 1px solid var(--bpm-border);
    box-shadow: 0 14px 32px color-mix(in srgb, #06111a 24%, transparent);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
  }

  .bpm-form-page,
  .bpm-page-hero {
    padding-top: 18px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .menubar,
  .menubar nav,
  .menubar .user-dropdown {
    background: var(--bpm-card) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
.bpm-admin-pwa-install{flex:0 0 auto;min-height:38px;padding:7px 12px;border:1px solid currentColor;border-radius:999px;background:rgba(255,255,255,.12);color:inherit;font:inherit;font-size:13px;font-weight:650;white-space:nowrap;cursor:pointer}
.bpm-admin-pwa-install:disabled{opacity:.6;cursor:wait}
.bpm-admin-install-help{box-sizing:border-box;width:min(420px,calc(100% - 28px));padding:24px;border:1px solid var(--bpm-border,#cbd5df);border-radius:20px;background:var(--bpm-card,#fff);color:var(--bpm-text,#152b40);box-shadow:0 20px 70px #001b3640}
.bpm-admin-install-help h2{margin:0 0 12px;font-size:22px}
.bpm-admin-install-help p{line-height:1.65}
.bpm-admin-install-help button{min-height:42px;padding:9px 18px;border:0;border-radius:12px;background:#003c6b;color:#fff;font:inherit;font-weight:650;cursor:pointer}
.bpm-admin-install-help::backdrop{background:#001b3680;backdrop-filter:blur(3px)}
.bpm-admin-identity-fallback{margin:10px 0 14px;padding:14px;border:1px solid color-mix(in srgb,#b14d38 38%,var(--bpm-border,#cbd5df));border-radius:14px;background:color-mix(in srgb,var(--bpm-card,#fff) 92%,#f2b6a4)}
.bpm-admin-identity-fallback label{display:block;margin:0 0 7px;font-weight:650}
.bpm-admin-identity-fallback input{width:100%;box-sizing:border-box}
.bpm-admin-identity-fallback p{margin:9px 0 0;font-size:13px;line-height:1.55}

.bpm-acknowledgements-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:18px}
.bpm-acknowledgement{display:flex;flex-direction:column;justify-content:space-between;gap:16px;min-width:0;padding:16px;border:1px solid var(--bpm-border);border-radius:12px;background:var(--bpm-input);color:var(--bpm-text)}
.bpm-acknowledgement h3{margin:0 0 7px;color:var(--bpm-text);font-size:17px}
.bpm-acknowledgement p{margin:0;color:var(--bpm-muted);font-size:14px;line-height:1.65}
.bpm-acknowledgement-links{display:flex;flex-wrap:wrap;gap:8px}
.bpm-acknowledgement-links a{display:inline-flex;align-items:center;min-height:36px;padding:0 11px;border:1px solid var(--bpm-border);border-radius:9px;background:var(--bpm-card);color:var(--bpm-text)!important;font-size:13px;font-weight:650;text-decoration:none}
.bpm-acknowledgement-links a:hover{border-color:var(--bpm-accent);background:var(--bpm-card)}

.sa-announcement-bulk-tools{position:sticky;top:8px;z-index:2;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;padding:12px;border:1px solid var(--bpm-border);border-radius:10px;background:var(--bpm-card);color:var(--bpm-text)}
.sa-announcement-bulk-tools label{display:flex;align-items:center;gap:7px;margin:0;font-size:13px}
.sa-announcement-bulk-tools button{margin:0;padding:8px 11px;border:1px solid var(--bpm-border);border-radius:8px;background:var(--bpm-input);color:var(--bpm-text);font:inherit;font-size:12px}
.sa-announcement-bulk-tools button:disabled{opacity:.5}
.sa-announcement-select{display:flex;align-items:center;gap:9px}
.sa-announcement-select small{color:var(--bpm-muted)}
.bpm-announcement-history-item>label{display:block;margin-top:10px;color:var(--bpm-text)}
.bpm-announcement-history-item input[data-announcement-title],.bpm-announcement-history-item textarea[data-announcement-content]{width:100%;box-sizing:border-box;background:var(--bpm-input);color:var(--bpm-text);border:1px solid var(--bpm-border);border-radius:8px;padding:10px;font:inherit}
.submit-country-fields [hidden]{display:none!important}
.bpm-github-source a{display:inline-flex;align-items:center;gap:6px}
@media(max-width:600px){.bpm-acknowledgements-grid{grid-template-columns:1fr;gap:10px}.bpm-acknowledgement{padding:14px}.bpm-acknowledgement-links a{min-height:42px}}
.admin-client-notice{width:min(460px,calc(100vw - 32px));padding:0;border:1px solid var(--bpm-border);border-radius:18px;background:var(--bpm-card);color:var(--bpm-text);box-shadow:0 22px 70px #0005}
.admin-client-notice::backdrop{background:#06101dcc;backdrop-filter:blur(3px)}
.admin-client-notice form{padding:24px}.admin-client-notice h2{margin-top:0}.admin-client-notice form>div{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:20px}.admin-client-notice .button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 16px;border-radius:9px;text-decoration:none;background:var(--bpm-accent);color:#fff;font-weight:700}
