:root {
  color-scheme: light;
  --page: #f4eee4;
  --surface: #fffdf8;
  --soft: #f7f0e6;
  --line: #e3d5c0;
  --text: #2a2118;
  --muted: #8a7a68;
  --vk-blue: #b7863f;
  --vk-blue-dark: #7a5428;
  --sky: #d8b46f;
  --gold: #c9a45c;
  --gold-deep: #b88a32;
  --gold-soft: #e8d8b8;
  --champagne: #f7efe2;
  --ivory: #fff8ec;
  --brown: #6b4a2d;
  --dark-brown: #3a2618;
  --orange: #c99a45;
  --orange-dark: #8f642c;
  --progress-gradient: linear-gradient(90deg, #8f642c 0%, #c99a45 42%, #f1d27a 72%, #b7863f 100%);
  --danger: #b45746;
  --done: #6b4a2d;
  --success-premium-bg: #f7efe2;
  --success-premium-border: #e8d8b8;
  --success-premium-text: #6b4a2d;
  --success-premium-icon: #c9a45c;
  --shadow: 0 16px 40px rgba(92, 63, 31, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.premium-icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold);
  filter: drop-shadow(0 4px 8px rgba(107, 74, 45, 0.12));
}

.premium-icon svg {
  width: 100%;
  height: 100%;
}

.premium-icon-small {
  width: 15px;
  height: 15px;
}

.premium-icon-medium {
  width: 26px;
  height: 26px;
}

.premium-icon-large {
  width: 38px;
  height: 38px;
}

.premium-icon-text,
.status-mini-title,
.status-mini-streak,
.status-pill,
.status-metric,
.goal-card-badge,
.archive-badge,
.goal-completion-kicker,
.goal-completion-grid span,
.archive-achievement-metric small,
.participant-path-zone-title,
.participant-path-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% -4%, rgba(218, 183, 112, 0.22), transparent 34%),
    linear-gradient(180deg, #f8f1e7, var(--page) 42%, #efe3d1);
  color: var(--text);
}

body.is-welcome-gate {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.welcome-gate {
  position: fixed;
  z-index: 18;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: auto;
  padding: 28px;
  background: var(--page);
}

.welcome-gate-image,
.welcome-gate-overlay {
  position: absolute;
  inset: 0;
}

.welcome-gate-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.welcome-gate-overlay {
  background:
    linear-gradient(90deg, rgba(49, 35, 20, 0.28), rgba(49, 35, 20, 0.06) 50%, rgba(201, 154, 69, 0.14)),
    linear-gradient(180deg, rgba(244, 224, 186, 0.16), rgba(244, 238, 228, 0.58));
}

.welcome-gate-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: 34px;
  width: min(980px, 100%);
}

.welcome-gate-content > .eyebrow {
  grid-column: 1;
  align-self: end;
  margin-bottom: -18px;
  color: rgba(255, 250, 239, 0.9);
  text-shadow: 0 2px 14px rgba(49, 35, 20, 0.3);
}

.welcome-gate-content h1 {
  grid-column: 1;
  margin: 0;
  color: #fff7e8;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 18px 42px rgba(49, 35, 20, 0.34);
  animation: welcomeTextIn 760ms ease both;
}

.welcome-login-card {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  border: 1px solid rgba(255, 247, 232, 0.78);
  border-radius: 18px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 28px 70px rgba(49, 35, 20, 0.24);
  backdrop-filter: blur(12px);
  animation: welcomeCardIn 620ms ease 150ms both;
}

.welcome-login-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: 0;
}

.welcome-form input[type="file"] {
  width: 100%;
}

.welcome-photo-label {
  border: 1px dashed rgba(183, 134, 63, 0.4);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(247, 240, 230, 0.76);
}

@keyframes welcomeTextIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes welcomeCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-shell {
  width: min(1460px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 18px 0 38px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 14px;
  object-fit: cover;
  box-shadow:
    0 0 0 4px rgba(255, 250, 241, 0.72),
    0 12px 28px rgba(92, 63, 31, 0.13);
}

.image-picker-input {
  display: none;
}

body.is-admin .brand-logo,
body.is-admin .hero-cover {
  cursor: pointer;
}

body.is-admin .brand-logo:hover,
body.is-admin .hero-cover:hover {
  filter: brightness(0.95);
}

body.is-text-edit-mode [data-edit-key],
body.is-text-edit-mode [data-placeholder-key] {
  cursor: text;
  outline: 2px dashed rgba(183, 134, 63, 0.45);
  outline-offset: 3px;
}

body.is-text-edit-mode [data-edit-key]:hover,
body.is-text-edit-mode [data-placeholder-key]:hover {
  background-color: rgba(183, 134, 63, 0.1);
}

.brand h1 {
  margin: 0;
  background: linear-gradient(135deg, #2a2118 0%, #7a5428 48%, #c99a45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 12px 28px rgba(122, 84, 40, 0.08);
}

.brand .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 6px;
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.eyebrow {
  display: block;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.active-badge {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.active-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(122, 84, 40, 0.12);
  margin-left: 12px;
  flex-shrink: 0;
}

.registration-status {
  display: inline-block;
  margin-left: 10px;
  color: var(--vk-blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.registration-status.is-error {
  color: var(--danger);
}

.google-signin {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.photo-upload-label {
  display: grid;
  gap: 7px;
}

.photo-upload-label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.primary-action,
.ghost-action,
.danger-action {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 850;
}

.primary-action {
  background: linear-gradient(135deg, var(--vk-blue), var(--orange));
  color: #fffaf1;
  box-shadow: 0 10px 22px rgba(183, 134, 63, 0.18);
}

.primary-action:hover {
  background: var(--vk-blue-dark);
}

.ghost-action {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--vk-blue-dark);
}

.ghost-action:hover {
  background: #efe3d1;
}

.danger-action {
  background: #f4ddd2;
  color: var(--danger);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(227, 213, 192, 0.8);
  background: var(--surface);
  box-shadow: 0 24px 58px rgba(92, 63, 31, 0.16);
}

.hero-cover {
  display: block;
  width: 100%;
  height: auto;
}

.results-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.section-heading {
  margin-bottom: 12px;
  padding-left: 2px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.result-chart,
.table-wrap,
.profile-view {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.result-chart {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.chart-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(92px, 0.5fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px;
  background: var(--soft);
  color: var(--text);
  text-align: left;
}

.chart-row:hover,
.chart-row.is-viewed {
  border-color: rgba(183, 134, 63, 0.34);
  background: #fffdf8;
}

.chart-row.is-active {
  box-shadow: inset 4px 0 0 var(--orange);
}

.chart-row.is-champion {
  border-color: rgba(201, 154, 69, 0.42);
  background: #fff6e7;
}

.chart-row.has-completed-goal {
  border-color: rgba(201, 154, 69, 0.58);
  background: linear-gradient(90deg, #fff6e7, #fffdf8);
}

.chart-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.place-icon {
  display: inline-flex;
  min-width: 28px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gold);
}

.dashboard-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(122, 84, 40, 0.14);
}

.chart-name {
  overflow-wrap: anywhere;
  font-weight: 850;
}

.champion-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(201, 164, 92, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.96), rgba(255, 253, 248, 0.84));
  color: var(--brown);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.08);
}

.completed-goal-note {
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.completed-goal-age {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(201, 164, 92, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.88), rgba(247, 239, 226, 0.66));
  color: rgba(107, 74, 45, 0.76);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.06);
}

.completed-goal-clear {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f4ddd2;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.chart-row[data-place="2"] .champion-badge,
.chart-row[data-place="3"] .champion-badge {
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.98), rgba(232, 216, 184, 0.54));
  color: var(--brown);
}

.chart-track,
.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(234, 223, 206, 0.62)),
    #eadfce;
  box-shadow: inset 0 1px 3px rgba(92, 63, 31, 0.14);
}

