.library-page { background: var(--bg); color: var(--text); letter-spacing: 0; }
.library-page [hidden] { display: none !important; }
.library-page:not(.compact-header-page) .topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 32px; min-height: 72px; }
.library-page a:not(.top-section-tabs a) { color: inherit; text-decoration: none; }
.library-page .library-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; flex-shrink: 0; }
.library-brand img { width: 27px; height: 27px; }
.library-site-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.library-site-nav a { padding: 9px 14px; font-size: 13px; border-radius: 5px; color: var(--muted); }
.library-site-nav a:hover, .library-site-nav [aria-current] { color: var(--text); background: var(--hover); }
.library-main { max-width: 1160px; margin: 0 auto; padding: 36px 32px 72px; }
.library-identity { display: flex; align-items: center; gap: 16px; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.account-avatar { position: relative; width: 56px; height: 56px; border-radius: 8px; background: var(--selection); border: 1px solid var(--line-strong); color: var(--accent); display: grid; place-items: center; font-size: 21px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-avatar:has(img) > span { visibility: hidden; }
.account-avatar-preview { width: 88px; height: 88px; margin: 16px 0; }
.account-avatar-actions { display: flex; align-items: center; gap: 12px; }
.avatar-remove-icon { --icon: url('/assets/trash-2.svg'); }
.identity-copy { flex: 1; min-width: 0; }
.profile-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.profile-name-line > :is(h1, strong) { min-width: 0; overflow-wrap: anywhere; }
.subscriber-badge { display: inline-flex; align-items: center; gap: 4px; color: #edcc82; font-size: var(--font-caption); font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.ui-icon.subscriber-badge__icon { --icon: url('/assets/star.svg'); width: 13px; height: 13px; }
.library-page main h1 { font-size: 24px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.library-identity p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.library-page .library-command { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 13px; border-radius: 5px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; font-weight: 500; line-height: 1.4; text-align: center; color: var(--text); cursor: pointer; white-space: normal; }
.library-page .library-command:hover { background: var(--hover); border-color: var(--accent); transform: none; }
.library-page .library-command.primary, .library-page .profile-action-button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.library-page .danger { color: #ff9b9b; }
#profileLogoutButton { color: #ff9b9b; }
.library-page main button:disabled { opacity: .45; cursor: not-allowed; }
.library-page :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ui-icon { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; background: currentColor; mask: var(--icon) center/contain no-repeat; }
.settings-icon { --icon: url('/assets/settings-2.svg'); }
.more-icon { --icon: url('/assets/ellipsis.svg'); }
.search-icon { --icon: url('/assets/search.svg'); }
.library-section-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.library-section-heading h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.library-section-heading h2 span { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.profile-subscription { margin-bottom: 32px; min-width: 0; }
.profile-subscription .library-section-heading { margin-bottom: 12px; }
.profile-subscription-table { min-width: 0; }
.profile-subscription-columns, .profile-subscription-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 180px; align-items: center; gap: 20px; min-width: 0; }
.profile-subscription-columns { color: var(--muted); font-size: var(--font-caption); padding: 0 0 8px; }
.profile-subscription-row { padding: 12px 0; font-size: 13px; }
.profile-subscription-row + .profile-subscription-row { border-top: 1px solid var(--line); }
.profile-subscription-row > * { min-width: 0; overflow-wrap: anywhere; }
.profile-subscription-row strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; }
.profile-subscription-row small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--font-control); }
#profileSubscriptionStatus:empty { display: none; }
.library-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.library-toolbar .library-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; margin: 0; color: var(--muted); border: 1px solid var(--line); padding: 0 12px; background: var(--bg); border-radius: 5px; }
.library-search input { border: 0; background: transparent; width: 100%; min-width: 0; height: 38px; margin: 0; padding: 0; color: var(--text); }
.library-toolbar select { width: auto; max-width: 100%; margin: 0; height: 40px; font-size: 13px; }
.library-map-filter { position: relative; font-size: 13px; flex-shrink: 0; }
.library-map-filter summary { cursor: pointer; padding: 10px 12px; min-width: 140px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-2); }
.map-filter-options { position: absolute; top: calc(100% + 6px); right: 0; z-index: 15; min-width: 190px; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px #0006; }
.map-filter-options label { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0; color: var(--text); cursor: pointer; }
.map-filter-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.map-filter-options button { width: 100%; font-size: var(--font-control); padding: 8px; margin-top: 4px; }
.library-columns, .library-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 144px 36px; gap: 20px; align-items: center; padding: 12px; }
.library-columns { color: var(--muted); font-size: var(--font-caption); padding-top: 0; border-bottom: 1px solid var(--line); }
.library-row { min-height: 82px; border-bottom: 1px solid var(--line); transition: background-color 140ms ease; }
.library-row:hover, .library-row:focus-within { background: var(--hover); }
.library-document { display: flex; align-items: center; gap: 14px; min-width: 0; }
.library-thumbnail { width: 64px; height: 48px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; flex-shrink: 0; overflow: hidden; }
.library-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.library-thumbnail img.blank-thumbnail { width: 24px; height: 24px; opacity: .7; }
.library-document-title { display: grid; min-width: 0; gap: 6px; }
.library-document strong { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.library-document:hover strong { color: var(--accent); }
.library-document small { color: #efc86c; font-size: var(--font-caption); }
.library-maps { display: flex; gap: 6px 12px; flex-wrap: wrap; color: var(--text); font-size: var(--font-control); }
.library-date { font-size: var(--font-control); color: var(--muted); font-variant-numeric: tabular-nums; }
.library-page .library-icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; background: transparent; border-radius: 5px; color: var(--muted); }
.library-page .library-icon-button:hover { color: white; background: var(--hover); border-color: var(--line); transform: none; }
.library-drafts { margin-bottom: 36px; }
.library-drafts .library-section-heading { margin-bottom: 10px; }
.library-drafts .library-section-heading > span { font-size: var(--font-control); color: #efc86c; }
.is-draft { border-left: 2px solid #cba44b; background: var(--panel); }
.is-draft .library-date { color: #e2c581; }
.library-empty { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 52px 20px; color: var(--muted); }
.library-empty img { width: 32px; height: 32px; opacity: .7; }
.library-empty h3 { font-size: 15px; font-weight: 500; margin: 0; }
.library-status { color: var(--muted); font-size: var(--font-control); line-height: 1.5; min-height: 18px; overflow-wrap: anywhere; }
.library-menu { position: fixed; z-index: 100; padding: 5px; width: 204px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 35px #0009; }
.library-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: transparent; font-size: 13px; color: var(--text); }
.library-menu button:hover { background: var(--selection); transform: none; }
.library-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-2); color: var(--text); }
.library-dialog::backdrop { background: rgba(var(--bg-rgb), 0.741); }
.library-dialog h2 { font-size: 18px; line-height: 1.4; margin: 0 0 18px; }
.library-dialog p { font-size: 13px; color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.library-dialog input { width: 100%; min-width: 0; }
.library-dialog label { display: block; font-size: var(--font-control); margin: 12px 0 8px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dialog-error { min-height: 18px; }
.settings-main { max-width: 800px; margin: 0 auto; padding: 32px 32px 64px; }
#settingsStatus.settings-email-warning { color: #ff5c5c; font-size: 14px; font-weight: 600; }
#settingsStatus.settings-email-warning a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.settings-back { display: inline-block; margin-bottom: 24px; font-size: 13px; color: var(--muted) !important; }
.settings-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 20px 0 28px; }
.settings-tabs a { font-size: 14px; color: var(--muted); padding: 12px 0; border-bottom: 2px solid transparent; }
.settings-tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.settings-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 440px; }
.settings-form label { display: block; margin: 8px 0 0; font-size: 13px; color: var(--text); }
.settings-form input { width: 100%; min-width: 0; margin: 0; }
.settings-form small { color: var(--muted); font-size: var(--font-control); }
.settings-form > button { justify-self: start; margin-top: 12px; }
.email-connection-form { margin-top: 20px; }
#emailActionForm > div:not([hidden]) { display: grid; gap: 10px; min-width: 0; }
.settings-form h2, .settings-sessions h2, .connection-row h2 { font-size: 16px; margin: 0 0 8px; }
.settings-avatar-row { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.settings-avatar-row > div { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.library-page .settings-avatar-button { box-sizing: border-box; width: 56px; min-width: 56px; height: 56px; min-height: 56px; padding: 0; margin: 0; transform: none; }
.library-page .settings-avatar-button:not(:disabled):hover { background: var(--selection); border-color: var(--accent); transform: none; }
.settings-muted { color: var(--muted); font-size: var(--font-control); }
.settings-sessions { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 20px; }
.settings-profile-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(100px, 1fr); gap: 24px; align-items: start; }
.settings-profile-actions { display: flex; justify-content: flex-end; align-self: start; }
.settings-sessions > div { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 20px 0; }
.connection-row > div { min-width: 0; overflow-wrap: anywhere; }
.connection-row p { color: var(--muted); font-size: 13px; margin: 6px 0; }
.connection-row strong { font-size: 14px; font-weight: 500; }
.team-plus-icon { --icon: url('/assets/plus.svg'); }
.team-edit-icon { --icon: url('/assets/pencil.svg'); }
.team-remove-icon { --icon: url('/assets/trash-2.svg'); }
.profile-teams { margin-bottom: 32px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.profile-teams .library-section-heading { margin-bottom: 12px; }
.team-roster { padding: 18px 0; }
.team-roster + .team-roster { border-top: 1px solid var(--line); }
.team-heading, .team-invitation { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-heading h3 { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.team-avatar { position: relative; display: grid; place-items: center; box-sizing: border-box; flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 24px; font-weight: 600; }
.team-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-avatar:has(img) > span { visibility: hidden; }
.team-avatar.is-loading img { opacity: .4; }
.team-avatar.is-loading::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.team-avatar-preview { min-height: 72px; margin: 16px 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.team-avatar-preview .is-error { color: #ff9b9b; }
.team-avatar-file { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-avatar-file input { flex: 1; min-width: 0; }
.team-avatar-file .library-icon-button { flex: 0 0 34px; }
.team-person { display: grid; flex: 1; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.team-person strong { font-size: 13px; font-weight: 500; line-height: 1.5; }
.team-person small { color: var(--muted); font-size: var(--font-control); line-height: 1.5; }
.team-commands { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.team-members, .team-player-results { list-style: none; margin: 12px 0 0; padding: 0; }
.team-members li, .team-player-results li { display: flex; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--line); padding: 5px 8px; }
.team-members li:last-child { border-bottom: 0; }
.team-member-initials { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; background: var(--panel-2); color: var(--text); border-radius: 4px; font-size: var(--font-micro); }
.team-captain { color: #e7bf6e; font-size: var(--font-caption); padding: 3px 0 3px 10px; }
.team-role-label { color: var(--muted); font-size: var(--font-control); }
.library-page .team-member-role { flex: 0 0 132px; width: 132px; min-width: 0; margin: 0; padding: 5px 8px; height: 32px; border-radius: 4px; font-size: var(--font-control); }
.team-link-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.team-invite-management { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.team-invite-management h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.team-member-management { margin-top: 20px; }
.team-member-management h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.profile-teams .library-dialog { background: var(--panel); border-color: var(--line); }
.team-dialog :is(input, select) { background: var(--panel-2); border-color: var(--line); }
.team-dialog .team-avatar-preview { min-height: 56px; margin: 12px 0; padding: 0; border-bottom: 0; }
.team-dialog .team-avatar-preview .team-avatar { flex-basis: 56px; width: 56px; height: 56px; border: 0; border-radius: 6px; font-size: 20px; }
.team-dialog .team-captain { color: var(--muted); }
.team-dialog .team-profile-section h3 { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.team-dialog .team-profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.team-dialog .team-save-status { margin: 8px 0 0; min-height: 18px; }
.team-dialog .team-profile-actions .team-save-status { margin: 0; }
.team-dialog .team-roster-section { border-top: 1px solid var(--line); padding-top: 18px; }
.team-dialog .team-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.team-dialog .team-section-head .settings-muted { margin: 0; font-size: var(--font-control); }
.team-dialog .team-members { margin-top: 8px; }
.team-dialog .team-members li { padding-left: 0; padding-right: 0; border-bottom: 0; }
.library-page .team-dialog [data-team-action="link-create"] { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.library-page .team-dialog [data-team-action="link-create"]:not(:disabled):hover { background: var(--selection); border-color: var(--line-strong); }
.library-page .team-dialog .library-icon-button.danger { color: var(--feedback-error); }
.team-invite-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-invite-copy input { flex: 1; min-width: 0; margin: 0; font-size: var(--font-control); }
.team-invite-copy button { flex: 0 0 auto; }
.library-dialog .team-local-warning { color: #e7bf6e; }
.join-team-main { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 28px; width: min(800px, calc(100% - 64px)); margin: 64px auto; padding: 24px 28px 28px; border-top: 2px solid var(--line); }
.join-team-main > .join-team-heading { grid-column: 1 / -1; margin: 0 0 32px; color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 400; }
.join-team-details { display: flex; align-items: center; gap: 16px; grid-column: 1; grid-row: 2; min-width: 0; }
.join-team-details[hidden], .join-team-meta[hidden] { display: none; }
.join-team-initial { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--ct); font-size: 22px; font-weight: 600; }
.join-team-identity { min-width: 0; }
.join-team-details h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.join-team-captain { margin: 0; font-size: var(--font-control); line-height: 1.5; }
.join-team-captain > div, .join-team-meta > div { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.join-team-captain dt, .join-team-meta dt { color: var(--muted); }
.join-team-captain dd, .join-team-meta dd { margin: 0; overflow-wrap: anywhere; }
.join-team-actions { grid-column: 2; grid-row: 2; max-width: 280px; }
.join-team-actions .team-link-actions { justify-content: flex-end; margin-top: 0; }
.join-team-main .join-team-status { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; gap: 8px; margin: 21px 0 0; font-size: 13px; min-height: 20px; }
.join-team-details[hidden] ~ .join-team-status { grid-column: 1; grid-row: 2; margin: 0; }
.join-team-main[data-joined="true"] .join-team-status { color: var(--ct); }
.join-team-main[data-joined="true"] .join-team-status::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; background: currentColor; mask: url('/assets/check.svg') center / contain no-repeat; }
.join-team-main .join-team-notice { grid-column: 1 / -1; grid-row: 4; margin: 12px 0 0; font-size: var(--font-control); line-height: 1.5; color: var(--muted); }
.join-team-meta { grid-column: 1 / -1; grid-row: 5; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--font-control); line-height: 1.5; }
.team-invitations { margin-bottom: 20px; }
.team-invitations > h3 { margin: 0 0 8px; color: var(--muted); font-size: var(--font-control); font-weight: 500; }
.team-invitation { border-left: 2px solid var(--accent); padding: 12px; background: var(--panel); margin-top: 6px; }
.team-outgoing { display: flex; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin: 10px 8px 0; color: var(--muted); font-size: var(--font-control); overflow-wrap: anywhere; }
.team-pending-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; color: var(--text); }
.team-pending-name > span { min-width: 0; overflow-wrap: anywhere; }
.team-pending-name .library-icon-button { width: 28px; height: 28px; flex: 0 0 28px; }
.team-feedback-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.team-feedback-row p { margin: 0; }
.team-empty { margin: 16px 0; color: var(--muted); font-size: 13px; }
.team-dialog input[type="file"] { box-sizing: border-box; font-size: var(--font-control); padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.team-dialog input[type="file"]::file-selector-button { border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); color: var(--text); padding: 6px 10px; margin-right: 10px; cursor: pointer; }
.team-dialog input[type="file"]::file-selector-button:hover { background: var(--selection); border-color: var(--line-strong); }
.team-dialog .settings-muted { display: block; margin-top: 4px; }
.team-player-results { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.telegram-connection { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.telegram-connection .telegram-heading { border-bottom: 0; }
.telegram-link label { display: block; font-size: var(--font-control); color: var(--muted); margin-bottom: 8px; }
.telegram-link-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.telegram-link-controls input { flex: 1 1 280px; min-width: 180px; width: auto; margin: 0; height: 38px; box-sizing: border-box; font-size: var(--font-control); }
.telegram-link-controls .library-command { flex: 0 0 auto; }
.telegram-connection > .library-status { margin: 8px 0 0; }
.login-main { width: min(100%, 480px); box-sizing: border-box; margin: 0 auto; padding: 40px 24px 64px; }
.login-modes { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 20px; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.library-page .login-modes button { min-height: 36px; padding: 8px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: 13px; transform: none; }
.library-page .login-modes [aria-selected="true"] { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.login-main .settings-form { max-width: none; }
.login-main .settings-form [data-register-field] { display: grid; gap: 10px; min-width: 0; }
.login-main .settings-form > button { width: 100%; margin-top: 0; }
.login-main .library-status { margin: 4px 0 0; }
.login-main .is-error { color: #ff9b9b; }
.login-main input[aria-invalid="true"] { border-color: #cc7373; }
.password-field { position: relative; min-width: 0; }
.password-field > input { width: 100%; padding-right: 44px; }
.library-page .password-field > .password-visibility {
  position: absolute; top: calc(50% - 15px); right: 6px; display: grid; place-items: center;
  width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; margin: 0;
  border: 0; border-radius: 4px; background: transparent; color: var(--muted); transform: none;
}
.library-page .password-field > .password-visibility:not(:disabled):hover { background: var(--hover); color: var(--text); transform: none; }
.library-page .password-field > .password-visibility:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.profile-roles { margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.profile-roles .library-section-heading { margin-bottom: 12px; }
.profile-role-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(180px, auto) 18px; gap: 16px; align-items: center; padding: 12px 8px; }
.profile-role-row + .profile-role-row { border-top: 1px solid var(--line); }
.profile-role-row:hover { background: var(--hover); }
.profile-role-map, .profile-role-progress { font-size: var(--font-control); color: var(--muted); overflow-wrap: anywhere; }
.profile-role-progress { font-variant-numeric: tabular-nums; }
.profile-role-open-icon { --icon: url('/assets/folder-open.svg'); color: var(--accent); }
@media (min-width: 761px) and (max-width: 1050px) {
  .library-main { padding-left: 24px; padding-right: 24px; }
  .team-heading, .team-invitation { gap: 10px; }
  .team-commands { max-width: 320px; }
}
@media (max-width: 760px) {
  .library-page:not(.compact-header-page) .topbar { padding: 14px 20px; flex-wrap: wrap; }
  .library-main, .settings-main { padding: 24px 20px 48px; }
  .library-columns, .library-row { grid-template-columns: minmax(0, 1fr) 120px 36px; gap: 12px; }
  .library-columns > span:nth-child(3) { display: none; }
  .library-date { grid-column: 1; padding-left: 78px; }
  .library-row > button { grid-column: 3; grid-row: 1; }
  .library-row .library-maps { grid-column: 2; grid-row: 1; }
  .library-toolbar { flex-wrap: wrap; }
  .library-toolbar .library-search { flex-basis: 100%; }
  .library-toolbar select { flex: 1; min-width: 0; }
  .map-filter-options { left: 0; right: auto; max-width: calc(100vw - 40px); }
}
@media (max-width: 480px) {
  .library-page:not(.compact-header-page) .topbar { gap: 12px; }
  .library-site-nav a { padding: 7px 10px; }
  .library-identity { flex-wrap: wrap; }
  .identity-copy { flex-basis: calc(100% - 72px); }
  .library-identity > a { margin-left: 72px; }
  .library-section-heading { align-items: flex-start; flex-wrap: wrap; }
  .library-columns { display: none; }
  .library-row { grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; padding: 14px 8px; }
  .library-row > button { grid-column: 2; }
  .library-row .library-maps { grid-column: 1; grid-row: 2; padding-left: 62px; }
  .library-date { padding-left: 62px; }
  .library-thumbnail { width: 48px; height: 40px; }
  .library-map-filter summary { min-width: 120px; }
  .settings-tabs { gap: 18px; }
  .settings-tabs a { font-size: 13px; }
  .connection-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .library-page * { animation: none !important; transition: none !important; } }
.profile-roles-shortcut { display:flex;align-items:center;gap:12px;padding:16px 0;color:var(--text);text-decoration:none;border-block:1px solid var(--line); }
.profile-roles-shortcut img { width:18px;height:18px;filter:invert(1);opacity:.8; }
.profile-roles-shortcut img:last-child { margin-left:auto; }
.profile-roles-shortcut strong { font-size:14px; }
.profile-roles-shortcut span { color:var(--muted);font-size:var(--font-control); }
.profile-roles-shortcut:hover strong { text-decoration:underline; }

.profile-page .profile-overview { max-width: 1280px; padding: 32px 28px 64px; }
.profile-overview .library-identity { padding-bottom: 24px; margin-bottom: 0; border-bottom: 0; }
.profile-overview .library-identity .account-avatar { width: 64px; height: 64px; border-radius: 6px; }
.profile-overview .library-identity > .library-command { align-self: center; flex-shrink: 0; }
.profile-overview .profile-name-line { margin-bottom: 3px; }
.profile-overview #profileHandle { margin: 0 0 4px; font-size: var(--font-control); overflow-wrap: anywhere; }
.profile-page .profile-overview .profile-text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; color: var(--ct); font-size: var(--font-control); line-height: 1.5; }
.profile-overview .profile-text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.profile-external-icon { --icon: url('/assets/external-link.svg'); width: 14px; height: 14px; }
.profile-access-icon { --icon: url('/assets/star.svg'); }
.profile-receipt-icon { --icon: url('/assets/external-link.svg'); width: 16px; height: 16px; }
.profile-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 34px; }
.profile-team-column, .profile-account-column { min-width: 0; }
.profile-overview .profile-teams { margin: 0; padding: 20px 0 0; border: 0; }
.profile-overview .profile-teams:has(.team-roster) > .library-section-heading { display: none; }
.profile-overview .profile-teams > [data-team-content] > .team-roster { padding: 0 0 18px; }
.profile-overview .team-roster > .team-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.profile-overview .team-roster > .team-heading > .team-avatar { flex-basis: 44px; width: 44px; height: 44px; border-radius: 6px; font-size: 17px; }
.profile-overview .team-roster > .team-heading h3 { font-size: 17px; }
.profile-overview .team-roster > .team-heading .team-commands { margin-left: auto; }
.profile-overview .team-roster > .team-members { margin-top: 0; }
.profile-overview .team-roster > .team-members > li { min-height: 54px; padding: 10px 0; gap: 12px; border-bottom: 0; }
.profile-overview .team-roster > .team-members > li:hover { background: var(--hover); }
.profile-overview .team-roster > .team-members .team-member-initials { flex-basis: 34px; width: 34px; height: 34px; border-radius: 4px; font-size: var(--font-control); }
.profile-overview .team-roster > .team-members .subscriber-badge { display: none; }
.profile-overview .team-roster > .team-members :is(.team-role-label, .team-captain) { flex: 0 0 100px; text-align: right; padding: 0; font-size: var(--font-control); overflow-wrap: anywhere; }
.profile-overview .team-feedback-row .library-status:empty { display: none; }
.profile-overview .profile-roles { border: 0; }
.profile-overview .profile-roles-shortcut { padding: 18px 0; border-block: 0; border-top: 1px solid var(--line); }
.profile-overview #profileRoleStatus:empty { display: none; }
.profile-private-label { margin: 0 0 12px; color: var(--muted); font-size: var(--font-control); line-height: 1.5; }
.profile-overview .profile-subscription { border: 0; padding-top: 20px; margin: 0; }
.profile-overview .library-section-heading { gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.profile-overview .library-section-heading h2 { font-size: 16px; }
.profile-access-list { display: grid; gap: 20px; }
.profile-access-item { min-width: 0; }
.profile-access-item :is(p, h3) { margin: 0; overflow-wrap: anywhere; }
.profile-access-item .profile-access-source { color: var(--muted); font-size: var(--font-control); line-height: 1.5; }
.profile-access-item .profile-access-source:empty { display: none; }
.profile-access-item h3 { font-size: 14px; font-weight: 500; line-height: 1.5; }
.profile-access-item .profile-access-expiry { margin-top: 4px; color: var(--muted); font-size: var(--font-control); line-height: 1.5; }
.profile-overview .profile-payments-link { margin-top: 16px; }
.profile-overview #profileSubscriptionStatus:empty { display: none; }
.profile-connections { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-connection-list { display: grid; gap: 12px; margin: 0; font-size: var(--font-control); line-height: 1.5; }
.profile-connection-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.profile-connection-list :is(dt, dd) { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.profile-connection-list dd { color: var(--muted); text-align: right; }
.profile-overview #profileConnectionsRetry { margin-top: 14px; }
.profile-page .legal-footer { border-top: 0; }
@media (max-width: 900px) {
  .profile-overview-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
}
@media (max-width: 760px) {
  .profile-overview-grid { grid-template-columns: minmax(0, 1fr); }
}
