.login-password-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.login-password-label a, .auth-subtitle a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.club-empty { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 150px; padding: 28px 16px; }
.club-empty strong { font-size: 16px; color: var(--text); }
.club-empty p { font-size: 14px; max-width: 45ch; }
.club-empty a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.club-date-range { margin-inline-start: auto; color: var(--text-muted); font-size: 13px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sessions-filter .filter-bar .form-item { min-width: 0; max-width: none; }
.sessions-filter .filter-bar .session-period { flex: 1.35 1 350px; container: period / inline-size; }
@container period (max-width: 318px) {
  #filterTypeSelect .custom-select__trigger:has(.club-date-range:not([hidden])) { display: grid; grid-template-columns: minmax(0,1fr) auto; row-gap: 2px; }
  #filterTypeSelect .club-date-range { grid-column: 1; margin: 0; }
  #filterTypeSelect .custom-select__chevron { grid-column: 2; grid-row: 1 / span 2; }
}
.headset-update { white-space: nowrap; }
.points-card { container: records / inline-size; }
.points-name, .points-sub { overflow-wrap: anywhere; }
.legal-jump { display: flex; gap: 5px 18px; flex-wrap: wrap; border-block: 1px solid var(--border); padding: 12px 0; }
.legal-jump a { color: var(--accent); font-weight: 650; line-height: 2; }

@media (max-width: 640px) {
  .table-card:has(.club-records) { container: records / inline-size; }
}
@container records (max-width: 919px) {
  .points-actions { justify-content: flex-start; }
  .table-scroll:has(.club-records), .page-finances .table-card .table-scroll:has(.club-records) { max-height: none; }
  .table-card .table-scroll .club-records { width: 100%; min-width: 0; display: block; }
  .club-records thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .club-records tbody { display: block; }
  .club-records tbody tr { display: block; padding: 12px 15px; border-bottom: 1px solid var(--border); }
  .club-records tbody tr:last-child { border: 0; }
  .table-scroll .club-records tbody td { display: flow-root; padding: 5px 0; text-align: right; white-space: normal; overflow-wrap: anywhere; border: 0; }
  .club-records td[data-label]::before { content: attr(data-label); content: attr(data-label) / ""; float: left; margin-right: 10px; color: var(--text-muted); font: 600 12px/1.7 var(--font-sans); }
  .table-scroll .club-records tbody td:first-child { text-align: left; font-weight: 600; padding-bottom: 10px; }
  .club-records td:first-child::before, .club-records td:last-child[data-label="Действия"]::before { display: none; }
  .table-scroll .club-records tbody td[data-label="Действия"] { text-align: left; padding-top: 8px; }
  .club-records .btn { margin: 2px 3px 2px 0; }
}
@media (max-width: 480px) {
  .sessions-filter .filter-bar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sessions-filter .form-item { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .app-content { transition: none; }
}


/* Interaction details on the original cabinet components. */
.close-drawer { display: none; }
.sidebar .nav-item { flex-shrink: 0; }
.sidebar .nav-item.active { box-shadow: inset 3px 0 var(--accent-fill); }
.sidebar :is(.nav-item,.profile-trigger,.sidebar-balance,.collapse-btn,.close-drawer):focus-visible { outline: 2px solid #a9ceff; outline-offset: -3px; }
.sidebar .profile-popover__account-email { white-space: normal; overflow-wrap: anywhere; }
.sidebar .profile-trigger[aria-expanded="true"] { background: rgb(255 255 255 / .13); }
.sidebar .profile-trigger__email, .sidebar .profile-trigger:hover .profile-trigger__email { color: #f5f5f7; }
@media (hover:hover) and (pointer:fine) {
  .sidebar .nav-item:hover, .sidebar .profile-trigger:hover, .sidebar .collapse-btn:hover { background-color: rgb(255 255 255 / .10); }
  .sidebar .nav-item.active:hover { background-color: var(--sidebar-active-bg); }
}
.club-code { font: 600 1.55rem/1.3 var(--font-mono); letter-spacing: .28em; }
.point-shortcuts { display: block; margin-top: 4px; font-size: 12px; }
.point-shortcuts a, .headset-update { text-decoration: underline; text-underline-offset: 3px; }
.app-content, .main-area, .content-wrap, .form-row, .page-head__text, .auth-head { min-width: 0; }
.page-meta { flex-wrap: wrap; }
@media (max-width:760px) {
  .app-shell[data-collapsed="true"] .app-content { margin-left: 0; }
  .sidebar .sidebar__top { display: flex; }
  .sidebar .collapse-btn { display: none; }
  .close-drawer { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--sidebar-text); background: transparent; border: 1px solid var(--sidebar-border); font: inherit; }
  .sidebar .nav-item { min-height: 44px; }
  .page-downloads .main-area { padding-top: 76px; }
  .install-note { grid-template-columns: 1fr; gap: 4px; }
}


/* Keep small text legible against tinted surfaces in either theme. */
.status-success { color: light-dark(#176d32, #7ee99b); }
.sidebar-balance__label { color: #b6b6bd; }
.finance-tabs .segmented__item:not(.is-active) { color: var(--text); }
.pill-accent, .docs-tab.is-active { color: color-mix(in srgb, var(--accent) 65%, var(--text)); }
.headset-model-name { color: var(--text); }
.table-head-main { flex-wrap: wrap; white-space: normal; overflow: visible; }
@media (max-width:760px) {
  .table-head { flex-wrap: wrap; }
  .table-head-main .page-meta { gap: 4px 12px; }
}

.page-downloads .content-wrap { container: downloads / inline-size; max-width: 1100px; }
.download-heading { margin-bottom: 24px; }
.package-group + .package-group { margin-top: 26px; }
.package-group h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
.package-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 16px; }
.package-card {
  --inset: clamp(16px,2.2cqw,24px);
  min-width: 0; padding: 20px var(--inset) 0; overflow-wrap: anywhere; scroll-margin-block: 68px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.package-card:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.package-head { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 5px 13px; }
.package-icon { grid-row: 1 / span 2; box-sizing: border-box; display: grid; place-items: center; width: 52px; height: 52px; padding: 8px; border-radius: 12px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
.package-icon img { width: 100%; height: 100%; object-fit: contain; }
.package-head h3 { align-self: end; margin: 0; color: var(--text); font-size: clamp(18px,4.4cqw,21px); font-weight: 650; letter-spacing: -.024em; line-height: 1.25; }
.package-meta { color: var(--text-muted); font-size: 13px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.package-purpose { grid-column: 2; align-self: start; margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.package-guides { display: flex; flex-wrap: wrap; gap: 3px 16px; margin: 12px 0 19px; }
.package-guides a, .points-footnote a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb,var(--accent) 38%,transparent); }
.package-guides a { font-size: 13px; }
.package-guides a:hover, .points-footnote a:hover { text-decoration-color: currentColor; }
.package-builds { background: color-mix(in srgb,var(--surface-3) 52%,var(--surface)); border-radius: 14px; padding: 0 14px; margin: 0 0 14px; }
.package-build { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 14px; padding: 13px 0; }
.package-build + .package-build { border-top: 1px solid var(--border); }
.package-build strong { display: block; font-size: 15px; line-height: 1.35; font-weight: 610; }
.package-build .package-meta { margin: 3px 0 0; }
.package-build .btn { min-height: 38px; border-radius: 10px; font-size: 14px; padding: 7px 15px; }
.package-build--beta strong { font-weight: 520; }
.package-card { container: package / inline-size; }
@container package (max-width: 310px) {
  .package-build { grid-template-columns: 1fr; justify-items: start; gap: 9px; }
}
.package-notes { border-top: 1px solid var(--border); }
.package-notes summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 0; list-style: none; cursor: pointer; font-size: 14px; font-weight: 550; }
.package-notes summary::-webkit-details-marker { display: none; }
.package-notes summary::after { content: ""; width: 8px; height: 8px; margin-right: 3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); color: var(--text-muted); }
.package-notes[open] summary::after { transform: translateY(2px) rotate(225deg); }
.package-notes summary:hover, .package-notes summary:hover::after { color: var(--accent); }
.package-notes summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.package-notes p { margin: 0; padding: 0 0 16px; font-size: 14px; line-height: 1.55; white-space: pre-line; }
.points-footnote { margin: 14px 0; color: var(--text-muted); font-size: 13px; }
#point-create-modal .modal__dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
@container downloads (max-width: 670px) {
  .package-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .package-group + .package-group { margin-top: 22px; }
}

/* Shared workspace and journal */
.rail-home { display: inline-flex; align-items: center; gap: 9px; color: #f5f5f7; font-size: 15px; font-weight: 620; letter-spacing: -.025em; text-decoration: none; padding: 3px 4px; }
.rail-home img { width: 28px; height: 28px; border-radius: 50%; }
.sidebar .sidebar__top { justify-content: space-between; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--sidebar-border); margin-bottom: 6px; }
.sidebar[data-collapsed="true"] .rail-home { display: none; }
.app-shell .page-head .page-eyebrow { display: none; }
.page-title { letter-spacing: -.035em; line-height: 1.15; }
.table-card .table-head, .table-card .toolbar { row-gap: 8px; }
.table-head__title, .table-head-main > strong { letter-spacing: -.015em; }
.page-head .pill-neutral { background: transparent; color: var(--text-muted); }
.sessions-filter.panel { padding: 0; border: none; box-shadow: none; background: transparent; margin-bottom: 20px; }
.sessions-filter .form-item:empty { display: none; }
.sessions-filter .filter-submit { min-width: 104px; }
.sessions-chart-panel { padding-bottom: 10px; }
.sessions-chart-canvas-wrap { border: 0; padding: 0; background: transparent; }
.sessions-chart-head .panel-title { font-size: 19px; }
.chart-total { font-size: 23px; line-height: 1.25; font-weight: 630; letter-spacing: -.025em; }
.chart-total small { font-weight: 450; letter-spacing: 0; color: var(--text-muted); font-size: 13px; }
.key-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 16px; margin-bottom: 20px; padding-block: 12px; border-block: 1px solid var(--border); font-size: 14px; }
.key-summary strong { font-weight: 550; }
.key-summary a { margin-inline-start: auto; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.finance-tabs.segmented { padding: 0; border: 0; background: transparent; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; align-self: stretch; gap: 4px; margin-bottom: 18px; }
.finance-tabs .segmented__item { border-radius: 8px 8px 0 0; border: 0; border-bottom: 2px solid transparent; padding: 9px 12px; }
.finance-tabs .segmented__item.is-active { box-shadow: none; border-bottom-color: var(--accent); background: transparent; }
.finance-tabs .segmented__item:hover { background: var(--surface); }
.referrals-grid .stat-card__value { letter-spacing: -.04em; }
@media(max-width:760px) {
  .sidebar[data-collapsed="true"] .rail-home { display: inline-flex; }
  .sidebar[data-collapsed="true"] .sidebar__top { justify-content: space-between; }
  .finance-tabs.segmented { display: flex; flex-wrap: wrap; row-gap: 1px; }
  .finance-tabs .segmented__item { padding: 7px 9px; }
  #sessionsSuccessChart { height: 165px; }
  .chart-total { font-size: 18px; }
  .key-summary a { margin-inline-start: 0; }
}


.page-finances .table-card:has(> .table-empty) { flex: 0 0 auto; }
.page-finances .table-empty { padding: 34px 20px; }
@media (max-width:640px) {
  .page-promo .promo-filter { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
  .promo-filter .promo-filter__track { flex: 1 1 100%; flex-wrap: wrap; }
  .promo-filter .promo-game { width: 100%; max-width: none; }
}


/* Account settings have one header and one scrolling content area. */
#userMenu .settings-modal__dialog {
  display: flex; flex-direction: column; width: min(100%, 610px); height: min(528px, calc(100dvh - 48px));
  border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.settings-modal__dialog > .modal__head {
  padding: 23px 26px 18px; align-items: flex-start; border-bottom: 0; flex: none;
}
.preferences-heading { min-width: 0; }
.preferences-heading h2 { font-size: 26px; font-weight: 650; line-height: 1.15; letter-spacing: -.035em; margin: 0; }
.preferences-heading p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; margin: 6px 0 0; color: var(--text-muted); font-size: 13px; }
.preferences-heading p span:first-child { overflow-wrap: anywhere; }
.preferences-heading p span + span { border-inline-start: 1px solid var(--border-strong); padding-inline-start: 10px; }
.settings-modal__dialog > .modal__head .icon-btn { flex: none; width: 34px; height: 34px; border: 0; background: var(--surface-3); border-radius: 50%; }
.settings-modal__dialog .settings-modal__body { flex: 1 1 auto; flex-direction: column; min-height: 0; height: auto; }
.settings-modal__dialog .settings-nav { flex: none; padding: 0 26px; background: transparent; border: 0; border-bottom: 1px solid var(--border); }
.settings-modal__dialog .settings-nav__tabs { flex-direction: row; gap: 13px; overflow: visible; }
.settings-modal__dialog .settings-nav__tab {
  flex: none; min-height: 42px; padding: 0 3px; margin-bottom: -1px; background: transparent; border-radius: 0;
  border: 0; border-bottom: 2px solid transparent; font-size: 14px; color: var(--text-muted);
}
.settings-modal__dialog .settings-nav__tab.is-active { color: var(--text); font-weight: 650; border-bottom-color: var(--accent); }
.settings-modal__dialog .settings-nav__tab:hover { color: var(--text); }
.settings-modal__dialog .settings-panels { flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto; overscroll-behavior: contain; }
.settings-modal__dialog .settings-panel { height: auto; min-height: 315px; padding: 22px 26px 16px; }
.settings-modal__dialog .settings-row { flex-direction: row; align-items: center; min-height: 60px; gap: 12px; padding: 12px 0; }
.settings-modal__dialog :is(.settings-row__label,.settings-subhead,.preferences-section-title,.theme-choices legend) { color: var(--text); text-transform: none; letter-spacing: -.015em; font-size: 15px; font-weight: 610; }
.settings-modal__dialog .settings-row__text { min-width: 0; }
.settings-modal__dialog .settings-row__control { flex: none; }
.settings-modal__dialog .settings-row__hint { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.preferences-section-title { margin: 0 0 4px; }
.theme-choices { min-width: 0; border: 0; padding: 0 0 16px; margin: 0; border-bottom: 1px solid var(--border); }
.theme-choices legend { padding: 0; margin: 0 0 12px; }
.theme-choices__options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.theme-choice { position: relative; display: grid; cursor: pointer; gap: 6px; text-align: center; color: var(--text-muted); font-size: 13px; }
.theme-choice input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; }
.theme-sample {
  --sample-paper: #fff; --sample-rail: #dedfe4; --sample-line: #c4c5cb;
  position: relative; display: block; height: 58px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: linear-gradient(to right,var(--sample-rail) 24%,var(--sample-paper) 24%);
}
.theme-sample--dark { --sample-paper: #33373e; --sample-rail: #202329; --sample-line: #929ca9; }
.theme-sample--system { --sample-paper: #fff; background: linear-gradient(100deg,#dedfe4 0 21%,#fff 21% 50%,#33373e 50%); }
.theme-sample::before, .theme-sample::after, .theme-sample i { content: ""; position: absolute; left: 34%; border-radius: 5px; }
.theme-sample::before { top: 13px; height: 5px; width: 31%; background: var(--sample-line); }
.theme-sample i { top: 24px; height: 3px; width: 47%; background: var(--sample-line); }
.theme-sample::after { top: 35px; height: 7px; width: 20%; background: var(--accent-fill); }
.theme-choice input:checked + .theme-sample { border: 2px solid var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.theme-choice input:checked ~ span:last-child { color: var(--text); font-weight: 650; }
.theme-choice input:focus-visible + .theme-sample { outline: 2px solid var(--text); outline-offset: 2px; }
.theme-choice:hover .theme-sample { border-color: var(--accent); }
.settings-select { font: inherit; padding: 7px 10px; min-width: 112px; border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); background: var(--surface-2); }
.setting-switch { appearance: none; -webkit-appearance: none; position: relative; width: 43px; height: 26px; border-radius: 20px; margin: 0; cursor: pointer; background: light-dark(var(--text-subtle), var(--surface-3)); border: 1px solid var(--border-strong); }
.setting-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #0004; }
.setting-switch:checked { background: var(--accent-fill); }
.setting-switch:checked::after { background: var(--text-on-accent); transform: translateX(17px); }
.setting-switch:disabled { cursor: wait; opacity: .65; }
.setting-switch:focus-visible, .settings-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.settings-password[hidden] { display: none; }
.settings-password { padding-top: 4px; }
.settings-password .btn-block { justify-self: start; width: auto; padding-inline: 20px; }
.settings-panel .settings-row__number { width: 88px; flex: none; }
.settings-modal__dialog .accent-swatches { gap: 6px; }
.settings-modal__dialog .accent-swatch { width: 30px; height: 30px; }
.profile-popover { border-radius: 16px; }
.profile-popover .profile-popover__item--switch { padding-block: 8px; }
@media (prefers-reduced-motion:no-preference) {
  .setting-switch { transition: background-color 140ms ease; }
  .setting-switch::after { transition: transform 140ms ease; }
}
@media(max-width: 540px) {
  dialog#userMenu { padding: 0; align-items: end; }
  #userMenu .settings-modal__dialog { height: min(610px, calc(100dvh - 16px)); border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .settings-modal__dialog > .modal__head { padding: 18px 16px 12px; }
  .settings-modal__dialog .settings-nav { padding-inline: 16px; }
  .settings-modal__dialog .settings-nav__tabs { justify-content: space-between; gap: 3px; }
  .settings-modal__dialog .settings-nav__tab { font-size: 13px; }
  .settings-modal__dialog .settings-panel { padding: 16px; }
  .theme-choices__options { gap: 6px; }
  .settings-modal__dialog .accent-swatches { gap: 1px; }
  .settings-modal__dialog .accent-swatch { width: 25px; height: 28px; }
}
@media(forced-colors:active) { .setting-switch { appearance: auto; } .setting-switch::after { display:none; } }