.chart-track {
  height: 16px;
}

.chart-bar,
.progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 52%),
    var(--progress-gradient);
  box-shadow:
    0 0 14px rgba(201, 154, 69, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: width 180ms ease;
}

.chart-percent {
  color: var(--vk-blue-dark);
  font-size: 17px;
}

.is-admin .chart-percent.is-completed-goal-countdown {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(184, 138, 50, 0.55);
  text-underline-offset: 5px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 15px;
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr.is-viewed {
  background:
    linear-gradient(90deg, rgba(247, 239, 226, 0.72), rgba(255, 253, 248, 0.38));
  box-shadow: inset 3px 0 0 rgba(201, 164, 92, 0.5);
}

.table-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--vk-blue-dark);
  font-weight: 950;
  text-align: left;
}

.table-name-text {
  overflow-wrap: anywhere;
}

.status-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(201, 164, 92, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.92), rgba(255, 253, 248, 0.88));
  color: var(--brown);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(107, 74, 45, 0.06);
}

.status-mini-streak {
  color: var(--brown);
  white-space: nowrap;
}

.table-goal {
  max-width: 360px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.table-deadline,
.table-count,
.table-progress {
  font-weight: 850;
}

.table-deadline {
  white-space: nowrap;
}

.deadline-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.deadline-empty {
  color: var(--muted);
  border: 1px solid rgba(201, 164, 92, 0.14);
  background: rgba(247, 239, 226, 0.52);
}

.deadline-success {
  border: 1px solid var(--success-premium-border);
  color: var(--success-premium-text);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.96), var(--success-premium-bg));
  box-shadow:
    0 8px 18px rgba(107, 74, 45, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.deadline-success .premium-icon {
  color: var(--success-premium-icon);
}

.deadline-warning {
  color: #946200;
  background: #fff4cc;
}

.deadline-danger {
  color: var(--danger);
  background: #ffe4dd;
}

.table-progress-cell {
  display: grid;
  min-width: 160px;
  gap: 7px;
}

.table-progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(229, 219, 202, 0.72)),
    #eadfce;
  box-shadow: inset 0 1px 3px rgba(92, 63, 31, 0.13);
}

.table-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 52%),
    var(--progress-gradient);
  box-shadow:
    0 0 14px rgba(201, 154, 69, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: width 180ms ease;
}

.table-progress-percent {
  color: var(--vk-blue-dark);
  font-size: 14px;
}

.admin-only,
.table-admin {
  text-align: right;
}

.admin-delete,
.delete-account,
.delete-card {
  border: 0;
  border-radius: 10px;
  background: #ffe4dd;
  color: var(--danger);
  font-weight: 850;
}

.admin-delete {
  padding: 8px 10px;
  font-size: 13px;
}

.participant-path-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 18px 20px 16px;
  overflow: hidden;
  border: 1px solid rgba(183, 134, 63, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 8%, rgba(201, 154, 69, 0.13), transparent 28%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(247, 240, 230, 0.92));
  box-shadow: 0 18px 46px rgba(92, 63, 31, 0.08);
}

.participant-path-heading {
  margin-bottom: 0;
}

.participant-path-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 6px;
  scrollbar-width: thin;
}

.participant-path {
  min-width: 940px;
}

.participant-path-road {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(148px, 1fr)) 36px;
  align-items: end;
  gap: 16px;
  min-height: 220px;
  padding: 20px 12px 8px;
}

.participant-path-road::before {
  content: "";
  position: absolute;
  right: 40px;
  bottom: 44px;
  left: 34px;
  height: 110px;
  background-image: url("data:image/svg+xml,%3Csvg width='880' height='110' viewBox='0 0 880 110' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 92 C156 82 250 73 360 63 C492 51 590 38 704 26 C768 18 824 11 872 8' stroke='url(%23paint0_linear_1_2)' stroke-width='4' stroke-linecap='round'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_1_2' x1='8' y1='92' x2='872' y2='8' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%238F642C' stop-opacity='0.24'/%3E%3Cstop offset='0.52' stop-color='%23B7863F' stop-opacity='0.62'/%3E%3Cstop offset='1' stop-color='%23C99A45' stop-opacity='0.78'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter:
    drop-shadow(0 7px 12px rgba(122, 84, 40, 0.12))
    drop-shadow(0 0 8px rgba(201, 154, 69, 0.1));
  opacity: 1;
}

.participant-path-road::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fffaf1 0 22%, rgba(201, 154, 69, 0.66) 24% 34%, rgba(201, 154, 69, 0.16) 36% 58%, transparent 68%);
  box-shadow:
    0 0 0 7px rgba(201, 154, 69, 0.09),
    0 10px 26px rgba(122, 84, 40, 0.16);
  animation: path-peak-breathe 7s ease-in-out infinite;
  pointer-events: none;
}

