.role-selection-page { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.5; }
.role-browser { --role-gutter: 16px; --role-content-width: 1112px; margin: 32px auto 180px; }
.role-browser > :is(.role-back-form, #role-title, .role-toolbar, .role-mobile-category), .role-selection-form > .role-browser-layout { width: min(var(--role-content-width), calc(100% - 2 * var(--role-gutter))); margin-inline: auto; }
.role-back-form { margin-block: 0; }
.role-back { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font: inherit; text-decoration: none; border: 0; background: none; padding: 0; cursor: pointer; }
.role-back:hover { text-decoration: underline; }
.role-selection-page #role-title { font-size: 32px; font-weight: 600; letter-spacing: -1px; line-height: 1.25; margin-block: 12px 20px; }
.role-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.role-search { position: relative; flex: 1; min-width: 0; }
.role-search input { display: block; width: 100%; height: 36px; padding: 7px 12px 7px 35px; border: 1px solid #D8DCE3; border-radius: 6px; background: var(--step-background); color: var(--ink); font: inherit; }
.role-search svg { position: absolute; left: 11px; top: 9px; width: 17px; height: 17px; stroke: var(--muted); fill: none; stroke-width: 1.8; pointer-events: none; }
.role-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.role-custom-button, .role-dialog-cancel { color: var(--ink); background: var(--step-background); border: 1px solid #C7CED8; border-radius: 6px; padding: 7px 14px; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.role-browser-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 26px; align-items: start; }
.role-categories h2 { font-size: 16px; font-weight: 600; padding: 9px 10px; margin: 0; }
.role-category { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 7px 10px; border: 0; border-radius: 5px; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.role-category:hover, .role-card:hover { background: var(--step-background); }
.role-category[aria-pressed=true] { background: #EAF1FB; box-shadow: inset 3px 0 var(--blue); font-weight: 600; }
.role-count { flex: none; padding: 0 7px; font-size: 12px; color: var(--muted); background: #E2E6EC; border-radius: 12px; font-variant-numeric: tabular-nums; }
.role-browser-panel { border: 1px solid #D8DCE3; border-radius: 7px; overflow: hidden; min-width: 0; background: white; }
.role-section-heading { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--step-background); border-bottom: 1px solid #D8DCE3; }
.role-section-heading h2 { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.5; }
.role-card { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; cursor: pointer; }
.role-card + .role-card { border-top: 1px solid #D8DCE3; }
.role-card:has(:checked) { background: var(--step-background); box-shadow: inset 3px 0 var(--blue); }
.role-card:has(:focus-visible) { outline: 2px solid var(--blue); outline-offset: -3px; }
.role-card input { accent-color: var(--blue); margin: 4px 0 0; flex: none; }
.role-card > span { min-width: 0; }
.role-card strong { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.role-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.role-selection-page .role-empty { padding: 24px; margin: 0; color: var(--muted); }
.role-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 2; background: white; border-top: 1px solid #D8DCE3; padding-bottom: env(safe-area-inset-bottom); }
.role-bottom-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding-block: 10px; width: min(var(--role-content-width), calc(100% - 2 * var(--role-gutter))); margin-inline: auto; }
.role-selection-page .role-bottom p { margin: 0; min-width: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.role-selection-page .role-bottom strong { color: var(--navy); font-weight: 600; }
.role-continue, .role-dialog-confirm { background: var(--navy); color: var(--background); border: 1px solid var(--navy); border-radius: 6px; padding: 7px 14px; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.role-continue:hover, .role-dialog-confirm:hover { background: var(--navy-light); }
.role-continue:disabled { opacity: .55; cursor: default; }
.role-custom { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; border: 1px solid #D8DCE3; border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.role-custom::backdrop { background: #20242B66; }
.role-custom h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.role-custom label { display: block; font-weight: 600; margin: 14px 0 5px; }
.role-custom input, .role-custom textarea, .role-mobile-category select { display: block; width: 100%; border: 1px solid #D8DCE3; border-radius: 6px; padding: 8px 12px; background: white; color: var(--ink); font: inherit; }
.role-custom textarea { resize: vertical; min-height: 220px; }
.role-selection-page .role-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.role-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.role-selection-page .role-error { color: #A13C38; background: #FAECEA; padding: 12px; margin: 0; font-size: 13px; }
.role-mobile-category { display: none; margin-bottom: 12px; }
.role-mobile-category label { display: block; margin-bottom: 4px; }
.role-selection-page :is(button, input, select, textarea, a):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 720px) {
  .role-browser { margin-top: 22px; }
  .role-browser-layout { grid-template-columns: minmax(0, 1fr); }
  .role-categories { display: none; }
  .role-mobile-category { display: block; }
  .role-toolbar { gap: 6px; margin-bottom: 12px; }
  .role-custom-button { padding: 7px 9px; }
}
