/* Экран «Профиль» (profile-view.js) — общий для веба и /tg/. Язык «Мягкого
   матового чёрного»: волосяные линии, моноширинные подписи, латунь только
   в номере клиента. */
.profile-view { display: flex; flex-direction: column; gap: var(--gap-group, 28px); max-width: var(--measure, 40rem); }
.profile-head { display: flex; flex-direction: column; gap: 12px; }
.profile-back { align-self: flex-start; min-height: 44px; margin-left: -4px; padding: 0 4px; border: 0; background: none; color: var(--bone); font: inherit; font-family: var(--ui); font-size: var(--fs-body); cursor: pointer; }
.profile-card { border: 1px solid var(--hairline); border-radius: 2px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.profile-number { margin: 0; font-family: var(--ui); font-size: var(--fs-display-sm, 28px); font-weight: 300; letter-spacing: 0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.profile-tier { margin: 0; font-family: var(--ui); font-size: var(--fs-small); color: var(--mist); }
.profile-group { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.profile-caption { margin: 0; font-family: var(--ui); font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.01em; color: var(--ash); }
.profile-row { display: flex; align-items: baseline; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--hairline); }
.profile-row:last-child { border-bottom: 0; }
.profile-label { color: var(--bone); white-space: nowrap; flex-shrink: 0; }
.profile-value { margin-left: auto; color: var(--mist); font-size: var(--fs-small); text-align: right; }
.profile-list { display: flex; flex-direction: column; }
.profile-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-theme { min-height: 44px; font-family: var(--ui); padding: 0 14px; border: 1px solid var(--hairline-strong); border-radius: 2px; background: transparent; color: var(--mist); font: inherit; font-size: var(--fs-small); cursor: pointer; }
.profile-theme[aria-checked='true'] { color: var(--bone); border-color: var(--bone); }
.profile-hint, .profile-note { margin: 0; color: var(--ash); font-size: var(--fs-small); }
.profile-note:empty { display: none; }
.profile-link { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--hairline); color: var(--bone); text-decoration: none; text-align: left; }
.profile-action { margin-left: 12px; min-height: 44px; border: 0; background: none; color: var(--mist); font: inherit; font-family: var(--ui); font-size: var(--fs-small); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); }
.profile-erase { border: 0; border-bottom: 1px solid var(--hairline); background: none; width: 100%; font: inherit; font-family: var(--ui); color: var(--mist); cursor: pointer; padding: 0; }
.profile-add { align-self: flex-start; }
.profile-logout { align-self: stretch; margin-top: 12px; min-height: 48px; border: 1px solid var(--hairline-strong); border-radius: 2px; background: none; color: var(--bone); font: inherit; font-family: var(--ui); font-size: var(--fs-body); cursor: pointer; }
.brand .profile-entry { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--hairline-strong); border-radius: 2px; color: var(--bone); font-family: var(--ui); font-size: var(--fs-small); text-decoration: none; }
.brand .profile-entry[hidden] { display: none; }
.profile-key { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.profile-key-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.profile-key .profile-label { white-space: normal; }
.profile-key-meta { color: var(--mist); font-size: var(--fs-small); }
.profile-key-meta:empty { display: none; }
.profile-key[data-current='true'] .profile-key-meta { color: var(--bone); }
.profile-key .profile-action { margin-left: 0; flex-shrink: 0; }

#screen-memory .profile-row { display: grid; grid-template-columns: minmax(0, 1fr); }
#screen-memory .profile-row > .profile-label,
#screen-memory .profile-row > .profile-value,
#screen-memory .profile-row > .profile-note { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#screen-memory .profile-row > .profile-value { margin-left: 0; text-align: left; }
#screen-memory .profile-row > .profile-action { justify-self: end; margin-left: 0; }

/* Экран «Мои данные» (data-view.js): строки отметок складываются, как в
   экране памяти, — длинная подпись отметки не должна ломать узкий экран. */
#screen-data .profile-row { display: grid; grid-template-columns: minmax(0, 1fr); }
#screen-data .profile-row > .profile-label,
#screen-data .profile-row > .profile-note { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#screen-data .profile-row > .profile-action { justify-self: end; }