.participant-path-zone {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 166px;
  padding: 12px;
  border: 1px solid rgba(183, 134, 63, 0.12);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 12px 28px rgba(92, 63, 31, 0.055);
  transform: translateY(var(--zone-offset, 0));
  animation: path-zone-rise 360ms ease both;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.participant-path-zone[data-status="stable"] {
  border-color: rgba(183, 134, 63, 0.17);
  box-shadow: 0 14px 30px rgba(92, 63, 31, 0.07);
}

.participant-path-zone[data-status="champion"] {
  border-color: rgba(201, 154, 69, 0.22);
  background:
    radial-gradient(circle at 82% 0%, rgba(201, 154, 69, 0.09), transparent 44%),
    rgba(255, 253, 248, 0.9);
  box-shadow: 0 15px 34px rgba(122, 84, 40, 0.08);
}

.participant-path-zone[data-status="legend"] {
  border-color: rgba(201, 154, 69, 0.28);
  background:
    radial-gradient(circle at 78% 0%, rgba(201, 154, 69, 0.17), transparent 48%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 246, 231, 0.92));
  box-shadow:
    0 0 0 1px rgba(201, 154, 69, 0.06),
    0 18px 40px rgba(122, 84, 40, 0.12);
}

.participant-path-zone-header {
  display: grid;
  gap: 4px;
}

.participant-path-zone-header strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.participant-path-zone-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.participant-path-members {
  display: grid;
  gap: 7px;
}

.participant-path-person {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(183, 134, 63, 0.1);
  border-radius: 14px;
  padding: 7px;
  background: rgba(250, 244, 235, 0.68);
  text-align: left;
  cursor: pointer;
  animation: path-person-in 420ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.participant-path-person:hover,
.participant-path-person.is-active,
.participant-path-person:focus-visible {
  border-color: rgba(201, 154, 69, 0.34);
  box-shadow: 0 12px 26px rgba(92, 63, 31, 0.1);
  transform: translateY(-2px);
}

.participant-path-person.is-active {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 3px rgba(201, 154, 69, 0.13),
    0 16px 34px rgba(122, 84, 40, 0.12);
  transform: translateY(-2px) scale(1.015);
}

.participant-path-person:focus-visible {
  outline: 3px solid rgba(201, 154, 69, 0.22);
  outline-offset: 2px;
}

.participant-path-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(183, 134, 63, 0.16), rgba(201, 154, 69, 0.18));
  color: var(--vk-blue-dark);
  font-size: 15px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.participant-path-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participant-path-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.participant-path-info strong,
.participant-path-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-path-info strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.participant-path-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.participant-path-more,
.participant-path-empty {
  margin: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(183, 134, 63, 0.09);
  color: var(--vk-blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.participant-path-empty {
  border: 1px dashed rgba(183, 134, 63, 0.2);
  color: rgba(107, 74, 45, 0.66);
  background:
    radial-gradient(circle at 50% 0%, rgba(183, 134, 63, 0.09), transparent 58%),
    rgba(247, 240, 230, 0.58);
  font-weight: 850;
}

.participant-path-empty::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto 6px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(201, 164, 92, 0.12);
}

.participant-path-peak {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  align-self: start;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.96);
  color: var(--orange-dark);
  font-size: 0;
  box-shadow:
    0 0 0 6px rgba(201, 154, 69, 0.09),
    0 14px 28px rgba(122, 84, 40, 0.14);
}

.participant-path-peak::before {
  content: "";
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fffaf1;
  box-shadow: 0 0 18px rgba(201, 154, 69, 0.42);
}

.participant-path-peak::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 21px;
  width: 1px;
  height: 20px;
  border-radius: 999px;
  background: rgba(201, 154, 69, 0.32);
}

@keyframes path-zone-rise {
  from {
    opacity: 0;
    transform: translateY(calc(var(--zone-offset, 0px) + 10px));
  }
}

@keyframes path-person-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes path-peak-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .participant-path-zone,
  .participant-path-person,
  .participant-path-road::after {
    animation: none;
  }
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: -6px 2px 18px;
}

.is-profile-view .hero-card,
.is-profile-view .results-panel,
.is-profile-view .participant-path-panel,
.is-profile-view .stats-grid,
.is-profile-view .personal-entry,
.is-community-view .profile-view {
  display: none;
}

.stat-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(201, 164, 92, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  box-shadow: 0 8px 20px rgba(107, 74, 45, 0.045);
  backdrop-filter: blur(8px);
}

.stat-card.highlight {
  border-color: rgba(201, 164, 92, 0.3);
  background: rgba(247, 239, 226, 0.76);
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.stat-card strong {
  color: var(--brown);
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.personal-entry {
  margin: 0 0 18px;
}

.personal-entry-card {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(201, 164, 92, 0.24);
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 0%, rgba(201, 164, 92, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 236, 0.98), rgba(247, 239, 226, 0.86));
  color: var(--text);
  text-align: left;
  box-shadow:
    0 20px 48px rgba(107, 74, 45, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.personal-entry-card:hover {
  border-color: rgba(201, 164, 92, 0.4);
  box-shadow:
    0 26px 58px rgba(107, 74, 45, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

.personal-entry-avatar {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 92, 0.4);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--champagne), var(--ivory));
  color: var(--brown);
  font-size: 22px;
  font-weight: 950;
  box-shadow:
    0 0 0 6px rgba(232, 216, 184, 0.22),
    0 14px 30px rgba(107, 74, 45, 0.12);
}

.personal-entry-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personal-entry-content {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.personal-entry-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.personal-entry-content strong {
  color: var(--dark-brown);
  font-size: 25px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.personal-entry-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.personal-entry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(201, 164, 92, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--brown);
  font-size: 12px;
  font-weight: 900;
}

.personal-entry-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--vk-blue), var(--orange));
  color: #fffdf8;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(122, 84, 40, 0.18);
}

.profile-view {
  overflow: hidden;
}

.profile-back-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin: 16px 20px 14px;
  border: 1px solid rgba(201, 164, 92, 0.22);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 253, 248, 0.88);
  color: var(--brown);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(107, 74, 45, 0.06);
}

.person-column {
  min-width: 0;
  background: rgba(255, 253, 248, 0.96);
}

.person-column.is-active {
  box-shadow: inset 4px 0 0 var(--orange);
}

.person-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbf5eb;
}

.person-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.person-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 26px;
  letter-spacing: 0;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.delete-account {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--gold);
}

