html, body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.cc-header { padding: 12px 16px; border-bottom: 1px solid rgba(127,127,127,.25); }
.cc-brand { font-weight: 600; text-decoration: none; color: inherit; }
.cc-main { padding: 0; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: #fff3cd; color: #1c1a1b; z-index: 1000; }
#blazor-error-ui .reload { margin-left: .5rem; }
#blazor-error-ui .dismiss { float: right; min-width: 44px; min-height: 44px; margin: -12px -16px -12px 0; padding: 0 16px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }

/* Keyboard focus: one visible ring everywhere (low specificity, so a component's own ring still wins). Pointer taps do not show it. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #831b3f; outline-offset: 2px; }
:where(.lv, .qr-root, .ps-lightbox, .ps-join-overlay) :focus-visible { outline-color: #fff; }
.cc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-user { display: flex; align-items: center; gap: 12px; font-size: .9rem; min-width: 0; }
.cc-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75; }
.cc-signout { white-space: nowrap; }
.cc-gear { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; color: inherit; text-decoration: none; font-size: 1.15rem; }
.cc-gear:hover, .cc-gear.active { background: rgba(127,127,127,.18); }

/* Account control in the live views' bar (Director, Photographer, Marker). */
.cc-account { position: relative; flex: 0 0 auto; }
.cc-account-backdrop { position: fixed; inset: 0; z-index: 1; border: 0; padding: 0; background: transparent; cursor: default; }
.cc-account-menu { position: absolute; top: calc(100% + 0.3rem); right: 0; z-index: 2; min-width: 14rem; max-width: min(20rem, calc(100vw - 1.5rem)); padding: 0.3rem; border: 1px solid var(--ps-border, rgba(127,127,127,.3)); border-radius: 12px; background: var(--ps-surface, #fff); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.cc-account-who { padding: 0.5rem 0.7rem; font-size: .85rem; color: var(--ps-muted, inherit); border-bottom: 1px solid var(--ps-border, rgba(127,127,127,.25)); margin-bottom: 0.25rem; }
.cc-account-who strong { display: block; color: var(--ps-text, inherit); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-account-item { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.7rem; border-radius: 8px; color: var(--ps-text, inherit); font-weight: 600; text-decoration: none; }
.cc-account-item:hover { background: var(--ps-surface-2, rgba(127,127,127,.12)); color: var(--ps-text, inherit); }
.cc-user-name .bi { margin-right: 4px; }

/* Admin "View as": the red bar shown on every page for the whole session. */
.cc-viewas { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: #b3261e; color: #fff; font-size: .9rem; }
.cc-viewas strong { font-weight: 700; }
.cc-viewas-stop { background: #fff; color: #b3261e; border: 0; font-weight: 700; white-space: nowrap; min-height: 36px; }

/* Admin area: tabs and the accounts list. */
.cc-admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-admin-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px; border-radius: 999px; color: inherit; text-decoration: none; border: 1px solid rgba(127,127,127,.35); }
.cc-admin-tab.active { background: rgba(127,127,127,.2); font-weight: 600; }
.cc-accounts { display: grid; gap: 8px; }
.cc-account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(127,127,127,.2); }
.cc-account-main { display: grid; gap: 2px; min-width: 0; }
.cc-viewas-form { display: grid; gap: 8px; padding: 8px 0 12px; }
