/* Общие группы используют палитру и масштабы основного тренажёра. */
.groups-view { min-width: 0; gap: 20px; }
.groups-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.groups-view, .groups-view * { overflow-wrap: anywhere; }
.groups-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.groups-heading-copy { display: flex; flex-direction: column; gap: 10px; max-width: 66ch; min-width: 0; }
.groups-eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.groups-heading-actions, .groups-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.groups-heading-actions { flex: none; }
.groups-view .btn { min-height: 44px; }
.groups-refresh { min-width: 128px; }
.groups-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; }
.groups-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.groups-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.groups-section-heading > .small { font-variant-numeric: tabular-nums; }
.groups-demo-label { display: inline-flex; align-items: center; width: fit-content; margin-left: 6px; padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.4; vertical-align: middle; }
.groups-demo-notice { display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--accent); background: var(--surface-2); }
.groups-demo-notice h2 { font-size: 20px; }
.groups-demo-notice p { max-width: 78ch; line-height: 1.6; }
.groups-context { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.groups-points { font-weight: 650; }
.groups-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 32px; padding-bottom: 32px; }
.groups-empty p { max-width: 66ch; }
.groups-friends, .groups-invite-card, .groups-join-card, .groups-consent { display: flex; flex-direction: column; gap: 16px; }
.groups-profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.groups-profile-note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.groups-field { display: flex; flex-direction: column; gap: 8px; }
.groups-field label { font-weight: 600; }
.groups-input, .groups-select { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 16px; }
.groups-input::placeholder { color: var(--ink-2); opacity: .8; }
.groups-link-input { text-overflow: ellipsis; }
.groups-copy { display: flex; flex-direction: column; gap: 8px; }
.groups-copy-controls { display: flex; align-items: flex-start; gap: 8px; }
.groups-copy-controls .groups-input { flex: 1; }
.groups-copy-controls .btn { min-height: 48px; flex: none; }
.groups-copy [role="status"]:empty { display: none; }
.groups-friend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.groups-friend-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.groups-circle-link, .groups-circle-people { border-top: 1px solid var(--line); padding-top: 4px; }
.groups-circle-link .groups-copy { margin: 8px 0; }
.groups-circle-toggle, .groups-program { align-self: flex-start; }
.groups-invitation-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.groups-invitation-list > li { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.groups-invitation-copy { gap: 6px; min-width: 0; }
.groups-person-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); color: var(--ink); font-weight: 650; }
.groups-person-name { flex: 1; min-width: 0; }
.groups-error { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--chip-long-bg); color: var(--chip-long-ink); }
.groups-pending-invite { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.groups-pending-invite p { margin-top: 8px; }
.groups-week-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.groups-week-title { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.groups-week-title h2 { font-size: 23px; line-height: 1.25; }
.groups-week-nav { display: flex; gap: 8px; flex: none; align-items: center; }
.groups-week-arrow { width: 44px; padding-left: 0; padding-right: 0; }
.groups-self-result { display: flex; flex-direction: column; gap: 14px; }
.groups-personal-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.groups-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.groups-stat-value { font-size: 28px; font-weight: 650; line-height: 1.25; letter-spacing: -.02em; }
.groups-stat-value small { font-size: 14px; font-weight: 400; color: var(--ink-2); letter-spacing: normal; margin-left: 4px; }
.groups-stat-label { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.groups-component-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.groups-component-list p { display: flex; justify-content: space-between; gap: 16px; }
.groups-component-list strong { flex: none; font-weight: 600; }
.groups-rating-formula > p, .groups-rating-formula > h3 { margin-top: 16px; }
.groups-formula-text { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.groups-word-thresholds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.groups-word-thresholds > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.groups-word-thresholds span { color: var(--ink-2); }
.groups-word-thresholds strong { font-weight: 600; }
.groups-duels-card { display: flex; flex-direction: column; gap: 14px; }
.groups-duels-heading { display: flex; align-items: center; gap: 10px; }
.groups-duels-heading svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.groups-duels-card > .btn { align-self: flex-start; }
.groups-today, .groups-leaderboard { display: flex; flex-direction: column; gap: 14px; }
.groups-task-list { margin: 0; padding: 0; list-style: none; }
.groups-task { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.groups-task:first-child { padding-top: 6px; }
.groups-task:last-child { padding-bottom: 0; border-bottom: 0; }
.groups-task-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); border-radius: 50%; font-size: 14px; font-weight: 600; flex: none; }
.groups-task.done .groups-task-mark { background: color-mix(in srgb, var(--good) 12%, var(--surface)); color: var(--good-ink); }
.groups-task-status, .groups-all-done { color: var(--good-ink); }
.groups-task-copy { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.groups-task-copy h3 { line-height: 1.3; }
.groups-task-topic { color: var(--ink-2); }
.groups-task-action { align-self: center; }
.groups-ranking { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 16px; }
.groups-ranking th, .groups-ranking td { padding: 14px 8px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.groups-ranking thead th { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.groups-ranking tbody tr:last-child th, .groups-ranking tbody tr:last-child td { border-bottom: 0; }
.groups-ranking .groups-rank-col { width: 66px; }
.groups-ranking .groups-numeric-col { width: 104px; text-align: right; }
.groups-ranking .groups-ranking-points, .groups-ranking .groups-ranking-score { text-align: right; }
.groups-ranking-person { font-weight: 600; }
.groups-person-label { display: block; color: var(--ink-2); font-weight: 400; margin-top: 4px; }
.groups-person-label:empty { display: none; }
.groups-self { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.groups-ranking-denominator { color: var(--ink-2); white-space: nowrap; font-weight: 400; }
.groups-ranking-points { font-weight: 650; }
.groups-week-awards { display: flex; flex-direction: column; gap: 12px; }
.groups-award-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.groups-award { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px; }
.groups-award-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.groups-award-heading h3 { font-size: 17px; line-height: 1.4; }
.groups-award-heading .chip { font-size: 12px; }
.groups-award-heading .groups-demo-label { margin: 0; }
.groups-award-winners { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.groups-award-winners li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.groups-award-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.groups-award-person strong { font-size: 16px; font-weight: 600; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.groups-award-avatar { width: 44px; height: 44px; border-radius: 50%; font-size: 18px; }
.groups-award-score { flex: none; font-size: 19px; font-weight: 650; white-space: nowrap; }
.groups-award-score small { display: block; text-align: right; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.groups-award-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; align-self: flex-start; margin-top: auto; }
.groups-award-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.groups-standings .groups-rank-col { width: 52px; }
.groups-standings .groups-numeric-col { width: 100px; }
.groups-standings .groups-standing-row > th, .groups-standings .groups-standing-row > td { padding-block: 8px; }
.groups-standings .groups-ranking-person { padding-inline: 0; }
.groups-standing-scale { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; }
.groups-standings .groups-ranking-points { font-size: 21px; white-space: nowrap; }
.groups-rank-badge { display: inline-grid; place-items: center; min-width: 30px; min-height: 30px; border-radius: 8px; font-size: 15px; }
.groups-rank-first { background: var(--surface-2); color: var(--accent-ink); font-weight: 700; }
.groups-standing-trigger { display: grid; grid-template-columns: 44px minmax(0,1fr) 14px; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; touch-action: manipulation; transition: background .16s ease; }
.groups-standing-trigger:hover, .groups-standing-trigger:active { background: var(--surface-2); }
.groups-standing-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.groups-standing-trigger .groups-standing-avatar { width: 44px; height: 44px; border-radius: 50%; font-size: 18px; }
.groups-standing-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.groups-standing-name { font-size: 16px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.groups-standing-self { color: var(--ink-2); font-weight: 400; white-space: nowrap; }
.groups-standing-identity .groups-demo-label { margin: 0; padding: 1px 5px; font-size: 11px; }
.groups-standing-chevron { justify-self: center; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); transition: transform .16s ease; }
.groups-standing-trigger[aria-expanded="true"] .groups-standing-chevron { transform: rotate(225deg); }
.groups-standings .groups-standing-details > td { padding: 0; }
.groups-participant-results { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 10px; }
.groups-participant-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.groups-participant-heading h3 { font-size: 17px; line-height: 1.4; }
.groups-participant-heading .profile-test-label { margin: 0; }
.groups-participant-results > p:empty { display: none; }
.groups-participant-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 0; }
.groups-participant-metrics > div { display: flex; flex-direction: column; gap: 4px; }
.groups-participant-results dt { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.groups-participant-results dd { margin: 0; font-size: 17px; font-weight: 600; }
.groups-participant-components { padding-top: 14px; border-top: 1px solid var(--line-2); }
.groups-participant-components h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.groups-participant-components dl { display: grid; gap: 8px; margin: 0; }
.groups-participant-components dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.groups-participant-components dd { font-size: 15px; white-space: nowrap; }
.groups-view summary { cursor: pointer; min-height: 44px; padding-top: 10px; padding-bottom: 10px; font-weight: 600; }
.groups-view .chip { white-space: normal; }
.groups-rule-list { margin: 12px 0 0; padding-left: 24px; display: flex; flex-direction: column; gap: 12px; }
.groups-privacy { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.groups-days { display: flex; flex-direction: column; margin-top: 8px; }
.groups-day { border-top: 1px solid var(--line); padding: 8px 0; }
.groups-day > summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.groups-day > summary::before { content: '+'; color: var(--ink-2); font-weight: 400; flex: none; }
.groups-day[open] > summary::before { content: '−'; }
.groups-day > summary > :first-child { flex: 1; }
.groups-day .groups-task-list, .groups-day > p { margin-top: 12px; }
.groups-join-card { max-width: 760px; }
.groups-join-card h2 { font-size: 28px; }
.groups-join-about { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.groups-join-privacy { padding: 16px; background: var(--surface-2); border-radius: var(--radius-sm); }
.groups-join-card > .btn { align-self: flex-start; }
.groups-decline { min-height: 44px; display: inline-flex; align-items: center; width: fit-content; }
.groups-leave { color: var(--ink-2); }
.groups-leave p { margin: 8px 0 16px; }
.groups-leave .btn { color: var(--bad-ink); }

@media (max-width: 800px) {
  .groups-heading { flex-direction: column; gap: 16px; }
  .groups-heading-actions { width: 100%; }
}
@media (max-width: 600px) {
  .groups-view .card { padding: 18px 16px; }
  .groups-week-bar, .groups-pending-invite { flex-direction: column; align-items: flex-start; gap: 16px; }
  .groups-week-nav { align-self: flex-end; }
  .groups-stat { padding: 14px 12px; }
  .groups-stat-value { font-size: 24px; }
  .groups-stat-value small { display: block; margin: 3px 0 0; }
  .groups-stat-label { font-size: 13px; }
  .groups-personal-summary { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups-word-thresholds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups-task { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .groups-task-mark { width: 28px; height: 28px; }
  .groups-task-action { grid-column: 2; justify-self: start; }
  .groups-copy-controls { flex-direction: column; }
  .groups-copy-controls .btn { align-self: flex-start; }
  .groups-ranking { font-size: 15px; }
  .groups-ranking th, .groups-ranking td { padding: 14px 5px; }
  .groups-ranking .groups-rank-col { width: 43px; }
  .groups-ranking .groups-numeric-col { width: 60px; }
  .groups-ranking thead th { font-size: 12px; }
  .groups-ranking-denominator { display: block; font-size: 12px; margin-top: 2px; }
  .groups-award-grid { grid-template-columns: minmax(0,1fr); }
  .groups-standings .groups-rank-col { width: 34px; }
  .groups-standings .groups-numeric-col { width: 70px; }
  .groups-standings .groups-ranking-points { font-size: 18px; }
  .groups-standings .groups-rank { padding-left: 0; }
  .groups-standing-trigger { gap: 8px; padding-inline: 3px; grid-template-columns: 44px minmax(0,1fr) 10px; }
  .groups-rank-badge { min-width: 26px; min-height: 30px; }
  .groups-participant-results { padding: 16px 14px; }
  .groups-friend-list li { flex-wrap: wrap; }
  .groups-friend-list li > .small { flex-basis: 100%; margin-left: 52px; margin-top: -6px; }
  .groups-join-card h2 { font-size: 24px; }
  .groups-day > summary { gap: 8px; }
  .groups-profile-fields { grid-template-columns: minmax(0, 1fr); }
  .groups-invitation-list > li { align-items: flex-start; flex-direction: column; }
}
.groups-people { display: flex; flex-direction: column; gap: 14px; }
.groups-test-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.groups-test-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 12px; border-top: 1px solid var(--line); }
.groups-test-list li .btn { min-height: 44px; }
.groups-people-search { display: flex; align-items: flex-start; gap: 12px; }
.groups-people-search .groups-field { flex: 1; min-width: 0; }
.groups-people-search > .btn { margin-top: 30px; }
@media (max-width: 767px) {
  .groups-people-search { flex-direction: column; align-items: stretch; }
  .groups-people-search > .btn { margin-top: 0; }
  .groups-test-list .btn { width: 100%; }
  .groups-ranking .profile-identity { align-items: flex-start; gap: 6px; }
  .groups-ranking .profile-small { width: 26px; height: 26px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .groups-view *, .groups-view *::before, .groups-view *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.groups-hero-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.groups-hero-current { display: flex; align-items: center; gap: 16px; min-width: 0; }
.groups-hero-current > div { min-width: 0; }
.groups-hero-current h2 { font-size: 20px; line-height: 1.35; }
.groups-hero-current-name { margin-top: 4px; color: var(--ink-2); }
.profile-avatar.groups-hero-avatar { width: 64px; height: 64px; font-size: 27px; }
.groups-hero-picker { border-top: 1px solid var(--line); padding-top: 8px; }
.groups-hero-picker > summary { display: list-item; width: fit-content; min-height: 44px; padding: 12px 4px; color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.groups-hero-picker > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.groups-hero-form { margin-top: 16px; }
.groups-hero-preview { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.groups-hero-preview-image { display: flex; }
.groups-hero-preview-name { display: block; margin-top: 4px; font-size: 18px; }
.groups-hero-panel .profile-choice-hint { font-size: 13px; }
.groups-hero-panel #group-avatar-status:focus { outline: 2px solid var(--accent); outline-offset: 4px; }
.groups-hero-panel .profile-save-row { margin-bottom: 16px; }
.duels-view .duel-match-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.duels-view .duel-match-person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.duels-view .duel-match-person > span:last-child { overflow-wrap: anywhere; }
.duels-view .duel-person-avatar { width: 36px; height: 36px; font-size: 16px; }
.duels-view .duel-bracket-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.duels-view .duel-ranking-identity { display: flex; align-items: center; gap: 10px; }
.duels-view .duel-ranking-identity > span:last-child { min-width: 0; }
.duels-view .duel-podium-identity { display: flex; align-items: center; gap: 10px; }
@media (max-width: 767px) {
  .groups-hero-current { gap: 12px; }
  .groups-hero-current h2 { font-size: 18px; }
  .groups-hero-panel .profile-character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .groups-hero-panel .profile-character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Список групп плитками, как значки на экране телефона (просьба владельца 14.11). */
.groups-shelf { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.groups-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; }
.groups-tiles > li { display: flex; justify-content: center; min-width: 0; }
.groups-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.groups-tile:hover { text-decoration: none; color: var(--ink); }
.groups-tile:focus-visible { outline: none; }
.groups-tile:focus-visible .groups-tile-icon { outline: 3px solid var(--accent); outline-offset: 3px; }
.groups-tile:disabled { cursor: default; opacity: .55; }
.groups-tile-icon { --tile-tone: var(--fit-mint); position: relative; display: grid; place-items: center; flex: none; width: 100%; max-width: 76px; aspect-ratio: 1; border-radius: 23%; border: 1px solid color-mix(in srgb, var(--tile-tone) 30%, transparent);
  background: linear-gradient(155deg, color-mix(in srgb, var(--tile-tone) 32%, var(--surface-2)), color-mix(in srgb, var(--tile-tone) 14%, var(--surface)));
  color: color-mix(in srgb, var(--tile-tone) 78%, var(--ink)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%), 0 10px 20px -14px rgb(0 0 0 / 75%);
  font-family: var(--font-num, inherit); font-size: clamp(24px, 7.4vw, 32px); font-weight: 700; line-height: 1; transition: transform .14s ease, filter .14s ease; }
.groups-tile:hover .groups-tile-icon { filter: brightness(1.08); }
.groups-tile:active .groups-tile-icon { transform: scale(.94); }
.groups-tile-letter { display: block; transform: translateY(1px); }
.groups-tile-tone-1 { --tile-tone: var(--fit-amber); }
.groups-tile-tone-2 { --tile-tone: var(--fit-silver); }
.groups-tile-tone-3 { --tile-tone: var(--fit-coral); }
.groups-tile-tone-4 { --tile-tone: color-mix(in srgb, var(--fit-mint) 55%, var(--fit-silver)); }
.groups-tile-tone-5 { --tile-tone: var(--fit-bronze); }
.groups-tile-icon.is-placeholder { border-style: dashed; border-color: var(--line-2); background: transparent; box-shadow: none; }
.groups-tile-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; max-width: 100%; font-size: 13px; line-height: 1.25; font-weight: 550; overflow-wrap: break-word; word-break: normal; -webkit-hyphens: auto; hyphens: auto; }
.groups-tile-season { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--fit-mint); box-shadow: 0 0 0 2px var(--bg); }
.groups-tile-season.is-upcoming { background: var(--fit-amber); }
.groups-tile-icon > .groups-tile-season { position: absolute; top: -4px; right: -4px; }
.groups-tile-create .groups-tile-icon { border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--accent-ink); }
.groups-tile-create .groups-tile-name { color: var(--accent-ink); }
.groups-tile-plus { position: relative; width: 36%; aspect-ratio: 1; }
.groups-tile-plus::before, .groups-tile-plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 100%; height: 3px; border-radius: 3px; background: currentColor; transform: translate(-50%, -50%); }
.groups-tile-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.groups-shelf-empty { max-width: 60ch; line-height: 1.5; }
.groups-tiles-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.groups-tiles-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.groups-tiles-legend .groups-tile-season { width: 9px; height: 9px; box-shadow: none; }
@media (min-width: 600px) {
  .groups-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 14px; }
  .groups-tile-icon { max-width: 84px; font-size: 32px; }
  .groups-tile-name { font-size: 14px; }
}
@media (min-width: 960px) { .groups-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* «Мой круг» на экране групп — одной компактной карточкой, подробности по нажатию. */
.groups-circle { display: flex; flex-direction: column; gap: 4px; }
.groups-circle-head { display: flex; align-items: center; gap: 12px; min-width: 0; padding-bottom: 8px; }
.groups-circle-head h2 { font-size: 19px; line-height: 1.3; }
.groups-circle-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.groups-circle-faces { display: flex; flex: none; padding-left: 8px; }
.groups-circle-faces > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.profile-avatar.groups-circle-face, .groups-person-mark.groups-circle-face { width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }

/* Мастер создания группы. */
.groups-wizard-back { padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.groups-wizard-back:disabled { opacity: .55; cursor: default; }
.groups-wizard { display: flex; flex-direction: column; gap: 18px; max-width: 640px; min-width: 0; }
.groups-wizard-progress { display: flex; flex-direction: column; gap: 10px; }
.groups-wizard-bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.groups-wizard-bar li { height: 4px; border-radius: 4px; background: var(--surface-3); }
.groups-wizard-bar li.is-done, .groups-wizard-bar li.is-current { background: var(--accent); }
.groups-wizard-step { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.groups-wizard-step h2 { font-size: 24px; line-height: 1.25; }
.groups-wizard-step h2:focus { outline: none; }
.groups-wizard-name { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; }
.groups-wizard-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 2px; min-width: 0; }
.groups-wizard-preview .groups-tile-icon { width: 64px; font-size: 28px; }
.groups-wizard-preview .groups-tile-name { font-size: 12px; color: var(--ink-2); }
.groups-choice-set { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.groups-choice-set legend { padding: 0; margin-bottom: 10px; font-weight: 600; }
.groups-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.groups-choice { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 550; line-height: 1.3; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease, border-color .15s ease; }
.groups-choice > span { min-width: 0; }
.groups-choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.groups-choice.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.groups-choice.is-selected::after { content: '✓'; margin-left: auto; color: var(--accent-ink); font-weight: 700; }
.groups-choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.groups-wizard-created { display: flex; align-items: center; gap: 14px; min-width: 0; }
.groups-wizard-created > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.groups-wizard-created .groups-tile-icon { width: 56px; font-size: 24px; }
.groups-wizard-block { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.groups-wizard-block > h3 { font-size: 16px; line-height: 1.35; }
.groups-wizard .groups-test-list { gap: 0; }
.groups-wizard .groups-test-list li { flex-wrap: wrap; gap: 8px 12px; padding-block: 10px; }
.groups-wizard .groups-test-list li:first-child { border-top: 0; padding-top: 0; }
.groups-wizard .groups-test-list .profile-identity { flex: 1 1 170px; min-width: 0; }
.groups-wizard .groups-test-list .profile-identity p { overflow-wrap: normal; word-break: normal; }
.groups-wizard .groups-test-list .btn, .groups-wizard .groups-test-list .chip { width: auto; flex: none; margin-left: auto; }
@media (max-width: 600px) {
  .groups-wizard-step h2 { font-size: 21px; }
  .groups-wizard-name { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .groups-wizard-preview .groups-tile-icon { width: 56px; font-size: 24px; }
  .groups-wizard-finish .btn { flex: 1 1 100%; justify-content: center; }
}