.goal-journey-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.32fr);
  gap: 18px;
  margin: 18px 20px;
  align-items: stretch;
}

.goal-journey-card,
.status-card-compact {
  border: 1px solid rgba(201, 164, 92, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 76% -8%, rgba(255, 248, 236, 0.82), transparent 38%),
    radial-gradient(circle at 12% 108%, rgba(107, 74, 45, 0.07), transparent 34%),
    linear-gradient(145deg, rgba(255, 248, 236, 0.99), rgba(247, 239, 226, 0.92));
  box-shadow:
    0 30px 74px rgba(107, 74, 45, 0.12),
    0 8px 24px rgba(107, 74, 45, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.goal-journey-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 24px;
}

.goal-journey-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.goal-journey-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.12;
  font-weight: 950;
}

.goal-journey-heading p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.goal-journey-map {
  position: relative;
  --journey-depth: 0;
  min-height: 354px;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 92, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255, 248, 236, 0.94), transparent 34%),
    radial-gradient(circle at 18% 96%, rgba(107, 74, 45, 0.11), transparent 46%),
    radial-gradient(circle at 72% 32%, rgba(201, 164, 92, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(255, 248, 236, 0.96) 0%, rgba(247, 239, 226, 0.72) 58%, rgba(232, 216, 184, 0.4) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -34px 70px rgba(107, 74, 45, 0.075),
    inset 0 0 42px rgba(255, 248, 236, 0.42);
}

.goal-journey-map::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 16%, rgba(255, 253, 248, 0.78), transparent 25%),
    linear-gradient(
      180deg,
      rgba(255, 248, 236, 0) 0%,
      rgba(107, 74, 45, calc(var(--journey-depth) * 0.07)) 100%
    );
  opacity: calc(0.76 + (var(--journey-depth) * 0.24));
  pointer-events: none;
}

.goal-journey-map::after {
  content: "";
  position: absolute;
  inset: auto 24px 22px 24px;
  height: 42%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 88%, rgba(107, 74, 45, calc(var(--journey-depth) * 0.11)), transparent 54%),
    radial-gradient(circle at 72% 18%, rgba(201, 164, 92, calc(var(--journey-depth) * 0.13)), transparent 46%);
  filter: blur(18px);
  opacity: calc(var(--journey-depth) * 0.9);
  pointer-events: none;
}

.goal-journey-line {
  position: absolute;
  z-index: 1;
  inset: 28px 28px 42px;
  width: calc(100% - 56px);
  height: calc(100% - 70px);
  overflow: visible;
}

.goal-journey-line-base {
  stroke-width: 2.15;
  stroke-linecap: round;
  filter: drop-shadow(0 10px 16px rgba(107, 74, 45, 0.08));
}

.goal-journey-line-progress {
  stroke-width: 3.1;
  stroke-linecap: round;
  filter:
    drop-shadow(0 0 6px rgba(201, 164, 92, 0.44))
    drop-shadow(0 12px 22px rgba(107, 74, 45, 0.12));
  transition: stroke-dashoffset 240ms ease;
}

.goal-journey-point,
.goal-journey-trophy,
.goal-journey-marker {
  position: absolute;
  transform: translate(-50%, -50%);
}

.goal-journey-point {
  z-index: 3;
  display: block;
  border: 1px solid rgba(201, 164, 92, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.98), transparent 38%),
    linear-gradient(145deg, var(--ivory), var(--champagne));
  box-shadow:
    0 13px 28px rgba(107, 74, 45, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -4px 9px rgba(107, 74, 45, 0.035);
}

.goal-journey-point-main {
  width: 27px;
  height: 27px;
}

.goal-journey-point-sub {
  width: 12px;
  height: 12px;
  opacity: 0.86;
}

.goal-journey-point.is-complete {
  border-color: rgba(201, 164, 92, 0.62);
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 253, 248, 0.9), transparent 30%),
    linear-gradient(135deg, #f0d58a, var(--gold) 58%, var(--gold-deep));
  box-shadow:
    0 0 0 7px rgba(201, 164, 92, 0.14),
    0 0 26px rgba(201, 164, 92, 0.32),
    0 18px 38px rgba(107, 74, 45, 0.18);
}

.goal-journey-point.is-current:not(.is-complete) {
  border-color: rgba(201, 164, 92, 0.46);
  box-shadow:
    0 0 0 6px rgba(201, 164, 92, 0.1),
    0 14px 30px rgba(107, 74, 45, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.goal-journey-marker {
  z-index: 5;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(201, 164, 92, 0.5);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(247, 239, 226, 0.9));
  color: var(--brown);
  box-shadow:
    0 0 0 5px rgba(255, 248, 236, 0.62),
    0 0 22px rgba(201, 164, 92, 0.22),
    0 14px 32px rgba(107, 74, 45, 0.14);
  transform: translate(-50%, calc(-100% - 14px));
}

.goal-journey-marker.is-finished {
  transform: translate(-50%, calc(-100% - 14px));
}

.goal-journey-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border-right: 1px solid rgba(201, 164, 92, 0.28);
  border-bottom: 1px solid rgba(201, 164, 92, 0.28);
  background: rgba(255, 253, 248, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.goal-journey-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--champagne), #fffdf8);
  color: var(--brown);
  font-size: 13px;
  font-weight: 950;
  box-shadow:
    0 0 0 1px rgba(201, 164, 92, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.goal-journey-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.goal-journey-trophy {
  z-index: 4;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(201, 164, 92, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.86), transparent 36%),
    rgba(247, 239, 226, 0.84);
  color: rgba(107, 74, 45, 0.48);
  box-shadow:
    0 0 0 9px rgba(232, 216, 184, 0.2),
    0 18px 42px rgba(107, 74, 45, 0.11);
}

.goal-journey-trophy.is-complete {
  border-color: rgba(201, 164, 92, 0.52);
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 253, 248, 0.94), transparent 34%),
    linear-gradient(135deg, #fff8ec, #f7efe2);
  color: var(--gold);
  box-shadow:
    0 0 0 11px rgba(201, 164, 92, 0.13),
    0 0 38px rgba(201, 164, 92, 0.34),
    0 24px 56px rgba(107, 74, 45, 0.2);
}

.goal-journey-empty {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100% - 44px));
  margin: 0;
  border: 1px dashed rgba(201, 164, 92, 0.28);
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.goal-journey-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.goal-journey-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(201, 164, 92, 0.14);
  border-radius: 999px;
  padding: 11px 13px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  box-shadow:
    0 8px 18px rgba(107, 74, 45, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.goal-journey-stat span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.goal-journey-stat strong {
  margin-left: auto;
  color: var(--brown);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.status-card {
  margin: 16px 20px;
  padding: 18px;
  border: 1px solid rgba(183, 134, 63, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(201, 154, 69, 0.15), transparent 34%),
    linear-gradient(135deg, #fffdf8, #f7f0e6);
  box-shadow: 0 16px 34px rgba(92, 63, 31, 0.08);
}

.status-card-compact {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  margin: 0;
  padding: 18px;
  border-radius: 24px;
}

.status-card-compact .status-card-top,
.status-card-compact .status-card-main,
.status-card-compact .status-metrics {
  align-items: flex-start;
}

.status-card-compact .status-card-top {
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.status-card-compact .status-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.status-card-compact .status-emblem {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.status-card-compact .premium-icon-large {
  width: 28px;
  height: 28px;
}

.status-card-compact .status-title {
  font-size: 18px;
}

.status-card-compact .status-description {
  font-size: 12px;
}

.status-card-compact .status-metrics {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.status-card-compact .status-metric {
  width: 100%;
}

.status-card-compact .status-brand-logo {
  display: block;
  width: min(112px, 56%);
  max-width: 118px;
  height: auto;
  justify-self: center;
  align-self: end;
  margin-top: 2px;
  object-fit: contain;
  opacity: 0.92;
  filter: drop-shadow(0 10px 18px rgba(184, 138, 50, 0.18));
}

@media (max-width: 1200px) {
  .goal-journey-shell {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  }

  .goal-journey-card {
    padding: 20px;
  }

  .goal-journey-map {
    min-height: 336px;
  }
}

@media (max-width: 1024px) {
  .goal-journey-shell {
    grid-template-columns: 1fr;
  }

  .status-card-compact {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    padding-right: 72px;
  }

  .status-card-compact .status-card-top,
  .status-card-compact .status-card-main {
    margin: 0;
  }

  .status-card-compact .status-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-card-compact .status-brand-logo {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .goal-journey-stats {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .goal-journey-stats .goal-journey-stat:last-child {
    grid-column: 1 / -1;
  }

  .status-card-compact,
  .status-card-compact .status-metrics {
    grid-template-columns: 1fr;
  }
}

.status-card-top,
.status-card-main,
.status-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-card-top {
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-card-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 11px;
  border: 1px solid rgba(201, 164, 92, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.94), rgba(255, 253, 248, 0.78));
  color: var(--brown);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.07);
}

.status-emblem {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: #fffaf1;
  box-shadow:
    0 12px 24px rgba(122, 84, 40, 0.12),
    inset 0 0 0 1px rgba(183, 134, 63, 0.14);
}

.status-title {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 23px;
  font-weight: 950;
}

.status-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.status-metrics {
  flex-wrap: wrap;
  margin-top: 16px;
}

.status-metric {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(201, 164, 92, 0.18);
  border-radius: 999px;
  background: rgba(247, 239, 226, 0.78);
  color: var(--brown);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.05);
}

.status-card[data-activity="slowing"] {
  border-color: rgba(201, 154, 69, 0.3);
}

.status-card[data-activity="inactive"] {
  border-color: rgba(129, 140, 153, 0.22);
  background: linear-gradient(135deg, #fffdf8, #f3eadb);
}

.status-toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 18px;
  border: 1px solid rgba(201, 154, 69, 0.26);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-weight: 950;
  text-align: center;
  box-shadow: 0 20px 46px rgba(21, 32, 43, 0.16);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.status-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.goal-fields,
.person-progress,
.task-form,
.task-list,
.goal-archive {
  margin: 16px 20px;
}

.goal-card {
  padding: 18px;
  border: 1px solid rgba(201, 154, 69, 0.22);
  border-radius: 18px;
  background: rgba(201, 154, 69, 0.11);
}

.goal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.goal-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(201, 164, 92, 0.22);
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.92), rgba(255, 253, 248, 0.82));
  color: var(--brown);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.06);
}

.goal-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.45fr);
  gap: 12px;
}

.goal-label {
  display: grid;
  gap: 7px;
  margin: 0;
}

.goal-label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--text);
}

input:focus {
  border-color: var(--vk-blue);
  box-shadow: 0 0 0 3px rgba(183, 134, 63, 0.16);
}

textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea:focus {
  border-color: var(--vk-blue);
  box-shadow: 0 0 0 3px rgba(183, 134, 63, 0.16);
}

.person-goal:disabled,
.person-deadline:disabled {
  color: var(--text);
  background: var(--soft);
}

.person-deadline.is-invalid {
  border-color: #d93025;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.16);
}

.deadline-error {
  color: #d93025;
  font-size: 12px;
  font-weight: 850;
}

.progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.person-percent {
  color: var(--vk-blue-dark);
  font-size: 32px;
  line-height: 1;
}

.person-count {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.task-form button {
  width: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: var(--vk-blue);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.task-list {
  display: grid;
  gap: 10px;
  min-height: 80px;
  padding-bottom: 4px;
}

.goal-archive {
  display: grid;
  gap: 12px;
}

.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.archive-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(201, 164, 92, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.92), rgba(255, 253, 248, 0.82));
  color: var(--brown);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.06);
}

.archive-list {
  display: grid;
  gap: 12px;
}

.archive-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(183, 134, 63, 0.14);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #fff, #fbfdff);
  box-shadow: 0 12px 26px rgba(21, 32, 43, 0.06);
}

.archive-card-completed {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  border-color: rgba(201, 154, 69, 0.24);
  background:
    radial-gradient(circle at top right, rgba(201, 154, 69, 0.12), transparent 36%),
    linear-gradient(135deg, #fff, #fffaf5);
}

.archive-trophy {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--gold);
  box-shadow:
    0 12px 24px rgba(201, 154, 69, 0.13),
    inset 0 0 0 1px rgba(201, 154, 69, 0.14);
}

.archive-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.archive-main strong {
  overflow-wrap: anywhere;
}

.archive-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.archive-achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.archive-achievement-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(183, 134, 63, 0.08);
}

.archive-achievement-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.archive-achievement-metric strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.archive-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(201, 164, 92, 0.2);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.archive-completed {
  background: var(--champagne);
  color: var(--brown);
}

.archive-expired {
  background: var(--danger);
  color: #fff;
}

.archive-delete {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  background: var(--danger);
  color: #fff;
  font-weight: 850;
}

.archive-toggle {
  justify-self: start;
  min-height: 38px;
  border: 1px solid rgba(183, 134, 63, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--vk-blue-dark);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(21, 32, 43, 0.05);
}

.archive-toggle:hover {
  border-color: rgba(183, 134, 63, 0.32);
  background: var(--soft);
}

.next-goal-panel {
  display: grid;
  gap: 10px;
  margin: 16px 20px;
  border: 1px solid var(--success-premium-border);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(201, 164, 92, 0.16), transparent 34%),
    linear-gradient(135deg, var(--ivory), #ffffff);
  box-shadow: 0 14px 30px rgba(107, 74, 45, 0.06);
}

.next-goal-panel[hidden] {
  display: none;
}

.next-goal-panel strong {
  color: var(--success-premium-text);
  font-size: 20px;
}

.next-goal-panel p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.new-goal-button {
  justify-self: start;
  min-height: 44px;
  padding: 0 18px;
}

.task-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(183, 134, 63, 0.16);
  border-radius: 12px;
  padding: 10px;
  background: rgba(183, 134, 63, 0.08);
  font-size: 15px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.task-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.task-actions button {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--text);
  font-weight: 700;
}

.task-actions button:hover {
  background: #f0f4fb;
}

.edit-task {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--vk-blue-dark);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.task-card.drag-over {
  border-color: rgba(183, 134, 63, 0.65);
  background: var(--ivory);
}

.task-card.is-dragging,
.subtask-card.is-dragging {
  opacity: 0.5;
}

.drag-ghost {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  transform: translateZ(0) scale(1.02);
  transition: transform 180ms ease, box-shadow 180ms ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body.is-dragging-card,
body.is-dragging-card * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.subtask-toggle {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--soft);
  color: var(--vk-blue-dark);
  font-size: 13px;
  text-align: left;
}

.subtask-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-subtask {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--soft);
  color: var(--vk-blue-dark);
  font-weight: 700;
}

.edit-subtask {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--vk-blue-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.subtask-panel {
  display: grid;
  gap: 10px;
}

.subtask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.subtask-form input {
  min-width: 0;
}

.subtask-list {
  display: grid;
  gap: 8px;
}

.task-editor {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.task-editor-input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
}

.task-editor-row {
  display: flex;
  gap: 8px;
}

.task-editor-row button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  background: var(--vk-blue);
  color: #fff;
  font-weight: 800;
}

.task-editor-delete {
  background: #ffecec;
  color: var(--danger);
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-title-row .card-title {
  flex: 1 1 auto;
}

.task-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--success-premium-border);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.96), var(--success-premium-bg));
  color: var(--success-premium-text);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(107, 74, 45, 0.06);
}

.task-complete-badge .premium-icon {
  color: var(--success-premium-icon);
}

.subtask-count {
  background: var(--soft);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.subtask-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.add-subtask,
.edit-task {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--soft);
  color: var(--vk-blue-dark);
  font-weight: 700;
}

.subtask-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(183, 134, 63, 0.12);
  border-radius: 12px;
  padding: 9px 12px;
  background: #ffffff;
  margin-left: 18px;
  font-size: 14px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.subtask-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.subtask-title-row .card-title {
  flex: 1 1 auto;
}

.subtask-card.drag-over {
  border-color: rgba(183, 134, 63, 0.65);
  background: var(--ivory);
}

.subtask-card.is-done {
  border-color: var(--success-premium-border);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.96), rgba(247, 239, 226, 0.84));
}

.subtask-card.is-done .card-title {
  color: rgba(107, 74, 45, 0.72);
  text-decoration-line: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(201, 164, 92, 0.62);
}

.task-card.is-done {
  border-color: var(--success-premium-border);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.96), rgba(247, 239, 226, 0.84));
}

.task-card.is-done .card-title {
  color: rgba(107, 74, 45, 0.72);
  text-decoration-line: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(201, 164, 92, 0.62);
}

.card-title {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-weight: 750;
}

.complete-control {
  position: relative;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.complete-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkmark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid #c9d4db;
  border-radius: 8px;
  background: #fff;
  color: #fff;
}

.checkmark::after {
  content: "";
  width: 8px;
  height: 13px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.complete-checkbox:checked + .checkmark {
  border-color: var(--success-premium-icon);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 253, 248, 0.78), transparent 34%),
    linear-gradient(135deg, var(--gold-soft), var(--success-premium-icon));
}

.complete-checkbox:disabled + .checkmark {
  opacity: 0.56;
}

.delete-card {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}

.empty-state {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 16px;
  color: var(--muted);
  background: var(--soft);
  text-align: center;
}

.table-empty {
  color: var(--muted);
  text-align: center;
}

.modal-layer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.42);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 18px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.25);
}

.goal-completion-modal {
  z-index: 24;
  background:
    radial-gradient(circle at center, rgba(201, 154, 69, 0.14), transparent 42%),
    rgba(17, 24, 39, 0.48);
}

.goal-completion-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 24px;
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(201, 154, 69, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  box-shadow:
    0 34px 86px rgba(17, 24, 39, 0.3),
    0 0 42px rgba(201, 154, 69, 0.16);
  animation: goalCompletionIn 320ms ease both;
}

.goal-completion-glow {
  position: absolute;
  inset: 18px;
  z-index: -1;
  border-radius: 28px;
  background: rgba(201, 154, 69, 0.12);
  filter: blur(24px);
}

.goal-completion-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--brown);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.goal-completion-card h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.goal-completion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 18px;
}

.goal-completion-grid span {
  align-items: flex-start;
  min-width: 0;
  border: 1px solid rgba(201, 164, 92, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(247, 239, 226, 0.62);
  color: var(--brown);
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(183, 134, 63, 0.1);
  overflow-wrap: anywhere;
}

.goal-completion-message {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.goal-completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.goal-completion-actions button {
  min-height: 44px;
  padding: 0 16px;
}

@keyframes goalCompletionIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#tourModal.tour-overlay {
  z-index: 1000;
  background: rgba(17, 24, 39, 0.28);
  align-items: flex-start;
}

#tourModal.tour-overlay .modal-card {
  position: absolute;
  width: min(420px, 92vw);
  max-height: none;
  overflow: visible;
  padding: 22px;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.25);
  z-index: 1000;
}

.tour-card {
  max-width: 520px;
}

.tour-card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
}

.tour-card.placement-bottom::after {
  top: -9px;
  left: 28px;
}

.tour-card.placement-top::after {
  bottom: -9px;
  left: 28px;
}

.tour-card.placement-left::after {
  right: -9px;
  top: 28px;
}

.tour-card.placement-right::after {
  left: -9px;
  top: 28px;
}

.tour-highlight {
  position: relative;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), 0 0 0 10px rgba(255, 173, 63, 0.35);
  border-radius: 18px;
}

.tour-description {
  margin: 0 0 18px;
  color: var(--text);
  line-height: 1.7;
}

.tour-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  align-items: center;
}

.tour-step-counter {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.modal-form {
  display: grid;
  gap: 10px;
}

.tour-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

#tourSkipButton {
  width: auto;
}

.modal-form button {
  width: 100%;
}

.forgot-password-button {
  border: 0;
  padding: 4px 0 0;
  background: transparent;
  color: var(--vk-blue-dark);
  font-weight: 850;
  text-align: center;
}

.admin-announcement {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-settings-panel {
  display: grid;
  gap: 12px;
}

.admin-settings-panel[hidden] {
  display: none;
}

.admin-image-tools,
.admin-participants-tools {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--soft);
}

.admin-image-tools > strong,
.admin-tool-head > strong {
  color: var(--text);
  font-size: 14px;
}

.admin-site-image-grid {
  display: grid;
  gap: 10px;
}

.admin-image-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.admin-image-actions button {
  width: 100%;
}

.admin-tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-tool-head button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 13px;
}

.admin-participants-panel {
  display: grid;
  gap: 10px;
}

.admin-participants-panel[hidden] {
  display: none;
}

.admin-inactivity-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 8px;
}

.admin-inactivity-controls input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.admin-participants-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.admin-participant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(183, 134, 63, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.admin-participant-row.is-inactive {
  border-color: rgba(202, 67, 67, 0.22);
  background: #fff7f6;
}

.admin-participant-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-participant-main strong,
.admin-participant-main span {
  overflow-wrap: anywhere;
}

.admin-participant-main strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.admin-participant-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-participant-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(183, 134, 63, 0.1);
  color: var(--vk-blue-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-participant-row.is-inactive .admin-participant-status {
  background: #ffe4dd;
  color: var(--danger);
}

.admin-participant-delete {
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: #ffe4dd;
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
}

.admin-image-tools select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.announcement-label select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.announcement-label select:focus {
  border-color: var(--vk-blue);
  box-shadow: 0 0 0 3px rgba(183, 134, 63, 0.16);
}

.announcement-recipient-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.announcement-recipient-option {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  padding: 8px 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.announcement-recipient-option:hover {
  background: var(--soft);
}

.announcement-recipient-option input {
  width: 17px;
  height: 17px;
  min-width: 17px;
  padding: 0;
}

.announcement-label {
  display: grid;
  gap: 7px;
}

.announcement-label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.announcement-read-box {
  display: grid;
  gap: 10px;
  border-radius: 12px;
  padding: 12px;
  background: var(--soft);
}

.announcement-read-box > strong {
  color: var(--text);
  font-size: 14px;
}

.announcement-read-list {
  display: grid;
  gap: 8px;
}

.announcement-read-summary {
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: var(--vk-blue-dark);
  font-size: 13px;
  font-weight: 900;
}

.announcement-history-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(39, 88, 118, 0.11);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(37, 67, 92, 0.08);
}

.announcement-history-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.announcement-history-text {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
  white-space: pre-wrap;
}

.announcement-history-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.announcement-target-list {
  display: grid;
  gap: 7px;
}

.announcement-delete-one {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(202, 67, 67, 0.1);
  color: #b33c3c;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.announcement-delete-one:hover {
  background: rgba(202, 67, 67, 0.16);
}

.read-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.read-person.has-read {
  border-color: var(--success-premium-border);
  color: var(--success-premium-text);
  background: var(--success-premium-bg);
}

.announcement-card {
  width: min(560px, 100%);
}

.announcement-important {
  margin: 0 34px 14px 0;
  color: var(--danger);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
}

.announcement-message-box {
  border: 1px solid #ffd4ca;
  border-radius: 14px;
  padding: 16px;
  background: #fff7f4;
}

.announcement-text {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-wrap;
}

.deadline-warning-card {
  width: min(520px, 100%);
  border: 1px solid rgba(216, 77, 63, 0.22);
}

.deadline-warning-kicker {
  display: inline-flex;
  margin: 0 34px 10px 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.deadline-warning-card h2 {
  margin: 0 34px 10px 0;
  font-size: 24px;
  line-height: 1.2;
}

.deadline-warning-text {
  margin: 0;
  border-radius: 14px;
  padding: 15px;
  background: #fff7f4;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.5;
}

.deadline-confirm-card {
  width: min(520px, 100%);
  border: 1px solid rgba(38, 120, 196, 0.18);
}

.deadline-confirm-card h2 {
  margin: 0 34px 12px 0;
  font-size: 24px;
  line-height: 1.2;
}

.deadline-confirm-box {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid #cfe4ff;
  border-radius: 14px;
  padding: 14px;
  background: #f4f9ff;
  text-align: left;
  cursor: pointer;
}

.deadline-confirm-box:focus {
  outline: 3px solid rgba(38, 120, 196, 0.22);
  outline-offset: 2px;
}

.deadline-confirm-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.deadline-confirm-box strong {
  color: var(--vk-blue-dark);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
}

.deadline-confirm-warning {
  margin: 0;
  color: var(--danger);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.4;
}

.deadline-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.auth-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--vk-blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.auth-message.is-error {
  color: var(--danger);
}

.modal-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .welcome-gate {
    align-items: start;
    padding: 22px;
  }

  .welcome-gate-content {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 8vh;
  }

  .welcome-gate-content > .eyebrow,
  .welcome-gate-content h1,
  .welcome-login-card {
    grid-column: 1;
    grid-row: auto;
  }

  .welcome-gate-content > .eyebrow {
    margin-bottom: -8px;
  }

  .welcome-login-card {
    width: min(460px, 100%);
  }

  .topbar,
  .top-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-panel {
    grid-template-columns: 1fr;
  }

  .participant-path {
    min-width: 760px;
  }

  .participant-path-road {
    grid-template-columns: repeat(5, minmax(132px, 1fr)) 32px;
    gap: 10px;
  }

  .hero-card {
    border-radius: 16px;
  }
}

@media (max-width: 620px) {
  .welcome-gate {
    padding: 16px;
  }

  .welcome-gate-overlay {
    background:
      linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.46) 42%, rgba(244, 238, 228, 0.2)),
      linear-gradient(90deg, rgba(218, 183, 112, 0.18), rgba(201, 154, 69, 0.2));
  }

  .welcome-gate-content {
    min-height: calc(100vh - 32px);
    align-content: end;
    gap: 12px;
    padding-top: 0;
  }

  .welcome-gate-content h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .welcome-login-card {
    padding: 18px;
  }

  .welcome-login-card h2 {
    font-size: 24px;
  }

  #tourModal.tour-overlay {
    align-items: end;
    padding: 10px;
    background: rgba(17, 24, 39, 0.2);
  }

  #tourModal.tour-overlay .modal-card {
    width: calc(100vw - 20px);
    max-height: 38vh;
    overflow: auto;
    border-radius: 16px;
    padding: 14px;
  }

  .tour-card::after {
    display: none;
  }

  .tour-card h2 {
    margin: 0 34px 6px 0;
    font-size: 18px;
    line-height: 1.2;
  }

  .tour-description {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .tour-progress {
    margin-bottom: 10px;
  }

  .tour-actions {
    grid-template-columns: 1fr 1fr;
  }

  #tourSkipButton,
  #tourNextButton {
    min-height: 40px;
    padding: 0 10px;
  }

  .app-shell {
    width: min(100vw - 20px, 1460px);
    padding-top: 10px;
  }

  .top-actions,
  .top-actions button,
  .modal-form button {
    width: 100%;
  }

  .admin-tool-head,
  .admin-participant-row {
    grid-template-columns: 1fr;
  }

  .admin-tool-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-inactivity-controls {
    grid-template-columns: 1fr;
  }

  .admin-image-actions {
    grid-template-columns: 1fr;
  }

  .admin-participant-status,
  .admin-participant-delete {
    justify-content: center;
    width: 100%;
  }

  .stats-grid,
  .goal-fields,
  .archive-card,
  .archive-card-completed,
  .archive-achievement-grid,
  .goal-completion-grid {
    grid-template-columns: 1fr;
  }

  .personal-entry-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
  }

  .personal-entry-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .personal-entry-avatar {
    width: 54px;
    height: 54px;
  }

  .personal-entry-content strong {
    font-size: 21px;
  }

  .profile-back-button {
    width: calc(100% - 24px);
    margin: 12px 12px 12px;
  }

  .participant-path-panel {
    gap: 8px;
    padding: 15px;
    border-radius: 16px;
  }

  .participant-path {
    min-width: 690px;
  }

  .participant-path-road {
    min-height: 232px;
    padding-top: 12px;
  }

  .participant-path-road::before {
    right: 36px;
    bottom: 52px;
  }

  .participant-path-zone {
    min-height: 158px;
    padding: 10px;
  }

  .participant-path-zone-header strong {
    font-size: 13px;
  }

  .participant-path-person {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    min-height: 50px;
    padding: 7px;
  }

  .participant-path-avatar {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .goal-completion-card {
    padding: 22px;
    border-radius: 20px;
  }

  .goal-completion-card h2 {
    font-size: 25px;
  }

  .goal-completion-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .goal-completion-actions button {
    width: 100%;
  }

  .status-card {
    margin: 14px 12px;
    padding: 15px;
  }

  .goal-journey-shell {
    grid-template-columns: 1fr;
    margin: 14px 12px;
    gap: 12px;
  }

  .goal-journey-card {
    border-radius: 24px;
    padding: 15px;
  }

  .goal-journey-heading h3 {
    font-size: 22px;
  }

  .goal-journey-map {
    min-height: 292px;
    border-radius: 22px;
  }

  .goal-journey-line {
    inset: 34px 18px 46px;
    width: calc(100% - 36px);
    height: calc(100% - 80px);
  }

  .goal-journey-stats {
    grid-template-columns: 1fr;
  }

  .goal-journey-stats .goal-journey-stat:last-child {
    grid-column: auto;
  }

  .goal-journey-marker {
    width: 34px;
    height: 34px;
  }

  .goal-journey-marker.is-finished {
    transform: translate(-50%, calc(-100% - 12px));
  }

  .goal-journey-avatar {
    width: 27px;
    height: 27px;
  }

  .goal-journey-trophy {
    width: 50px;
    height: 50px;
    border-radius: 18px;
  }

  .goal-journey-point-main {
    width: 22px;
    height: 22px;
  }

  .goal-journey-point-sub {
    width: 10px;
    height: 10px;
  }

  .status-card-compact {
    margin: 0;
  }

  .status-card-top,
  .status-card-main {
    align-items: flex-start;
  }

  .status-card-top {
    flex-direction: column;
    gap: 8px;
  }

  .status-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-mini {
    width: 100%;
    justify-content: space-between;
  }

  .result-chart {
    gap: 8px;
    padding: 10px;
  }

  .chart-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px;
  }

  .chart-person {
    align-items: center;
    gap: 7px;
  }

  .place-icon {
    min-width: 24px;
    font-size: 18px;
  }

  .dashboard-avatar {
    width: 30px;
    height: 30px;
  }

  .chart-name {
    font-size: 14px;
  }

  .champion-badge {
    min-height: 22px;
    padding: 4px 7px;
    font-size: 11px;
    white-space: normal;
  }

  .chart-track {
    grid-column: 1 / -1;
    height: 12px;
  }

  .chart-percent {
    justify-self: end;
    font-size: 15px;
  }

  .hero-card {
    border-radius: 14px;
  }

  .task-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .task-main {
    grid-column: 2;
  }

  .task-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .card-title {
    flex: 1 1 auto;
  }

  .subtask-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .add-subtask {
    width: 100%;
  }

  .task-card,
  .task-card *,
  .subtask-card,
  .subtask-card * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .task-card input,
  .task-card textarea,
  .subtask-card input,
  .subtask-card textarea {
    -webkit-user-select: text;
    user-select: text;
  }

  .subtask-card {
    margin-left: 6px;
    padding: 9px 10px;
  }

  .subtask-title-row {
    align-items: flex-start;
  }
}
