:root {
  --ink: #111111;
  --muted: #626866;
  --paper: #f4f6f5;
  --surface: #ffffff;
  --line: #d9dfdc;
  --grid: #e7ece9;
  --green: #00a878;
  --red: #ff4d6d;
  --yellow: #f2c94c;
  --cyan: #00a6a6;
  --violet: #6658d3;
  --button: #111111;
  --button-text: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100vw;
  min-height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: default;
  opacity: 0.55;
}

.is-hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.54);
}

.modal-card {
  display: grid;
  width: min(440px, 100%);
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-card h2 {
  margin: 0;
  font-size: 1.28rem;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.42;
}

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

.trophy-modal,
.trophy-unlock-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 17, 17, 0.64);
}

.trophy-modal-panel,
.trophy-unlock-panel {
  display: grid;
  width: min(680px, 100%);
  max-height: min(720px, calc(100dvh - 44px));
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: #101316;
  color: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.trophy-modal-panel {
  height: min(720px, calc(100dvh - 44px));
  grid-template-rows: auto minmax(0, 1fr);
}

.trophy-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.trophy-modal-head span,
.trophy-unlock-label {
  color: #e0bd54;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trophy-unlock-modal .trophy-unlock-label {
  color: rgb(var(--trophy-rgb, 242 201 76));
}

.trophy-modal-head h2,
.trophy-unlock-panel h2 {
  margin: 3px 0 0;
  font-size: 1.25rem;
}

.trophy-modal-head button,
.trophy-unlock-panel button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 850;
}

.reward-modal-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.reward-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px;
}

.reward-tabs button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reward-tabs button.is-active {
  border-color: rgba(0, 168, 120, 0.56);
  background: rgba(0, 168, 120, 0.2);
  color: #ffffff;
}

.trophy-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 4px 18px 18px;
  overscroll-behavior: contain;
}

.trophy-rarity-heading {
  --trophy-rgb: 142 151 158;
  display: flex;
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgb(var(--trophy-rgb) / 0.26);
  border-radius: 8px;
  padding: 8px 10px;
  background:
    linear-gradient(90deg, rgb(var(--trophy-rgb) / 0.2), rgba(16, 19, 22, 0.94) 72%),
    #101316;
  color: rgb(var(--trophy-rgb));
}

.trophy-rarity-heading strong,
.trophy-rarity-heading small {
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.trophy-rarity-heading small {
  color: rgba(255, 255, 255, 0.68);
}

.trophy-row {
  --trophy-rgb: 142 151 158;
  --trophy-icon-ink: #101316;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  border: 1px solid rgb(var(--trophy-rgb) / 0.14);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(90deg, rgb(var(--trophy-rgb) / 0.07), rgba(255, 255, 255, 0.035));
  color: rgba(255, 255, 255, 0.48);
}

.trophy-row.is-unlocked {
  border-color: rgb(var(--trophy-rgb) / 0.52);
  background:
    linear-gradient(90deg, rgb(var(--trophy-rgb) / 0.18), rgba(255, 255, 255, 0.045)),
    #101316;
  color: #ffffff;
}

.trophy-row-icon {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: rgb(var(--trophy-rgb) / 0.15);
  color: rgb(var(--trophy-rgb) / 0.9);
  font-weight: 950;
}

.trophy-row.is-unlocked .trophy-row-icon,
.trophy-unlock-icon {
  background: rgb(var(--trophy-rgb));
  color: var(--trophy-icon-ink);
}

.trophy-row span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trophy-row strong {
  color: inherit;
  font-size: 0.96rem;
}

.trophy-row small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 760;
}

.trophy-row .trophy-progress {
  color: rgb(var(--trophy-rgb) / 0.92);
  font-size: 0.72rem;
  font-weight: 860;
}

.trophy-row em {
  color: rgb(var(--trophy-rgb));
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  justify-self: end;
  text-align: right;
  text-transform: uppercase;
}

.badge-row {
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
}

.badge-row[data-rarity="default"] {
  --trophy-rgb: 244 247 249;
  --trophy-icon-ink: #111418;
}

.badge-equip-button {
  min-height: 34px;
  border: 1px solid rgb(var(--trophy-rgb) / 0.28);
  padding: 0 10px;
  background: rgb(var(--trophy-rgb) / 0.13);
  color: rgb(var(--trophy-rgb));
  font-size: 0.72rem;
  font-weight: 920;
  text-transform: uppercase;
}

.badge-row.is-unlocked .badge-equip-button:not(:disabled) {
  border-color: rgb(var(--trophy-rgb) / 0.5);
  background: rgb(var(--trophy-rgb) / 0.2);
  color: #ffffff;
}

.badge-equip-button:disabled {
  opacity: 0.64;
}

.reward-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  border: 1px solid rgba(0, 168, 120, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(90deg, rgba(0, 168, 120, 0.12), rgba(255, 255, 255, 0.035));
  color: #ffffff;
}

.reward-row.is-inactive {
  opacity: 0.62;
}

.reward-row-icon {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #021710;
  font-size: 0.72rem;
  font-weight: 950;
}

.reward-row > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reward-row strong {
  color: inherit;
  font-size: 0.92rem;
}

.reward-row small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 760;
}

.reward-row .reward-skill {
  color: rgba(0, 168, 120, 0.92);
  font-weight: 860;
}

.reward-row > strong {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 940;
  white-space: nowrap;
}

.reward-empty {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.reward-empty small {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 740;
  line-height: 1.35;
}

.reward-popup-layer {
  position: fixed;
  top: 96px;
  left: 50%;
  z-index: 120;
  display: grid;
  width: min(420px, calc(100vw - 28px));
  gap: 10px;
  pointer-events: none;
  transform: translateX(-50%);
}

.reward-popup {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(0, 168, 120, 0.42);
  border-radius: 8px;
  padding: 10px 12px;
  background:
    linear-gradient(90deg, rgba(0, 168, 120, 0.2), rgba(16, 19, 22, 0.95)),
    #101316;
  color: #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.32);
  animation: reward-popup-in 260ms ease-out both;
}

.reward-popup.is-level {
  border-color: rgba(224, 189, 84, 0.58);
  background:
    linear-gradient(90deg, rgba(224, 189, 84, 0.22), rgba(16, 19, 22, 0.95)),
    #101316;
}

.reward-popup.is-leaving {
  animation: reward-popup-out 220ms ease-in both;
}

.reward-popup-icon {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #021710;
  font-size: 0.78rem;
  font-weight: 950;
}

.reward-popup.is-level .reward-popup-icon {
  background: #e0bd54;
  color: #1b1304;
  font-size: 1rem;
}

.reward-popup span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reward-popup strong {
  font-size: 0.98rem;
}

.reward-popup small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 760;
}

.reward-popup em {
  color: var(--green);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 940;
  white-space: nowrap;
}

.reward-popup.is-level em {
  color: #e0bd54;
}

@keyframes reward-popup-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }

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

@keyframes reward-popup-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

.trophy-row[data-rarity="common"],
.trophy-rarity-heading[data-rarity="common"],
.trophy-unlock-modal[data-rarity="common"] {
  --trophy-rgb: 152 169 177;
  --trophy-icon-ink: #101316;
}

.trophy-row[data-rarity="rare"],
.trophy-rarity-heading[data-rarity="rare"],
.trophy-unlock-modal[data-rarity="rare"] {
  --trophy-rgb: 53 181 211;
  --trophy-icon-ink: #06151a;
}

.trophy-row[data-rarity="epic"],
.trophy-rarity-heading[data-rarity="epic"],
.trophy-unlock-modal[data-rarity="epic"] {
  --trophy-rgb: 171 128 255;
  --trophy-icon-ink: #140b25;
}

.trophy-row[data-rarity="legendary"],
.trophy-rarity-heading[data-rarity="legendary"],
.trophy-unlock-modal[data-rarity="legendary"] {
  --trophy-rgb: 242 201 76;
  --trophy-icon-ink: #1b1304;
}

.trophy-unlock-panel {
  width: min(440px, 100%);
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.trophy-unlock-icon {
  display: grid;
  width: 92px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 18px;
  font-size: 2.4rem;
  font-weight: 950;
  box-shadow: 0 0 34px rgb(var(--trophy-rgb, 242 201 76) / 0.24);
}

.trophy-unlock-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 760;
}

.wave-run-card {
  width: min(520px, 100%);
  gap: 18px;
}

.wave-run-head {
  display: grid;
  gap: 6px;
}

.wave-run-head span,
.wave-run-stats span,
.wave-run-details span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wave-run-head p {
  color: var(--green);
  font-size: 1rem;
  font-weight: 900;
}

.wave-run-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wave-run-stats div {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.wave-run-stats strong {
  display: block;
  margin-top: 9px;
  font-size: 1.65rem;
  line-height: 1;
}

.wave-run-details {
  display: grid;
  gap: 8px;
}

.wave-run-details div {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.wave-run-details strong {
  font-size: 0.95rem;
}

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

.view-switch {
  display: flex;
  height: 58px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.account-menu {
  position: relative;
  display: flex;
  margin-left: auto;
}

.account-menu-button {
  display: flex;
  min-width: 148px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--ink);
  padding: 0 12px 0 8px;
  font-weight: 850;
}

.account-menu-button span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--button-text);
  font-size: 0.82rem;
}

.account-menu-button strong {
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: grid;
  width: 238px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.16);
}

.danger-button {
  min-height: 42px;
  border: 1px solid rgba(238, 82, 103, 0.34);
  background: rgba(238, 82, 103, 0.08);
  color: #b8223d;
  font-weight: 850;
}

.account-menu-head {
  display: grid;
  gap: 4px;
}

.account-menu-head span,
.account-menu-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.account-menu-head strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.sync-status {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.sync-status[data-state="ok"] {
  border-color: rgba(0, 168, 120, 0.28);
  color: #087a5a;
}

.sync-status[data-state="ok"] .sync-status-dot {
  background: var(--green);
}

.sync-status[data-state="pending"] {
  border-color: rgba(242, 201, 76, 0.42);
  color: #8a690f;
}

.sync-status[data-state="pending"] .sync-status-dot {
  background: var(--yellow);
}

.sync-status[data-state="error"] {
  border-color: rgba(255, 77, 109, 0.42);
  color: #b8223d;
}

.sync-status[data-state="error"] .sync-status-dot {
  background: var(--red);
}

.session-switch {
  display: none;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcfb;
}

body.is-dev-session .session-switch {
  display: flex;
}

.session-switch span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.session-switch select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
  outline: 0;
}

.view-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.view-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--button-text);
}

.launch-gate {
  display: grid;
  height: calc(100dvh - 58px);
  min-height: 0;
  place-items: center;
  padding: clamp(10px, 2dvh, 24px);
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(0, 168, 120, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(102, 88, 211, 0.1), transparent 38%),
    var(--paper);
}

.launch-gate-card {
  display: grid;
  width: min(520px, 100%);
  max-height: calc(100dvh - 78px);
  gap: clamp(10px, 1.7dvh, 18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 2.4dvh, 26px);
  overflow: auto;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(17, 17, 17, 0.12);
}

.launch-gate-card h1 {
  margin: 0;
  font-size: clamp(1.52rem, 3.2dvh, 2rem);
}

.launch-gate-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.45;
}

.launch-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-panel,
.auth-form,
.verify-panel,
.onboarding-form {
  display: grid;
  gap: clamp(8px, 1.4dvh, 12px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #eef2f0;
}

.auth-tabs button {
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-tabs button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.08);
}

.google-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
}

.google-auth-button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--button-text);
  font-size: 0.86rem;
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-form label,
.onboarding-form label {
  display: grid;
  gap: 8px;
}

.auth-consent,
.age-consent {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.consent-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.consent-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.consent-check a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-forgot-button {
  justify-self: center;
  margin-top: 4px;
}

.onboarding-back-button {
  justify-self: center;
}

.password-reset-panel .auth-form {
  margin-top: 0;
}

.auth-form label span,
.onboarding-form label span,
.generated-id span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-form input,
.onboarding-form input,
.onboarding-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcfb;
  color: var(--ink);
  font-weight: 800;
}

.generated-id {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

@media (max-height: 720px) {
  .launch-gate {
    place-items: start center;
  }

  .launch-gate-card p {
    line-height: 1.3;
  }

  .auth-consent,
  .age-consent,
  .generated-id {
    padding: 10px;
  }
}

.generated-id strong {
  font-size: 1.1rem;
}

.generated-id small {
  color: var(--muted);
  font-weight: 720;
}

#authFeedback,
#verifyFeedback,
#onboardingFeedback {
  min-height: 20px;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 720;
}

#authFeedback[data-tone="info"] {
  color: var(--muted);
}

.evolution-play-button {
  display: grid;
  width: 112px;
  height: 112px;
  min-height: 0;
  justify-self: center;
  place-items: center;
  border-radius: 50%;
  padding: 0 16px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
    var(--button);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    0 0 0 8px rgba(255, 255, 255, 0.04);
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.08;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.evolution-play-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.34),
    0 0 0 8px rgba(255, 255, 255, 0.06);
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) 340px;
  height: calc(100vh - 58px);
  min-height: 620px;
}

.exercise-shell {
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: 82px auto minmax(0, 1fr);
}

.exercise-shell.is-right-handed {
  grid-template-columns: 320px minmax(0, 1fr);
}

.exercise-shell.is-left-handed {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.exercise-header {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.exercise-titlebar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.exercise-titlebar .secondary-button {
  min-height: 38px;
  padding: 0 12px;
}

.exercise-titlebar h1 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
}

.exercise-mode-label {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.hand-toggle {
  min-height: 36px;
  flex: 0 0 auto;
  background: #fbfcfb;
  color: var(--ink);
}

.exercise-timer {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  gap: 5px;
}

.wave-criterion-ring.top-timer-ring {
  --criterion-color: var(--yellow);
  width: 58px;
  height: 58px;
}

.wave-criterion-ring.top-timer-ring::before {
  width: 40px;
  height: 40px;
}

.wave-criterion-ring.top-timer-ring strong,
.exercise-live .wave-criterion-ring.top-timer-ring strong {
  min-width: 0;
  margin-top: 0;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
}

.exercise-live {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.exercise-live strong {
  display: block;
  min-width: 88px;
  margin-top: 2px;
  font-size: 1.2rem;
  line-height: 1;
}

.exercise-live p {
  min-width: 0;
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: right;
}

.exercise-shell .training-floor {
  grid-column: 1;
  grid-row: 3;
  grid-template-rows: minmax(0, 1fr);
}

.exercise-shell .score-panel {
  grid-column: 2;
  grid-row: 3;
}

.exercise-shell.is-right-handed .training-floor {
  grid-column: 2;
}

.exercise-shell.is-right-handed .score-panel {
  grid-column: 1;
  border-right: 1px solid var(--line);
  border-left: 0;
}

.exercise-shell.is-left-handed .training-floor {
  grid-column: 1;
}

.exercise-shell.is-left-handed .score-panel {
  grid-column: 2;
  border-right: 0;
  border-left: 1px solid var(--line);
}

.coach-panel,
.score-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: auto;
  background: var(--surface);
}

.coach-panel {
  border-right: 1px solid var(--line);
}

.score-panel {
  border-left: 1px solid var(--line);
}

.brand,
.mission,
.training-rules,
.toolbox,
.score-readout,
.wave-criteria-metrics,
.wave-panel,
.metrics,
.calibration-panel,
.stats-grid,
.round-action,
.history {
  padding: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.eyebrow,
.mission-label,
.score-label,
.topbar-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 3px 0 0;
  font-size: 1.45rem;
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 1rem;
}

.mission {
  border-bottom: 1px solid var(--line);
}

.mission-text {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1.35;
}

.training-rules {
  border-bottom: 1px solid var(--line);
}

.training-rules ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.35;
}

.toolbox {
  display: grid;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.primary-button {
  background: var(--button);
  color: var(--button-text);
  font-weight: 850;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
}

.text-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.range-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.range-control input {
  width: 100%;
  accent-color: var(--green);
}

.training-floor {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: #fbfcfb;
}

.canvas-topbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.canvas-topbar strong {
  display: block;
  min-width: 88px;
  margin-top: 2px;
  font-size: 1.25rem;
  line-height: 1;
}

.canvas-topbar p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
  text-align: right;
}

#drawingCanvas {
  display: block;
  grid-area: 1 / 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: none;
  cursor: crosshair;
}

.wave-transition {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 50%;
  min-width: 220px;
  transform: translateX(-50%);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(17, 17, 17, 0.1);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.wave-transition.is-observation {
  top: 22px;
  min-width: 180px;
  padding: 12px 18px;
}

.wave-transition.is-observation span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.wave-transition.is-observation .wave-direction-arrow {
  color: var(--green);
  font-size: 2.55rem;
  line-height: 0.85;
}

.wave-transition.is-observation strong {
  display: block;
  margin-top: 4px;
  font-size: 2.25rem;
  line-height: 0.95;
}

.xp-pop-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.xp-pop {
  position: absolute;
  left: 50%;
  top: 44%;
  display: grid;
  min-width: clamp(124px, 13vw, 180px);
  gap: 8px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(0, 168, 120, 0.24);
  border-radius: 8px;
  padding: clamp(13px, 1.5vw, 18px) clamp(16px, 2vw, 24px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 54px rgba(0, 168, 120, 0.24);
  color: var(--green);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  animation: xp-pop-rise 1360ms cubic-bezier(0.2, 0.82, 0.25, 1) forwards;
}

.xp-pop.is-reward {
  border-color: rgba(247, 184, 75, 0.38);
  box-shadow: 0 22px 56px rgba(247, 184, 75, 0.28), 0 14px 42px rgba(0, 168, 120, 0.18);
}

.xp-pop.is-combo {
  min-width: clamp(156px, 17vw, 230px);
}

.xp-pop-badge,
.xp-pop-combo,
.xp-pop-xp {
  display: block;
  line-height: 1;
}

.xp-pop-badge {
  color: var(--ink);
  font-size: clamp(1.16rem, 1.7vw, 1.55rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

.xp-pop-combo {
  color: var(--yellow);
  font-size: clamp(1rem, 1.45vw, 1.32rem);
  font-weight: 950;
}

.xp-pop-xp {
  color: var(--green);
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
}

@keyframes xp-pop-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, -28%) scale(0.82);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }

  32% {
    opacity: 1;
    transform: translate(-50%, -54%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -118%) scale(0.96);
  }
}

.admin-calibration-hud {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 32px rgba(17, 17, 17, 0.08);
  pointer-events: none;
}

.admin-calibration-hud span,
.admin-calibration-hud strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-calibration-hud span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-calibration-hud strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-wave-hud {
  z-index: 2;
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  padding: 8px 14px;
  background: rgba(17, 17, 17, 0.9);
  color: var(--surface);
}

.admin-wave-title {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  padding: 0 8px 0 2px;
}

.admin-wave-title strong {
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
}

.admin-wave-title span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-wave-controls {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 8px;
}

.admin-wave-control {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "check label"
    "select select";
  flex: 0 0 auto;
  min-width: 118px;
  align-items: center;
  gap: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-wave-control.is-master {
  min-width: 94px;
  grid-template-areas: "check label";
}

.admin-wave-control input {
  grid-area: check;
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.admin-wave-control span {
  grid-area: label;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.admin-wave-control select {
  grid-area: select;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 0 7px;
  background: #fbfcfb;
  color: var(--ink);
  font-weight: 850;
}

.admin-wave-control select:disabled {
  opacity: 0.42;
}

.score-readout {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.score-stack {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.wave-lives {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wave-life-heart {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #ff4d6d;
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 6px 16px rgba(255, 77, 109, 0.26);
}

.wave-life-heart.is-empty {
  color: #b8c2be;
  text-shadow: none;
}

.score-ring {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0deg, #e6ece9 0deg);
  transition: background 180ms ease;
}

.score-ring::before {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
  grid-area: 1 / 1;
}

.score-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  font-size: 1.45rem;
  font-weight: 900;
}

.score-ring-caption {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.score-readout h2 {
  margin-top: 2px;
  font-size: 1.2rem;
}

#feedbackText {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.wave-panel {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.wave-summary {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #111111;
  color: var(--surface);
}

.wave-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wave-summary-head span,
.wave-summary-grid span,
.wave-summary-stat span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.wave-summary-head strong {
  color: var(--yellow);
  font-size: 0.95rem;
}

.wave-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wave-summary-grid div {
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.wave-summary-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--surface);
  font-size: 1.05rem;
  line-height: 1;
}

.wave-summary-stats {
  display: grid;
  gap: 8px;
}

.wave-summary-stat {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
}

.wave-summary-stat strong {
  font-size: 0.9rem;
}

.wave-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.wave-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wave-grid-challenge {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wave-grid div {
  min-width: 0;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface);
}

.wave-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.wave-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wave-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 820;
}

.wave-criteria-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.wave-criterion {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  background: var(--surface);
}

.wave-criterion-ring {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--criterion-color, var(--green)) var(--criterion-angle, 0deg), #e6ece9 0deg);
  transition: background 180ms ease;
}

.wave-criterion-ring::before {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
  grid-area: 1 / 1;
}

.wave-criterion-ring strong {
  z-index: 1;
  grid-area: 1 / 1;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
}

.wave-criterion-ring-time strong {
  font-size: 0.72rem;
}

.wave-criterion > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.exercise-shell.is-wave-mode .score-readout {
  gap: 14px;
}

.exercise-shell.is-wave-mode .score-ring-caption {
  display: block;
}

.exercise-shell.is-wave-mode .score-label {
  display: none;
}

.exercise-shell.is-wave-mode .exercise-live p {
  display: none;
}

.exercise-shell.is-wave-mode #feedbackText {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.exercise-shell.is-wave-mode .stats-grid,
.exercise-shell.is-wave-mode .history,
.exercise-shell.is-wave-mode .calibration-panel {
  display: none;
}

.metrics {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.exercise-shell.is-wave-mode .metrics {
  display: none;
}

.metric {
  display: grid;
  gap: 7px;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.metric-head strong {
  color: var(--ink);
}

.metric-track {
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eeeb;
}

.metric-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 8px;
  background: var(--green);
  transition: width 180ms ease;
}

.metric[data-metric="closure"] .metric-track span {
  background: var(--red);
}

.metric[data-metric="fluidity"] .metric-track span {
  background: var(--cyan);
}

.metric[data-metric="time"] .metric-track span {
  background: var(--yellow);
}

.metric.is-informative .metric-track {
  display: none;
}

.metric.is-informative .metric-head {
  min-height: 28px;
}

.calibration-panel {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.calibration-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0 9px;
  background: var(--ink);
  color: var(--button-text);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.calibration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.calibration-stat {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface);
}

.calibration-stat span,
.calibration-threshold-row span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.calibration-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 0.98rem;
  line-height: 1;
}

.calibration-thresholds {
  display: grid;
  gap: 7px;
}

.calibration-threshold-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
}

.calibration-threshold-row strong {
  font-size: 0.92rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.round-action {
  border-bottom: 1px solid var(--line);
}

.round-action .primary-button {
  width: 100%;
}

.stat-tile {
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-tile strong {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
  line-height: 1;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.history-bars {
  display: grid;
  height: 120px;
  grid-template-columns: repeat(10, minmax(12px, 1fr));
  align-items: end;
  gap: 8px;
  margin-top: 18px;
}

.history-bar {
  min-height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: var(--ink);
}

.history-empty {
  display: grid;
  height: 120px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 760;
  text-align: center;
}

.training-catalog-screen {
  height: calc(100vh - 58px);
  overflow: auto;
  background: var(--paper);
}

.evolution-screen,
.quests-screen {
  height: calc(100vh - 58px);
  overflow: auto;
  background: var(--paper);
}

#evolutionView {
  overflow-x: hidden;
  overflow-y: auto;
}

.bootcamp-screen {
  height: calc(100dvh - 58px);
  overflow: auto;
  background: var(--paper);
}

.bootcamp-screen.is-pillar-mode {
  position: relative;
  overflow: clip;
  overflow-y: clip !important;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bootcamp-screen.is-pillar-mode::-webkit-scrollbar {
  display: none;
}

.admin-screen {
  height: calc(100vh - 58px);
  overflow: auto;
  background: var(--paper);
}

.training-catalog-screen * {
  min-width: 0;
}

.quests-screen * {
  min-width: 0;
}

.bootcamp-screen * {
  min-width: 0;
}

.training-catalog-header {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 480px);
  align-items: end;
  gap: 28px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.evolution-header,
.quests-header {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 520px);
  align-items: end;
  gap: 28px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.bootcamp-header {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 620px);
  align-items: end;
  gap: 28px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.bootcamp-header.is-pillar-mode {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 6;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 28px 28px 0;
  border-bottom: 0;
  background: transparent;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(280px, 720px);
  align-items: end;
  gap: 28px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.evolution-header > *,
.quests-header > *,
.training-catalog-header > *,
.bootcamp-header > *,
.admin-header > *,
.training-catalog-summary,
.profile-summary,
.quests-summary,
.xp-readout,
.attribute-board,
.vision-panel,
.quest-panel,
.avatar-readout,
.bootcamp-summary,
.admin-summary,
.pillar-list-panel,
.pillar-timeline-panel,
.week-detail-panel,
.admin-panel {
  min-width: 0;
}

.training-catalog-header h1 {
  margin-top: 4px;
  font-size: 2rem;
}

.evolution-header h1,
.quests-header h1 {
  margin-top: 4px;
  font-size: 2rem;
}

.bootcamp-header h1 {
  margin-top: 4px;
  font-size: 2rem;
}

.admin-header h1 {
  margin-top: 4px;
  font-size: 2rem;
}

.training-catalog-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.4;
}

.evolution-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.4;
}

.bootcamp-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.4;
}

.admin-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.4;
}

.bootcamp-summary,
.training-catalog-summary,
.quests-summary,
.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.training-catalog-summary,
.quests-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  padding: 28px;
}

.training-card {
  display: grid;
  min-height: 380px;
  grid-template-rows: 170px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.training-card.is-coming {
  opacity: 0.76;
}

.training-card-visual {
  position: relative;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 33px, rgba(17, 17, 17, 0.05) 34px),
    repeating-linear-gradient(0deg, #fbfcfb 0 33px, rgba(17, 17, 17, 0.05) 34px);
}

.training-circle-preview {
  width: 112px;
  height: 112px;
  border: 4px solid var(--green);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.12);
}

.values-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 74px));
  gap: 10px;
  place-content: center;
}

.values-preview span {
  display: block;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.values-preview span:nth-child(1) {
  background: #f8faf9;
}

.values-preview span:nth-child(2) {
  background: #8b9591;
}

.values-preview span:nth-child(3) {
  background: #111111;
}

.training-card-body {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 18px;
  padding: 20px;
}

.training-card-body h2 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.training-card-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 690;
  line-height: 1.4;
}

.training-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.training-card-stats span {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.training-card-stats strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.training-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 10px;
}

.bootcamp-stat {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.bootcamp-stat span,
.pillar-card span,
.week-meta span,
.detail-label,
.file-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bootcamp-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 1.1;
}

.evolution-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.evolution-goals span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-summary {
  display: grid;
  grid-template-columns: 128px 104px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.profile-rank,
.profile-level {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.profile-rank {
  width: 128px;
}

.profile-rank span,
.profile-level span,
.quest-count span,
.avatar-readout span,
.xp-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-rank strong {
  margin-top: -12px;
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
}

.profile-level strong {
  margin-top: -14px;
  font-size: 2.4rem;
  line-height: 1;
}

.xp-readout {
  display: grid;
  gap: 10px;
}

.xp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.xp-head strong {
  font-size: 0.9rem;
  text-align: right;
}

.xp-head span,
.xp-head strong {
  min-width: 0;
}

.xp-track {
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eeeb;
}

.xp-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 8px;
  background: var(--green);
  transition: width 180ms ease;
}

.evolution-shell {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.evolution-stage {
  display: grid;
  grid-template-columns: 300px minmax(0, 1.45fr) 320px;
  min-height: 580px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-banner {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 28px;
  background:
    radial-gradient(circle at top, rgba(0, 168, 120, 0.12), transparent 42%),
    linear-gradient(180deg, #161917 0%, #101211 100%);
  color: #ffffff;
}

.profile-banner .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.profile-banner-copy {
  display: grid;
  gap: 14px;
}

.profile-id {
  display: grid;
  gap: 6px;
}

.profile-id h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.profile-id p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
  font-weight: 760;
}

.profile-title-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 820;
}

.profile-rank-card {
  --rank-accent: #b9c1bc;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--rank-accent);
}

.profile-rank-card[data-rank="Fer"] {
  --rank-accent: #bcc6c2;
}

.profile-rank-card[data-rank="Bronze"] {
  --rank-accent: #c68a55;
}

.profile-rank-card[data-rank="Argent"] {
  --rank-accent: #dde3e8;
}

.profile-rank-card[data-rank="Or"] {
  --rank-accent: #e0bd54;
}

.profile-rank-card[data-rank="Platine"] {
  --rank-accent: #5ec6ad;
}

.profile-rank-card[data-rank="Diamant"] {
  --rank-accent: #4cc4ff;
}

.rank-emblem {
  position: relative;
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  place-items: center;
}

.rank-emblem::before,
.rank-emblem::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid currentColor;
  border-radius: 16px;
  transform: rotate(45deg);
}

.rank-emblem::after {
  inset: 28px;
  opacity: 0.36;
}

.rank-emblem span {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.profile-rank-meta {
  display: grid;
  gap: 12px;
}

.profile-rank-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.profile-rank-line span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.profile-rank-line strong {
  color: #ffffff;
  font-size: 1.14rem;
  font-weight: 880;
}

.profile-xp {
  align-self: end;
}

.profile-xp .xp-head {
  color: rgba(255, 255, 255, 0.78);
}

.profile-xp .xp-head strong,
.profile-xp .xp-head span {
  color: #ffffff;
}

.profile-xp .xp-track {
  background: rgba(255, 255, 255, 0.12);
}

.evolution-hero.avatar-stage {
  position: relative;
  min-height: 580px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(238, 244, 240, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 37px, rgba(17, 17, 17, 0.04) 38px);
}

.avatar-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 168, 120, 0.16), transparent 34%),
    radial-gradient(circle at 50% 76%, rgba(17, 17, 17, 0.05), transparent 42%);
  pointer-events: none;
}

#evolutionView #avatarCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 580px;
}

.evolution-avatar-readout {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 2;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
}

.evolution-avatar-readout span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.evolution-avatar-readout strong {
  font-size: 1.12rem;
  line-height: 1.08;
}

.evolution-focus {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
  background: #f7faf8;
}

.vision-hero-card {
  display: grid;
  gap: 10px;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.vision-hero-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.vision-hero-card strong {
  font-size: 1.38rem;
  line-height: 1.1;
}

.evolution-skills {
  display: grid;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--surface);
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
  gap: 28px;
  align-items: start;
}

.evolution-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.25fr) minmax(300px, 0.95fr);
  min-height: calc(100vh - 191px);
  overflow-x: hidden;
}

.quests-layout {
  display: grid;
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
  min-height: calc(100vh - 191px);
  padding: 28px;
}

.avatar-stage,
.attribute-board,
.vision-panel,
.quest-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.vision-panel,
.quest-panel {
  border-right: 0;
}

.avatar-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(244, 246, 245, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 33px, rgba(17, 17, 17, 0.05) 34px);
}

#avatarCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
}

.avatar-readout {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.avatar-readout strong {
  font-size: 1.35rem;
}

.attribute-board,
.vision-panel,
.quest-panel {
  padding: 26px;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.board-head h2 {
  margin-top: 4px;
  font-size: 1.25rem;
}

.quest-count {
  display: grid;
  min-width: 82px;
  gap: 5px;
  justify-items: end;
}

.quest-count strong {
  font-size: 1.2rem;
}

.vision-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.vision-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fbfcfb;
}

.vision-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.vision-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.18rem;
  line-height: 1.12;
}

.radar-wrap {
  display: grid;
  min-height: 330px;
  place-items: center;
  padding: 18px 0 10px;
}

#radarChart {
  width: min(100%, 330px);
  height: auto;
}

.radar-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar-axis {
  stroke: #c5ceca;
  stroke-width: 1;
}

.radar-area {
  fill: rgba(0, 168, 120, 0.22);
  stroke: var(--green);
  stroke-width: 3;
}

.radar-dot {
  fill: var(--ink);
}

.radar-label {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-anchor: middle;
}

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

.attribute-row {
  display: grid;
  gap: 7px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.attribute-row:last-child {
  border-bottom: 0;
}

#bootcampBackButton {
  min-height: auto;
  justify-self: start;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 820;
  line-height: 1;
}

.attribute-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attribute-name {
  font-weight: 850;
}

.attribute-level {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.attribute-desc {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 680;
  line-height: 1.3;
}

.attribute-track {
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eeeb;
}

.attribute-track span {
  display: block;
  height: 100%;
  border-radius: 8px;
  transition: width 180ms ease;
}

.evolution-profile-shell {
  padding: 0;
  gap: 0;
}

.evolution-profile-stage {
  position: relative;
  min-height: calc(100dvh - 58px);
  display: grid;
  grid-template-areas: "identity hero skills";
  grid-template-columns: minmax(208px, 0.64fr) minmax(0, 1.25fr) minmax(340px, 0.96fr);
  gap: clamp(14px, 1.6vw, 24px);
  overflow: visible;
  padding: clamp(20px, 2vw, 28px);
  background:
    radial-gradient(circle at 8% 10%, rgba(61, 225, 243, 0.2), transparent 22%),
    radial-gradient(circle at 78% 20%, rgba(111, 153, 255, 0.18), transparent 28%),
    radial-gradient(circle at 56% 44%, rgba(255, 199, 118, 0.08), transparent 18%),
    linear-gradient(180deg, #11233f 0%, #172a49 36%, #151d31 100%);
  color: #ffffff;
  isolation: isolate;
}

.evolution-profile-stage::before,
.evolution-profile-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.evolution-profile-stage::before {
  background:
    linear-gradient(158deg, transparent 0 16%, rgba(110, 201, 255, 0.16) 16.7%, transparent 17.4%),
    linear-gradient(157deg, transparent 0 30%, rgba(110, 201, 255, 0.1) 30.7%, transparent 31.4%),
    linear-gradient(158deg, transparent 0 78%, rgba(110, 201, 255, 0.1) 78.7%, transparent 79.4%);
  opacity: 0.78;
}

.evolution-profile-stage::after {
  background:
    linear-gradient(180deg, transparent 0 72%, rgba(255, 255, 255, 0.05) 92%, rgba(255, 255, 255, 0.08) 100%),
    radial-gradient(circle at 74% 54%, rgba(255, 232, 175, 0.08), transparent 21%);
  opacity: 0.88;
}

.evolution-profile-identity,
.evolution-profile-hero,
.evolution-profile-skills {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.evolution-profile-identity {
  grid-area: identity;
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: clamp(28px, 5vh, 56px);
}

.evolution-profile-identity .eyebrow,
.evolution-profile-skills .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.evolution-profile-rank-card {
  --rank-accent: #bcc6c2;
  position: relative;
  display: grid;
  gap: 12px;
  max-width: 240px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 18, 29, 0.78), rgba(8, 10, 18, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 32%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 42px rgba(0, 0, 0, 0.22);
  color: var(--rank-accent);
}

.evolution-profile-rank-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--rank-accent), rgba(255, 255, 255, 0));
  opacity: 0.6;
}

.evolution-profile-rank-card[data-rank="Fer"] {
  --rank-accent: #bcc6c2;
}

.evolution-profile-rank-card[data-rank="Bronze"] {
  --rank-accent: #c68a55;
}

.evolution-profile-rank-card[data-rank="Argent"] {
  --rank-accent: #dfe5eb;
}

.evolution-profile-rank-card[data-rank="Or"] {
  --rank-accent: #e0bd54;
}

.evolution-profile-rank-card[data-rank="Platine"] {
  --rank-accent: #5ec6ad;
}

.evolution-profile-rank-card[data-rank="Diamant"] {
  --rank-accent: #4cc4ff;
}

.evolution-profile-rank-card[data-rank="nouveau-ne"] {
  --rank-accent: #bcc6c2;
}

.evolution-profile-rank-card[data-rank="apprenti"] {
  --rank-accent: #75c79b;
}

.evolution-profile-rank-card[data-rank="disciple"] {
  --rank-accent: #75b7df;
}

.evolution-profile-rank-card[data-rank="chevalier"] {
  --rank-accent: #d3c06a;
}

.evolution-profile-rank-card[data-rank="maitre"] {
  --rank-accent: #d58f70;
}

.evolution-profile-rank-card[data-rank="grand-maitre"] {
  --rank-accent: #d86f9f;
}

.evolution-rank-emblem {
  width: 108px;
  aspect-ratio: 1;
  justify-self: start;
}

.evolution-rank-emblem::before,
.evolution-rank-emblem::after {
  border-radius: 28px;
}

.evolution-profile-rank-copy {
  display: grid;
  gap: 8px;
}

.evolution-profile-rank-copy .profile-id h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  line-height: 0.94;
}

.evolution-profile-rank-copy .profile-id p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
  font-weight: 760;
}

.evolution-profile-rank-copy .profile-title-chip {
  width: fit-content;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
}

.evolution-profile-id-card {
  display: grid;
  gap: 4px;
  max-width: 240px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.48);
  backdrop-filter: blur(10px);
}

.evolution-profile-id-card span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.evolution-profile-id-card strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 860;
}

.evolution-profile-id-card small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 760;
}

.evolution-profile-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 240px;
}

.evolution-profile-meta-stat,
.evolution-profile-quickstat,
.evolution-profile-objective {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.48);
  backdrop-filter: blur(10px);
}

.evolution-profile-meta-stat span,
.evolution-profile-quickstat span,
.evolution-profile-objective span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.evolution-profile-meta-stat strong,
.evolution-profile-quickstat strong,
.evolution-profile-objective strong {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 860;
}

.evolution-profile-xp {
  max-width: 240px;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.48);
  backdrop-filter: blur(10px);
}

.xp-level-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.xp-level-head span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 880;
  line-height: 1;
  text-transform: uppercase;
}

.xp-level-head strong {
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: 940;
  line-height: 0.86;
}

.evolution-profile-xp .xp-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
}

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

.xp-progress-caption span,
.xp-progress-caption strong {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  font-weight: 840;
  line-height: 1;
  white-space: nowrap;
}

.xp-progress-caption strong {
  color: #ffffff;
}

.evolution-trophy-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  max-width: 240px;
  min-height: 54px;
  border: 1px solid rgba(227, 182, 83, 0.34);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(32, 24, 12, 0.58);
  color: #ffffff;
  text-align: left;
}

.evolution-trophy-icon {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: #e0bd54;
  color: #1b1304;
  font-weight: 950;
}

.evolution-trophy-card span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.evolution-trophy-card strong {
  font-size: 0.92rem;
}

.evolution-trophy-card small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.74rem;
  font-weight: 800;
}

.evolution-badge-card {
  border-color: rgba(244, 247, 249, 0.24);
  background: rgba(244, 247, 249, 0.08);
}

.evolution-badge-icon {
  background: #f4f7f9;
  color: #111418;
  font-size: 0.78rem;
}

.evolution-reward-card {
  max-width: 240px;
  min-height: 54px;
  border-color: rgba(0, 168, 120, 0.46);
  background:
    linear-gradient(135deg, rgba(0, 168, 120, 0.28), rgba(244, 247, 249, 0.08)),
    rgba(0, 168, 120, 0.12);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.evolution-reward-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 168, 120, 0.72);
  background:
    linear-gradient(135deg, rgba(0, 168, 120, 0.38), rgba(244, 247, 249, 0.1)),
    rgba(0, 168, 120, 0.16);
}

.evolution-reward-icon {
  background: var(--green);
  color: #021710;
  font-size: 0.72rem;
}

.evolution-profile-hero {
  grid-area: hero;
  position: relative;
  min-height: 0;
  display: grid;
  place-items: stretch;
  overflow: hidden;
  align-self: stretch;
}

.evolution-profile-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 28%, rgba(255, 222, 161, 0.16), transparent 18%),
    radial-gradient(circle at 50% 74%, rgba(139, 205, 255, 0.11), transparent 32%);
  pointer-events: none;
}

#evolutionView #avatarCanvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.18));
}

.equipped-badge {
  --badge-rgb: 242 201 76;
  --badge-ink: #1b1304;
  position: absolute;
  top: 15%;
  right: 18%;
  z-index: 3;
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgb(var(--badge-rgb) / 0.82);
  border-radius: 50%;
  background: rgb(var(--badge-rgb));
  color: var(--badge-ink);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.24),
    0 0 32px rgb(var(--badge-rgb) / 0.22);
  font-size: 0.82rem;
  font-weight: 950;
}

.equipped-badge[data-rarity="common"] {
  --badge-rgb: 152 169 177;
  --badge-ink: #101316;
}

.equipped-badge[data-rarity="default"] {
  --badge-rgb: 244 247 249;
  --badge-ink: #111418;
}

.equipped-badge[data-rarity="rare"] {
  --badge-rgb: 53 181 211;
  --badge-ink: #06151a;
}

.equipped-badge[data-rarity="epic"] {
  --badge-rgb: 171 128 255;
  --badge-ink: #140b25;
}

.equipped-badge[data-rarity="legendary"] {
  --badge-rgb: 242 201 76;
  --badge-ink: #1b1304;
}

.evolution-profile-hero-caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 220px;
  transform: translateX(-50%);
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.48);
  backdrop-filter: blur(12px);
  text-align: center;
}

.evolution-profile-hero-caption span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.evolution-profile-hero-caption strong {
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 860;
}

.evolution-profile-skills {
  grid-area: skills;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: clamp(28px, 5vh, 56px);
}

.evolution-profile-skills-head {
  display: grid;
  gap: 8px;
}

.evolution-profile-quickstats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.evolution-profile-radar {
  display: grid;
  justify-items: center;
}

.evolution-profile-radar-wrap {
  width: min(100%, 365px);
  aspect-ratio: 1;
  min-height: 0;
  padding: 14px;
  border-radius: 50%;
  border: 2px solid rgba(224, 189, 84, 0.72);
  background:
    radial-gradient(circle at center, rgba(55, 127, 255, 0.24), rgba(18, 40, 76, 0.32) 60%, rgba(15, 22, 37, 0.12) 76%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 64%);
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, 0.02),
    0 30px 54px rgba(0, 0, 0, 0.2);
}

.evolution-profile-radar-wrap #radarChart {
  width: 100%;
  max-width: none;
}

.evolution-profile-stage .radar-grid {
  stroke: rgba(74, 151, 255, 0.48);
  stroke-width: 2;
}

.evolution-profile-stage .radar-axis {
  stroke: rgba(224, 189, 84, 0.18);
}

.evolution-profile-stage .radar-area {
  fill: rgba(96, 146, 255, 0.16);
  stroke: rgba(132, 202, 255, 0.96);
  stroke-width: 3;
}

.evolution-profile-stage .radar-dot {
  fill: #ffd989;
}

.evolution-profile-stage .radar-label {
  fill: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 760;
}

.evolution-profile-attribute-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.evolution-profile-attribute-list .attribute-row {
  gap: 5px;
  padding: 8px 8px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.4), rgba(8, 11, 18, 0.56));
}

.evolution-profile-attribute-list .attribute-head {
  gap: 8px;
}

.evolution-profile-attribute-list .attribute-name,
.evolution-profile-attribute-list .attribute-level {
  color: #ffffff;
}

.evolution-profile-attribute-list .attribute-name {
  font-size: 0.82rem;
}

.evolution-profile-attribute-list .attribute-level {
  font-size: 0.82rem;
}

.evolution-profile-attribute-list .attribute-xp {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.2;
}

.evolution-profile-attribute-list .attribute-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  height: 7px;
}

.evolution-profile-attribute-list .attribute-track span {
  border-radius: 999px;
}

.evolution-profile-attribute-list .attribute-track {
  background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 981px) {
  .evolution-profile-identity,
  .evolution-profile-skills {
    gap: 10px;
    padding-top: clamp(12px, 3vh, 36px);
  }

  .evolution-profile-rank-card {
    gap: 10px;
    padding: 14px 14px 12px;
  }

  .evolution-rank-emblem {
    width: clamp(86px, 6vw, 98px);
  }

  .evolution-profile-rank-copy .profile-id h1 {
    font-size: clamp(1.85rem, 2.4vw, 2.45rem);
    white-space: nowrap;
  }

  .evolution-profile-radar-wrap {
    width: min(100%, clamp(292px, 23vw, 345px));
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  .evolution-profile-stage {
    gap: 12px;
    padding: 14px 20px;
  }

  .evolution-profile-identity,
  .evolution-profile-skills {
    gap: 8px;
    padding-top: 0;
  }

  .evolution-profile-rank-card {
    gap: 8px;
    padding: 12px;
  }

  .evolution-rank-emblem {
    width: 72px;
  }

  .evolution-profile-rank-copy .profile-id h1 {
    font-size: clamp(1.65rem, 2.1vw, 2rem);
  }

  .evolution-profile-id-card,
  .evolution-profile-xp {
    gap: 5px;
    padding: 8px 10px;
  }

  .xp-level-head strong {
    font-size: 1.9rem;
  }

  .evolution-play-button {
    width: 94px;
    height: 94px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .evolution-trophy-card {
    min-height: 48px;
    padding: 7px 9px;
  }

  .evolution-trophy-icon {
    width: 34px;
  }

  .evolution-profile-radar-wrap {
    width: min(100%, 280px);
    padding: 10px;
  }

  .evolution-profile-attribute-list .attribute-row {
    gap: 4px;
    padding: 7px;
  }
}

.attribute-row[data-attribute="dexterity"] .attribute-track span {
  background: var(--green);
}

.attribute-row[data-attribute="concept"] .attribute-track span {
  background: var(--yellow);
}

.attribute-row[data-attribute="observation"] .attribute-track span {
  background: var(--cyan);
}

.attribute-row[data-attribute="visualization"] .attribute-track span {
  background: var(--red);
}

.attribute-row[data-attribute="creativity"] .attribute-track span {
  background: var(--violet);
}

.attribute-row[data-attribute="perseverance"] .attribute-track span {
  background: #f0c36c;
}

.quest-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.quest-group {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfb;
}

.quest-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.quest-group-info,
.quest-group-meta {
  display: grid;
  gap: 4px;
}

.quest-group-meta {
  justify-items: end;
}

.quest-group-reset,
.quest-group-count,
.quest-group-chevron,
.quest-group-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.quest-group-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.quest-group-head h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quest-item {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
}

.quest-item.is-complete {
  border-color: rgba(0, 168, 120, 0.45);
  background: rgba(0, 168, 120, 0.08);
}

.quest-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 850;
}

.quest-trophy {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quest-item[data-period="daily"] .quest-trophy {
  border-color: rgba(166, 112, 68, 0.4);
  color: #8b5e3c;
}

.quest-item[data-period="weekly"] .quest-trophy {
  border-color: rgba(126, 137, 151, 0.42);
  color: #5d6772;
}

.quest-item[data-period="monthly"] .quest-trophy {
  border-color: rgba(201, 160, 33, 0.4);
  color: #9b7a14;
}

.quest-item[data-period="yearly"] .quest-trophy {
  border-color: rgba(99, 77, 173, 0.42);
  color: #5e49a0;
}

.quest-item.is-complete .quest-title,
.quest-item.is-complete .quest-desc {
  text-decoration: line-through;
}

.quest-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.quest-reward {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quest-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quest-action-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  text-align: right;
}

.quest-action-button:not(:disabled):hover {
  border-color: var(--ink);
}

.quest-item:not(.is-complete) .quest-action-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--button-text);
}

.quest-item.is-complete .quest-action-button {
  border-color: rgba(0, 168, 120, 0.35);
  background: rgba(0, 168, 120, 0.08);
  color: var(--green);
}

.quests-stage-shell {
  min-height: 100%;
}

.quests-stage-panel {
  position: relative;
  min-height: calc(100vh - 58px);
  overflow: hidden;
  padding: 30px 28px 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(73, 113, 168, 0.24), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(237, 190, 113, 0.14), transparent 26%),
    linear-gradient(180deg, #20252f 0%, #141922 58%, #0e1319 100%);
  color: #ffffff;
}

.quests-stage-panel::before,
.quests-stage-panel::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.quests-stage-panel::before {
  top: 120px;
  right: -12%;
  width: 56%;
  height: 56%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.42;
}

.quests-stage-panel::after {
  left: 24%;
  right: 0;
  bottom: -14%;
  height: 44%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  clip-path: polygon(0 48%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.38;
}

.quests-stage-hero,
.quests-stage-layout {
  position: relative;
  z-index: 1;
}

.quests-stage-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(240px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.quests-stage-copy {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.quests-stage-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.52rem, 4.5vw, 4.14rem);
  line-height: 0.94;
}

.quests-stage-intro {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.quests-stage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quest-stage-stat {
  display: grid;
  gap: 6px;
  min-width: 132px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(8, 10, 13, 0.38);
  backdrop-filter: blur(8px);
}

.quest-stage-stat span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.quest-stage-stat strong {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 860;
}

.quests-stage-layout {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 24px;
  margin-top: 34px;
  align-items: start;
}

.quests-period-nav {
  display: grid;
  gap: 10px;
  align-content: start;
}

.quest-period-button {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.24);
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.quest-period-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.quest-period-button.is-active {
  border-color: rgba(230, 195, 107, 0.58);
  background: linear-gradient(180deg, rgba(245, 212, 126, 0.18), rgba(8, 10, 13, 0.42));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  color: #ffffff;
}

.quest-period-label {
  font-size: 0.82rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quests-board {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.quest-rail {
  width: 100%;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x proximity;
}

.quest-rail::-webkit-scrollbar {
  height: 10px;
}

.quest-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.quest-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 760;
}

.quest-mission-card {
  flex: 0 0 clamp(238px, 25vw, 286px);
  display: grid;
  grid-template-rows: auto auto auto auto;
  min-height: 238px;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(229, 214, 179, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 12, 17, 0.92), rgba(32, 29, 25, 0.78)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: #ffffff;
  scroll-snap-align: start;
}

.quest-mission-card.is-complete {
  border-color: rgba(230, 195, 107, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 34px rgba(0, 0, 0, 0.16);
}

.quest-card-state {
  margin: 0;
  color: rgba(230, 195, 107, 0.86);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.quest-card-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.14rem;
  line-height: 1.12;
  font-weight: 860;
}

.quest-card-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 720;
}

.quest-mission-card.is-complete .quest-card-title,
.quest-mission-card.is-complete .quest-card-desc {
  text-decoration: line-through;
}

.quest-card-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.quest-card-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.quest-card-progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #efe5c2 0%, #e1b856 100%);
  transition: width 180ms ease;
}

.quest-card-progress-value {
  color: rgba(255, 231, 165, 0.88);
  font-size: 0.9rem;
  font-weight: 860;
}

.quest-skill-tag {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  border: 1px solid rgba(230, 195, 107, 0.32);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(230, 195, 107, 0.12);
  color: rgba(255, 244, 208, 0.92);
  font-size: 0.78rem;
  font-weight: 860;
  text-transform: uppercase;
}

.quest-timeframe-progress {
  display: grid;
  width: min(520px, 100%);
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(229, 214, 179, 0.18);
  border-radius: 8px;
  background: rgba(10, 12, 17, 0.68);
  color: #ffffff;
}

.quest-timeframe-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quest-timeframe-progress span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.quest-timeframe-progress strong {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 880;
}

.quest-timeframe-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.quest-timeframe-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #efe5c2 0%, #e1b856 100%);
  transition: width 180ms ease;
}

.quest-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.quest-card-reward {
  color: rgba(255, 247, 216, 0.88);
  font-size: 1rem;
  font-weight: 860;
}

.quest-card-action,
.quest-card-auto {
  min-height: 42px;
  border: 1px solid rgba(229, 214, 179, 0.2);
  border-radius: 8px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 820;
  text-transform: uppercase;
}

.quest-card-auto {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 244, 208, 0.92);
  background: rgba(230, 195, 107, 0.12);
  border-color: rgba(230, 195, 107, 0.32);
}

.quest-card-action:not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.36);
}

.quest-card-action.is-complete,
.quest-card-action:disabled {
  border-color: rgba(230, 195, 107, 0.32);
  background: rgba(230, 195, 107, 0.12);
  color: rgba(255, 244, 208, 0.92);
}

.bootcamp-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(420px, 1.25fr) minmax(320px, 0.95fr);
  min-height: calc(100vh - 191px);
}

.pillar-list-panel,
.pillar-timeline-panel,
.week-detail-panel {
  min-width: 0;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.week-detail-panel {
  border-right: 0;
}

.pillar-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.pillar-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
}

.pillar-card.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--button-text);
}

.pillar-card.is-locked {
  opacity: 0.54;
  cursor: default;
}

.pillar-card.is-market {
  border-style: dashed;
}

.pillar-card.is-active span {
  color: rgba(255, 255, 255, 0.72);
}

.pillar-card strong {
  font-size: 1.2rem;
  line-height: 1.05;
}

.pillar-card p {
  margin: 0;
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pillar-badge {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.marketplace-lock {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.marketplace-lock h2 {
  font-size: 1.35rem;
}

.marketplace-lock p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.marketplace-feature-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marketplace-feature-list li {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  font-weight: 800;
}

.marketplace-feature-list li:last-child {
  border-bottom: 0;
}

.marketplace-lock .primary-button {
  width: 100%;
}

.pillar-timeline {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.week-step {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
}

.week-step.is-active {
  border-color: var(--ink);
  box-shadow: inset 4px 0 0 var(--green);
}

.week-step.is-complete .week-code {
  background: var(--green);
  color: var(--button-text);
}

.week-step.is-locked {
  opacity: 0.72;
}

.week-code {
  display: grid;
  min-height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #e8eeeb;
  font-weight: 900;
}

.week-meta {
  display: grid;
  gap: 4px;
}

.week-meta strong {
  font-size: 1rem;
}

.week-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.week-score {
  min-width: 72px;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.week-detail {
  display: grid;
  gap: 18px;
}

.week-detail-head {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.week-detail-head h2 {
  font-size: 1.5rem;
}

.week-detail-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.video-slot {
  display: grid;
  min-height: 170px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 168, 120, 0.09), rgba(255, 255, 255, 0.78)),
    #fbfcfb;
}

.video-slot strong {
  font-size: 1.1rem;
}

.video-slot span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.detail-block {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-block:last-child {
  border-bottom: 0;
}

.detail-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.file-stack {
  display: grid;
  gap: 8px;
}

.file-chip {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcfb;
  font-weight: 850;
}

.star-rating {
  color: var(--yellow);
  font-size: 1.2rem;
  letter-spacing: 0;
}

.star-rating .empty-star {
  color: #d6ddda;
}

.rank-mark {
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--button-text);
  font-size: 2rem;
  font-weight: 950;
}

.bootcamp-heading {
  display: grid;
  gap: 10px;
}

.bootcamp-heading .text-button {
  width: fit-content;
}

.bootcamp-experience {
  min-height: calc(100dvh - 191px);
  background: linear-gradient(180deg, #edf0f2, #f5f6f7 34%, #eceff1 100%);
}

.bootcamp-screen:not(.is-pillar-mode) .bootcamp-experience {
  height: calc(100dvh - 64px);
  max-height: calc(100dvh - 64px);
  min-height: calc(100dvh - 64px);
  overflow: clip;
}

.bootcamp-screen.is-pillar-mode .bootcamp-experience {
  height: calc(100dvh - 58px);
  max-height: calc(100dvh - 58px);
  min-height: calc(100dvh - 58px);
  overflow: clip;
}

.bootcamp-root-panel,
.bootcamp-pillar-panel {
  min-height: calc(100dvh - 191px);
}

.bootcamp-root-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.14), transparent 22%),
    radial-gradient(circle at 18% 78%, rgba(255, 255, 255, 0.05), transparent 24%),
    linear-gradient(180deg, #0f1318, #171c22 42%, #12161b 100%);
}

.constellation-shell {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 168px 28px 28px;
}

.constellation-stage {
  --constellation-node-width: 108px;
  --constellation-orb-size: 72px;
  --constellation-core-size: 54px;
  position: relative;
  width: min(100%, 860px, calc(100vh - 250px));
  aspect-ratio: 1;
  overflow: hidden;
  background: transparent;
}

.constellation-stage::before {
  content: none;
}

.constellation-lines,
.constellation-node-layer {
  position: absolute;
  inset: 0;
}

.constellation-lines {
  overflow: visible;
}

.constellation-line {
  stroke-width: 0.55;
  stroke: rgba(255, 255, 255, 0.18);
}

.constellation-line.is-owned {
  stroke: rgba(92, 224, 178, 0.62);
}

.constellation-line.is-completed {
  stroke: rgba(224, 189, 84, 0.82);
}

.constellation-node {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: var(--constellation-node-width);
  padding: 0;
  background: transparent;
  color: #ffffff;
  transform: translate(-50%, calc(var(--constellation-orb-size) * -0.5));
  text-align: center;
}

.constellation-node.is-selected .constellation-orb {
  transform: none;
}

.constellation-orb {
  position: relative;
  display: grid;
  width: var(--constellation-orb-size);
  height: var(--constellation-orb-size);
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08) 34%, rgba(17, 21, 27, 0.96) 74%),
    #20252c;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.constellation-node:hover .constellation-orb {
  transform: none;
}

.constellation-core {
  display: grid;
  width: var(--constellation-core-size);
  height: var(--constellation-core-size);
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 21, 27, 0.94);
  font-size: 1.55rem;
  font-weight: 900;
}

.constellation-node-title {
  max-width: 116px;
  font-size: 0.82rem;
  font-weight: 860;
  line-height: 1.18;
}

.constellation-node.is-locked .constellation-orb {
  border-color: #3c434b;
  background: linear-gradient(180deg, #414852, #2c323a);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.18);
}

.constellation-node.is-locked .constellation-core {
  background: transparent;
  color: rgba(255, 255, 255, 0.63);
}

.constellation-node.is-locked {
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
}

.constellation-node[data-theme="mesure"].is-owned .constellation-orb,
.constellation-node[data-theme="mesure"].is-completed .constellation-orb {
  border-color: rgba(96, 235, 201, 0.82);
  background: linear-gradient(180deg, #4fe2c7, #17a68b);
}

.constellation-node[data-theme="gesture"].is-owned .constellation-orb,
.constellation-node[data-theme="gesture"].is-completed .constellation-orb {
  border-color: rgba(247, 115, 156, 0.82);
  background: linear-gradient(180deg, #f68ab5, #de5688);
}

.constellation-node[data-theme="perspective"].is-owned .constellation-orb,
.constellation-node[data-theme="perspective"].is-completed .constellation-orb {
  border-color: rgba(108, 179, 255, 0.82);
  background: linear-gradient(180deg, #84bcff, #4679e5);
}

.constellation-node[data-theme="valeurs"].is-owned .constellation-orb,
.constellation-node[data-theme="valeurs"].is-completed .constellation-orb {
  border-color: rgba(234, 195, 102, 0.84);
  background: linear-gradient(180deg, #eec978, #c8942a);
}

.constellation-node[data-theme="anatomie"].is-owned .constellation-orb,
.constellation-node[data-theme="anatomie"].is-completed .constellation-orb {
  border-color: rgba(255, 115, 136, 0.8);
  background: linear-gradient(180deg, #ff9cab, #d8556c);
}

.constellation-node[data-theme="character-design"].is-owned .constellation-orb,
.constellation-node[data-theme="character-design"].is-completed .constellation-orb {
  border-color: rgba(176, 129, 255, 0.82);
  background: linear-gradient(180deg, #c3a1ff, #8458dc);
}

.constellation-node[data-theme="environnement"].is-owned .constellation-orb,
.constellation-node[data-theme="environnement"].is-completed .constellation-orb {
  border-color: rgba(106, 221, 175, 0.82);
  background: linear-gradient(180deg, #8be2be, #249a70);
}

.constellation-node[data-theme="poses-extremes"].is-owned .constellation-orb,
.constellation-node[data-theme="poses-extremes"].is-completed .constellation-orb {
  border-color: rgba(255, 125, 102, 0.82);
  background: linear-gradient(180deg, #ffab98, #d65a3d);
}

.constellation-node[data-theme="composition"].is-owned .constellation-orb,
.constellation-node[data-theme="composition"].is-completed .constellation-orb {
  border-color: rgba(245, 173, 92, 0.82);
  background: linear-gradient(180deg, #f8bb75, #da7f20);
}

.constellation-node[data-theme="couleurs"].is-owned .constellation-orb,
.constellation-node[data-theme="couleurs"].is-completed .constellation-orb {
  border-color: rgba(88, 219, 255, 0.84);
  background: linear-gradient(180deg, #7de0ff, #23a8dc);
}

.constellation-node.is-completed .constellation-orb {
  border-color: #dcb954;
  box-shadow: 0 0 0 3px rgba(220, 185, 84, 0.34), 0 0 22px rgba(220, 185, 84, 0.26);
}

.constellation-node:not(.is-locked) .constellation-core {
  background: transparent;
}

.constellation-hud {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.constellation-hud-stat {
  display: grid;
  gap: 6px;
  min-width: 132px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(8, 10, 13, 0.78);
  backdrop-filter: blur(10px);
  color: #ffffff;
}

.constellation-hud-stat span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.constellation-hud-stat strong {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 860;
}

.constellation-summary {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  max-width: min(420px, calc(100% - 360px));
  display: grid;
  gap: 14px;
  color: #ffffff;
}

.constellation-summary h1 {
  margin: 0;
  font-size: clamp(2.52rem, 4.5vw, 4.14rem);
  line-height: 0.94;
}

.constellation-intro {
  display: -webkit-box;
  max-width: 360px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.constellation-lock-card {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5.4vh, 56px);
  z-index: 6;
  display: grid;
  width: min(340px, calc(100% - 40px));
  gap: 14px;
  justify-items: center;
  padding: 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.13), transparent 42%),
    rgba(17, 21, 27, 0.94);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
  color: #ffffff;
  text-align: center;
}

.constellation-lock-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.02;
}

.constellation-lock-card .primary-button {
  width: 100%;
  min-height: 46px;
  background: #555b63;
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  cursor: default;
}

.constellation-lock-card .primary-button:disabled {
  opacity: 1;
}

.bootcamp-pillar-panel {
  padding: 28px;
}

.bootcamp-screen.is-pillar-mode .bootcamp-pillar-panel {
  padding: 0;
  height: calc(100dvh - 58px);
  max-height: calc(100dvh - 58px);
  min-height: calc(100dvh - 58px);
  overflow: clip;
}

.pillar-hero {
  position: relative;
  --pillar-overlay-top: 230px;
  --pillar-overlay-bottom: 220px;
  display: grid;
  grid-template-rows: auto minmax(24px, 1fr) auto;
  min-height: clamp(640px, calc(100vh - 210px), 860px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 92px 32px 28px;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(10, 17, 16, 0.7), rgba(10, 17, 16, 0.2)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.22), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.28), transparent 60%);
  color: #ffffff;
}

.bootcamp-screen.is-pillar-mode .pillar-hero {
  --pillar-overlay-top: 214px;
  --pillar-overlay-bottom: 188px;
  height: calc(100dvh - 58px);
  max-height: calc(100dvh - 58px);
  min-height: calc(100dvh - 58px);
  border: 0;
  border-radius: 0;
  padding: 84px 28px 20px;
}

.pillar-hero::before,
.pillar-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.pillar-hero::before {
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.08), transparent 22%),
    radial-gradient(circle at 68% 78%, rgba(255, 255, 255, 0.05), transparent 18%);
  opacity: 0.9;
}

.pillar-hero::after {
  right: -8%;
  bottom: -24%;
  width: 56%;
  height: 98%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 52px rgba(255, 255, 255, 0.03),
    0 0 0 104px rgba(255, 255, 255, 0.02);
}

.pillar-hero[data-theme] {
  background-color: #20242a;
  background-image:
    linear-gradient(180deg, rgba(12, 14, 18, 0.16), rgba(12, 14, 18, 0.32)),
    radial-gradient(circle at 72% 26%, rgba(255, 255, 255, 0.14), transparent 24%),
    radial-gradient(circle at 28% 70%, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(135deg, #2c3138, #1f242b 48%, #15191f);
}

.pillar-hero[data-theme="mesure"] {
  background-color: #0d2e2a;
  background-image:
    linear-gradient(135deg, rgba(9, 15, 15, 0.72), rgba(9, 15, 15, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(137, 255, 235, 0.4), transparent 26%),
    radial-gradient(circle at 20% 80%, rgba(16, 120, 99, 0.4), transparent 28%),
    linear-gradient(120deg, #0c3c36, #164743 48%, #1b2c2c);
}

.pillar-hero[data-theme="gesture"] {
  background-color: #371325;
  background-image:
    linear-gradient(135deg, rgba(12, 10, 16, 0.72), rgba(12, 10, 16, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(255, 180, 214, 0.42), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(172, 36, 96, 0.4), transparent 28%),
    linear-gradient(120deg, #52213a, #6a2347 48%, #261624);
}

.pillar-hero[data-theme="perspective"] {
  background-color: #11253d;
  background-image:
    linear-gradient(135deg, rgba(10, 13, 18, 0.72), rgba(10, 13, 18, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(193, 225, 255, 0.38), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(53, 115, 221, 0.36), transparent 28%),
    linear-gradient(120deg, #16355d, #254a7b 48%, #101d33);
}

.pillar-hero[data-theme="valeurs"] {
  background-color: #3a2810;
  background-image:
    linear-gradient(135deg, rgba(18, 15, 10, 0.72), rgba(18, 15, 10, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(255, 228, 167, 0.38), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(194, 134, 39, 0.34), transparent 28%),
    linear-gradient(120deg, #5b4219, #74511b 48%, #23180c);
}

.pillar-hero[data-theme="anatomie"] {
  background-color: #401722;
  background-image:
    linear-gradient(135deg, rgba(17, 10, 12, 0.72), rgba(17, 10, 12, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(255, 207, 216, 0.36), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(200, 58, 89, 0.32), transparent 28%),
    linear-gradient(120deg, #5c2330, #7c2439 48%, #251318);
}

.pillar-hero[data-theme="character-design"] {
  background-color: #24124b;
  background-image:
    linear-gradient(135deg, rgba(10, 9, 17, 0.72), rgba(10, 9, 17, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(235, 213, 255, 0.38), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(123, 76, 214, 0.34), transparent 28%),
    linear-gradient(120deg, #432073, #572d86 48%, #171128);
}

.pillar-hero[data-theme="environnement"] {
  background-color: #103127;
  background-image:
    linear-gradient(135deg, rgba(9, 16, 13, 0.72), rgba(9, 16, 13, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(196, 246, 226, 0.36), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(38, 145, 108, 0.34), transparent 28%),
    linear-gradient(120deg, #184637, #205947 48%, #0f1c17);
}

.pillar-hero[data-theme="poses-extremes"] {
  background-color: #3a1812;
  background-image:
    linear-gradient(135deg, rgba(17, 11, 9, 0.72), rgba(17, 11, 9, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(255, 210, 195, 0.36), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(213, 77, 46, 0.34), transparent 28%),
    linear-gradient(120deg, #542117, #73261c 48%, #23120d);
}

.pillar-hero[data-theme="composition"] {
  background-color: #473018;
  background-image:
    linear-gradient(135deg, rgba(18, 13, 10, 0.72), rgba(18, 13, 10, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(255, 223, 190, 0.36), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(219, 129, 29, 0.34), transparent 28%),
    linear-gradient(120deg, #614120, #85552a 48%, #24170d);
}

.pillar-hero[data-theme="couleurs"] {
  background-color: #0f3140;
  background-image:
    linear-gradient(135deg, rgba(9, 13, 16, 0.72), rgba(9, 13, 16, 0.16)),
    radial-gradient(circle at 70% 22%, rgba(180, 245, 255, 0.36), transparent 26%),
    radial-gradient(circle at 18% 80%, rgba(31, 170, 221, 0.34), transparent 28%),
    linear-gradient(120deg, #1a4f64, #21667e 48%, #101d23);
}

.pillar-hero[data-theme] {
  background-color: #20242a;
  background-image:
    linear-gradient(180deg, rgba(12, 14, 18, 0.16), rgba(12, 14, 18, 0.32)),
    radial-gradient(circle at 72% 26%, rgba(255, 255, 255, 0.14), transparent 24%),
    radial-gradient(circle at 28% 70%, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(135deg, #2c3138, #1f242b 48%, #15191f);
}

.pillar-hero-stage {
  position: relative;
  grid-row: 1;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  pointer-events: none;
}

.pillar-hero-summary {
  position: relative;
  max-width: min(420px, 40vw);
  display: grid;
  gap: 14px;
}

.pillar-hero-summary .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.pillar-hero-summary h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.94;
}

.pillar-hero-description {
  display: -webkit-box;
  max-width: 360px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pillar-hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pillar-skill-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0 12px 0 8px;
  background: rgba(8, 10, 13, 0.36);
  backdrop-filter: blur(10px);
}

.pillar-skill-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.pillar-skill-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 820;
}

.pillar-hero-player {
  position: relative;
  justify-self: end;
  align-self: start;
  display: grid;
  width: min(300px, 100%);
  max-width: 100%;
  grid-template-columns: minmax(92px, 0.8fr) minmax(150px, 1.2fr);
  gap: 10px;
}

.pillar-hero-player-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(8, 10, 13, 0.32);
  backdrop-filter: blur(10px);
}

.pillar-hero-player-stat span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pillar-hero-player-stat strong {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 860;
}

.pillar-hero-xp-stat {
  gap: 8px;
}

.pillar-hero-xp-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.pillar-hero-xp-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #efe5c2 0%, #e1b856 100%);
  transition: width 180ms ease;
}

.week-detail {
  position: absolute;
  top: var(--pillar-overlay-top);
  left: 32px;
  z-index: 6;
  width: min(352px, calc(100% - 64px));
  max-width: calc(100% - 64px);
  overflow: visible;
  pointer-events: none;
}

.week-detail:empty {
  display: none;
}

.week-context-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px;
  background-color: #101216;
  background-image: none;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
  opacity: 1;
  pointer-events: auto;
  max-width: 352px;
}

.week-context-card.is-simple {
  grid-template-columns: 1fr;
  max-width: 284px;
}

.week-context-card.is-marketplace,
.week-context-card.is-locked {
  grid-template-columns: 1fr;
}

.week-context-visual {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
}

.week-context-glyph {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  font-size: 1.9rem;
  font-weight: 900;
}

.week-context-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.week-context-body h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.1;
}

.week-context-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.3;
}

.week-context-status {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.week-context-route,
.week-context-route-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 760;
  font-size: 0.84rem;
  text-align: center;
  text-decoration: none;
}

.week-context-route:disabled,
.week-context-route-button:disabled {
  opacity: 0.4;
}

.week-context-card .primary-button {
  display: inline-flex;
  width: fit-content;
  min-width: 148px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  padding-inline: 16px;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.week-context-card .week-replay-link {
  border: 0;
  background: var(--button);
  color: var(--button-text);
}

.week-context-popout {
  position: absolute;
  top: 0;
  left: calc(100% + 14px);
  z-index: 7;
  width: min(280px, calc(100vw - 460px));
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px;
  background-color: #101216;
  background-image: none;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
  opacity: 1;
  pointer-events: auto;
}

.week-context-popout.is-hidden {
  display: none;
}

.week-context-popout-title {
  margin: 0;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 840;
}

.week-context-drawer {
  display: grid;
}

.week-context-inline-drawer {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.week-drawer-stack {
  display: grid;
  gap: 10px;
}

.week-drawer-stack .file-chip {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.week-drawer-stack .file-chip span {
  color: rgba(255, 255, 255, 0.68);
}

.week-drawer-rating {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 760;
}

.pillar-timeline {
  --timeline-gap: clamp(12px, 1.8vw, 22px);
  --week-orb-size: clamp(108px, 8vw, 136px);
  position: relative;
  grid-row: 3;
  z-index: 2;
  display: flex;
  gap: var(--timeline-gap);
  width: 100%;
  margin-top: auto;
  justify-content: space-between;
  align-items: flex-end;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0 0;
}

.bootcamp-screen.is-pillar-mode .pillar-timeline {
  --timeline-gap: clamp(10px, 1.4vw, 18px);
  --week-orb-size: clamp(96px, 7vw, 126px);
  padding-top: 4px;
}

.pillar-empty-track {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 760;
}

.week-track-item {
  --orb-size: var(--week-orb-size);
  position: relative;
  flex: 0 0 auto;
  width: max(var(--orb-size), 112px);
  display: grid;
  justify-items: center;
  align-items: end;
  overflow: visible;
}

.week-track-item.is-test {
  --orb-size: calc(var(--week-orb-size) * 3);
  width: max(var(--orb-size), 300px);
}

.bootcamp-screen.is-pillar-mode .week-track-item.is-test {
  width: max(var(--orb-size), 276px);
}

.week-track-link {
  position: absolute;
  z-index: 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
  pointer-events: none;
}

.week-track-link.is-traversed {
  background: linear-gradient(90deg, #dcb954, #f3db95);
  box-shadow: 0 0 14px rgba(220, 185, 84, 0.32);
}

.week-orb {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
}

.week-orb-sphere {
  position: relative;
  display: grid;
  width: var(--orb-size);
  height: var(--orb-size);
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.week-orb-media {
  display: grid;
  width: calc(var(--orb-size) - 16px);
  height: calc(var(--orb-size) - 16px);
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  font-size: clamp(1.1rem, calc(var(--orb-size) * 0.3), 3rem);
  font-weight: 900;
}

.week-track-item.is-active .week-orb-sphere {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.week-track-item.is-test.is-active .week-orb-sphere {
  transform: none;
}

.week-track-item.is-complete .week-orb-sphere {
  border-color: #dcb954;
  box-shadow: 0 0 0 3px rgba(220, 185, 84, 0.3), 0 8px 20px rgba(0, 0, 0, 0.24);
}

.week-track-item.is-locked .week-orb {
  opacity: 0.54;
}

.week-track-item.is-test .week-orb-note {
  max-width: 220px;
}

.week-track-item.is-test .week-orb-label {
  font-size: 1rem;
}

.week-orb-label {
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

.week-track-item:not(.is-test) .week-orb-label {
  display: none;
}

.week-orb-note {
  min-height: 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.76rem;
  font-weight: 840;
  text-align: center;
}

.week-track-item:not(.is-test) .week-orb-note {
  min-height: 28px;
  font-size: 1.48rem;
  line-height: 1;
}

.bootcamp-screen.is-pillar-mode .week-track-item:not(.is-test) .week-orb-note {
  min-height: 22px;
  font-size: 1.26rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr) minmax(460px, 1.35fr);
  height: calc(100dvh - 169px);
  min-height: 0;
}

.admin-panel {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.admin-panel:last-child {
  border-right: 0;
}

.admin-control-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.admin-user-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.admin-user-tools input,
.admin-user-tools select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcfb;
  color: var(--ink);
  font-weight: 780;
}

.admin-user-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
}

.admin-user-row.is-selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.admin-user-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.admin-user-select strong,
.admin-user-select span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-select strong {
  font-size: 0.96rem;
}

.admin-user-select span {
  color: inherit;
  font-size: 0.78rem;
  opacity: 0.74;
}

.admin-user-select .admin-user-email {
  font-size: 0.72rem;
  opacity: 0.58;
}

.admin-user-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.admin-user-offer {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.admin-user-context-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
}

.admin-user-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.admin-user-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.admin-user-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.admin-user-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-user-fact {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfb;
}

.admin-user-fact span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 880;
  text-transform: uppercase;
}

.admin-user-fact strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-subhead {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.admin-selected-student {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.admin-selected-student > strong {
  font-size: 1.1rem;
}

.admin-selected-student p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.35;
}

.admin-product-list,
.admin-product-detail {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
}

.admin-product-card.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--button-text);
}

.admin-product-card > span:first-child,
.admin-product-side {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-product-card strong,
.admin-product-card span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-product-label {
  color: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  opacity: 0.68;
  text-transform: uppercase;
}

.admin-product-card > span:first-child > span:last-child {
  color: inherit;
  font-size: 0.84rem;
  opacity: 0.72;
  line-height: 1.3;
}

.admin-product-side {
  justify-items: end;
}

.admin-product-status {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-product-card.is-selected .admin-product-status {
  color: rgba(255, 255, 255, 0.8);
}

.admin-product-status.is-active {
  color: var(--green);
}

.admin-product-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-product-action {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-detail-intro,
.admin-static-detail,
.admin-library-row,
.admin-week-admin-row,
.admin-evolution-hero,
.admin-skill-row,
.admin-quest-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.admin-detail-intro {
  display: grid;
  gap: 5px;
}

.admin-detail-intro > strong {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-detail-intro p,
.admin-static-detail span,
.admin-library-row span span {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.admin-static-detail,
.admin-library-row,
.admin-skill-row,
.admin-quest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

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

.admin-evolution-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-detail-toolbar {
  display: flex;
  justify-content: flex-end;
}

.admin-evolution-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-evolution-form-title {
  grid-column: 1 / -1;
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-evolution-form-title.is-main {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
  color: var(--ink);
  font-size: 1rem;
}

.admin-evolution-field {
  display: grid;
  gap: 6px;
}

.admin-evolution-field span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 880;
  text-transform: uppercase;
}

.admin-evolution-field input,
.admin-evolution-field select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
}

.admin-evolution-skill-edit {
  display: grid;
  grid-template-columns: minmax(4.75rem, 1fr) 4.4rem 5.8rem;
  align-items: end;
  gap: 6px;
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfb;
}

.admin-evolution-skill-edit > strong {
  align-self: center;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-evolution-skill-edit .admin-evolution-field {
  min-width: 0;
  gap: 4px;
}

.admin-evolution-skill-edit .admin-evolution-field span {
  overflow: hidden;
  font-size: 0.62rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-evolution-skill-edit .admin-evolution-field input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;
  text-align: center;
}

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

.admin-skill-list,
.admin-quest-list,
.admin-reward-history {
  display: grid;
  gap: 8px;
}

.admin-reward-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.admin-reward-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.admin-reward-section-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-reward-section-body {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px;
  background: #f6f8f7;
}

.admin-reward-admin-row.is-revoked {
  border-color: rgba(239, 82, 109, 0.38);
  background: rgba(239, 82, 109, 0.07);
}

.admin-reward-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
}

.admin-reward-row.is-inactive {
  opacity: 0.62;
}

.admin-reward-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-reward-row span small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.admin-reward-row > strong {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-quest-form {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
}

.admin-quest-form .admin-evolution-actions {
  grid-column: 1 / -1;
}

.admin-skill-row span,
.admin-quest-row span span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
}

.admin-quest-row.is-complete {
  border-color: rgba(0, 168, 120, 0.4);
  background: rgba(0, 168, 120, 0.08);
}

.admin-library-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-week-admin-row {
  display: grid;
  gap: 12px;
}

.admin-week-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-week-title {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-week-title > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-week-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-week-status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.admin-week-status-pill.is-ready {
  border-color: rgba(0, 168, 120, 0.28);
  background: rgba(0, 168, 120, 0.08);
  color: #087a5d;
}

.admin-week-access {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-week-admin-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.admin-upload-button,
.admin-week-admin-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-upload-button.is-uploaded {
  border-color: rgba(0, 168, 120, 0.4);
  background: rgba(0, 168, 120, 0.1);
  color: #087a5d;
}

.admin-replay-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  border: 1px solid rgba(0, 168, 120, 0.24);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 168, 120, 0.06);
}

.admin-replay-panel > strong,
.admin-replay-panel > p,
.admin-replay-actions {
  grid-column: 1 / -1;
}

.admin-replay-panel > strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.admin-replay-panel > p {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.admin-replay-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-replay-field span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 880;
  text-transform: uppercase;
}

.admin-replay-field input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 780;
}

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

.admin-replay-actions button {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.admin-control {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

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

.admin-control-head input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.admin-control strong {
  font-size: 1rem;
}

.admin-control p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.admin-week-control {
  gap: 12px;
}

.admin-week-rows {
  display: grid;
  gap: 8px;
}

.admin-week-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.admin-week-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-week-static {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
}

.admin-control select,
.admin-control input[type="checkbox"] {
  accent-color: var(--green);
}

.admin-control select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 1180px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: minmax(620px, 1fr) auto;
    height: auto;
    min-height: 100vh;
  }

  .exercise-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 82px auto minmax(560px, 70vh) auto;
  }

  .exercise-shell.is-right-handed,
  .exercise-shell.is-left-handed {
    grid-template-columns: minmax(0, 1fr);
  }

  .exercise-shell .training-floor {
    grid-column: 1;
    grid-row: 3;
  }

  .exercise-shell.is-right-handed .training-floor,
  .exercise-shell.is-left-handed .training-floor {
    grid-column: 1;
  }

  .exercise-shell .score-panel {
    grid-column: 1;
    grid-row: 4;
  }

  .exercise-shell.is-right-handed .score-panel,
  .exercise-shell.is-left-handed .score-panel {
    grid-column: 1;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-left: 0;
  }

  .score-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .score-readout,
  .wave-panel,
  .metrics,
  .calibration-panel,
  .stats-grid,
  .round-action,
  .history {
    border-bottom: 0;
  }

  .history {
    border-left: 1px solid var(--line);
  }

  .training-catalog-header,
  .evolution-header,
  .quests-header {
    grid-template-columns: 1fr;
  }

  .bootcamp-header {
    grid-template-columns: 1fr;
  }

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

  .training-library {
    grid-template-columns: 1fr;
  }

  .evolution-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .quests-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootcamp-layout {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  }

  .admin-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .admin-panel {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-week-admin-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .week-detail-panel {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .avatar-stage {
    grid-column: 1 / -1;
    min-height: 420px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #avatarCanvas {
    min-height: 420px;
  }
}

@media (min-width: 820px) and (max-width: 1180px) {
  .exercise-shell {
    height: calc(100vh - 58px);
    grid-template-rows: 82px auto minmax(0, 1fr);
    min-height: 620px;
  }

  .exercise-shell.is-right-handed {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .exercise-shell.is-left-handed {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .exercise-shell.is-right-handed .training-floor {
    grid-column: 2;
    grid-row: 3;
  }

  .exercise-shell.is-left-handed .training-floor {
    grid-column: 1;
    grid-row: 3;
  }

  .exercise-shell.is-right-handed .score-panel,
  .exercise-shell.is-left-handed .score-panel {
    display: flex;
    grid-row: 3;
    border-top: 0;
  }

  .exercise-shell.is-right-handed .score-panel {
    grid-column: 1;
    border-right: 1px solid var(--line);
    border-left: 0;
  }

  .exercise-shell.is-left-handed .score-panel {
    grid-column: 2;
    border-right: 0;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .trophy-modal,
  .trophy-unlock-modal {
    padding: 12px;
  }

  .trophy-modal-panel {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .trophy-modal-head {
    padding: 14px 14px 0;
  }

  .reward-tabs {
    padding: 0 14px;
  }

  .trophy-list {
    padding: 4px 14px 14px;
  }

  .trophy-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .badge-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .reward-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .reward-row > strong {
    grid-column: 2;
    justify-self: start;
  }

  .reward-popup-layer {
    top: 78px;
  }

  .reward-popup {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .reward-popup-icon {
    width: 42px;
  }

  .reward-popup em {
    grid-column: 2;
    justify-self: start;
  }

  .trophy-row em {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .badge-equip-button {
    grid-column: 2;
    justify-self: stretch;
  }

  .admin-replay-panel,
  .admin-replay-actions {
    grid-template-columns: 1fr;
  }

  body {
    overflow-x: hidden;
  }

  .view-switch {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100vw;
    max-width: 100vw;
    gap: 4px;
    padding: 8px;
    overflow: hidden;
  }

  .view-tab {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .account-menu-button {
    min-width: 44px;
    padding: 0 8px;
  }

  .account-menu-button strong {
    display: none;
  }

  .account-menu-panel {
    position: fixed;
    top: 64px;
    right: 8px;
    left: 8px;
    width: auto;
  }

  .sync-status {
    min-width: 44px;
    padding: 0 10px;
  }

  .sync-status strong {
    display: none;
  }

  .session-switch {
    display: none;
  }

  .app-shell {
    display: block;
    height: auto;
  }

  .exercise-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(520px, 72vh) auto;
    min-height: calc(100vh - 58px);
  }

  .exercise-shell.is-right-handed,
  .exercise-shell.is-left-handed {
    grid-template-columns: minmax(0, 1fr);
  }

  .exercise-header {
    display: grid;
    gap: 10px;
    padding: 12px 16px;
  }

  .exercise-titlebar {
    gap: 10px;
  }

  .exercise-titlebar .secondary-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .exercise-titlebar h1 {
    flex-wrap: wrap;
    font-size: 1rem;
  }

  .exercise-live {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .hand-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .exercise-shell.is-wave-mode .hand-toggle {
    grid-column: auto;
    width: auto;
  }

  .exercise-live p {
    grid-column: 1 / -1;
    max-width: 100%;
    font-size: 0.86rem;
    text-align: left;
  }

  .exercise-shell .training-floor {
    height: auto;
    min-height: 0;
    grid-row: 3;
  }

  .exercise-shell .score-panel {
    grid-row: 4;
  }

  .coach-panel,
  .score-panel {
    display: block;
    border: 0;
  }

  .training-floor {
    height: 68vh;
    min-height: 480px;
    grid-template-rows: minmax(0, 1fr);
  }

  .canvas-topbar {
    display: grid;
    gap: 6px;
    padding: 14px 18px;
  }

  .canvas-topbar p {
    text-align: left;
  }

  .score-readout {
    grid-template-columns: 94px 1fr;
  }

  .score-ring {
    width: 94px;
    height: 94px;
  }

  .score-ring::before {
    width: 66px;
    height: 66px;
  }

  .wave-transition {
    top: 14px;
    min-width: 190px;
    padding: 11px 14px;
    font-size: 0.92rem;
  }

  .wave-grid-challenge {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-calibration-hud {
    top: 10px;
    left: 10px;
    right: 10px;
    min-height: 36px;
    padding: 6px 8px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history {
    border-left: 0;
  }

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

  .training-catalog-screen,
  .evolution-screen,
  .quests-screen {
    height: auto;
    min-height: calc(100vh - 58px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .bootcamp-screen {
    height: auto;
    min-height: calc(100vh - 58px);
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .admin-screen {
    height: auto;
    min-height: calc(100vh - 58px);
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .training-catalog-header,
  .evolution-header,
  .quests-header,
  .bootcamp-header,
  .admin-header,
  .training-library,
  .attribute-board,
  .vision-panel,
  .quests-layout,
  .quest-panel,
  .pillar-list-panel,
  .pillar-timeline-panel,
  .week-detail-panel {
    width: 100vw;
    max-width: 100vw;
    padding: 20px;
  }

  .training-catalog-header,
  .evolution-header,
  .quests-header {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .bootcamp-header {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .admin-header {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .training-catalog-intro,
  .evolution-intro {
    max-width: 100%;
    white-space: normal;
  }

  .bootcamp-intro {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }

  .training-catalog-summary,
  .quests-summary,
  .bootcamp-summary {
    grid-template-columns: 1fr;
  }

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

  .profile-summary {
    grid-template-columns: minmax(0, 1fr) 84px;
    width: 100%;
  }

  .profile-rank {
    width: 100%;
    height: 84px;
  }

  .profile-level {
    width: 84px;
    height: 84px;
  }

  .profile-rank strong {
    font-size: 1.05rem;
  }

  .profile-level strong {
    font-size: 1.9rem;
  }

  .xp-readout {
    grid-column: 1 / -1;
  }

  .evolution-layout {
    display: block;
    width: 100%;
  }

  .quests-layout {
    display: block;
    width: 100vw;
    max-width: 100vw;
  }

  .bootcamp-layout {
    display: block;
    width: 100vw;
    max-width: 100vw;
  }

  .admin-layout {
    display: block;
    width: 100vw;
    max-width: 100vw;
  }

  .admin-product-card,
  .admin-static-detail,
  .admin-library-row,
  .admin-skill-row,
  .admin-quest-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-product-side {
    justify-items: start;
  }

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

  .admin-evolution-hero,
  .admin-user-actions,
  .admin-evolution-form,
  .admin-quest-form {
    grid-template-columns: 1fr;
  }

  .admin-evolution-skill-edit {
    grid-template-columns: 1fr;
  }

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

  .training-library {
    display: grid;
    gap: 14px;
  }

  .training-card {
    min-height: 0;
    grid-template-rows: 140px 1fr;
  }

  .training-card-stats {
    grid-template-columns: 1fr;
  }

  .avatar-stage,
  .attribute-board,
  .vision-panel,
  .quest-panel,
  .pillar-list-panel,
  .pillar-timeline-panel,
  .admin-panel {
    width: 100vw;
    max-width: 100vw;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .avatar-stage {
    min-height: 420px;
  }

  #avatarCanvas {
    min-height: 380px;
  }

  .avatar-readout {
    position: static;
    justify-content: flex-start;
    padding: 16px 20px;
    background: var(--surface);
  }

  .view-switch {
    overflow-x: auto;
    max-width: 100%;
  }

  .pillar-card,
  .week-step,
  .file-chip {
    overflow: hidden;
  }

  .pillar-card p,
  .week-meta p,
  .file-chip strong {
    max-width: calc(100vw - 72px);
    white-space: normal;
  }

  .week-step {
    grid-template-columns: 64px 1fr;
  }

  .week-score {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-height: 860px) {
  .bootcamp-screen.is-pillar-mode .pillar-hero {
    --pillar-overlay-top: 198px;
    --pillar-overlay-bottom: 168px;
    padding: 76px 24px 16px;
  }

  .bootcamp-screen.is-pillar-mode .pillar-hero-summary {
    gap: 10px;
  }

  .bootcamp-screen.is-pillar-mode .pillar-hero-summary h2 {
    font-size: clamp(2.5rem, 4.4vw, 4rem);
  }

  .bootcamp-screen.is-pillar-mode .pillar-hero-description {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .bootcamp-screen.is-pillar-mode .pillar-hero-player {
    width: min(304px, 100%);
    gap: 8px;
  }

  .bootcamp-screen.is-pillar-mode .pillar-hero-player-stat {
    padding: 8px 10px;
  }

  .bootcamp-screen.is-pillar-mode .pillar-timeline {
    --timeline-gap: 12px;
    --week-orb-size: 88px;
    padding-top: 0;
  }

  .bootcamp-screen.is-pillar-mode .week-track-item {
    width: var(--orb-size);
  }

  .bootcamp-screen.is-pillar-mode .week-track-item.is-test {
    width: max(var(--orb-size), 238px);
  }

  .bootcamp-screen.is-pillar-mode .week-track-item:not(.is-test) .week-orb-note {
    min-height: 18px;
    font-size: 1.1rem;
  }
}

@media (max-width: 1180px) {
  .evolution-shell {
    gap: 18px;
    padding: 18px;
  }

  .evolution-stage {
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  }

  .evolution-focus {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .evolution-hero.avatar-stage {
    border-right: 0;
  }

  .skills-layout {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
    gap: 22px;
  }

  .constellation-shell,
  .bootcamp-pillar-panel {
    padding: 20px;
  }

  .pillar-hero {
    --pillar-overlay-top: 212px;
    --pillar-overlay-bottom: 196px;
    min-height: clamp(600px, calc(100vh - 190px), 760px);
    padding: 88px 24px 24px;
  }

  .pillar-hero-summary {
    max-width: 340px;
  }

  .pillar-hero-player {
    width: min(232px, 100%);
    grid-template-columns: repeat(2, minmax(92px, 1fr));
  }

  .week-detail {
    left: 24px;
    width: min(332px, calc(100% - 48px));
    max-width: calc(100% - 48px);
  }

  .week-context-popout {
    width: min(248px, calc(100vw - 420px));
  }

  .pillar-timeline {
    --timeline-gap: 14px;
    --week-orb-size: 104px;
    right: 24px;
    bottom: 24px;
    left: 24px;
  }

  .constellation-hud {
    top: 20px;
    right: 20px;
  }

  .constellation-summary {
    top: 20px;
    left: 20px;
    max-width: min(340px, calc(100% - 300px));
  }

  .constellation-shell {
    padding-top: 156px;
  }
}

@media (max-width: 760px) {
  .evolution-shell {
    display: block;
    width: 100vw;
    max-width: 100vw;
    padding: 0;
  }

  .evolution-stage {
    display: block;
    width: 100vw;
    max-width: 100vw;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .profile-banner,
  .evolution-focus,
  .evolution-skills,
  .evolution-hero.avatar-stage {
    width: 100vw;
    max-width: 100vw;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .profile-banner,
  .evolution-focus,
  .evolution-skills {
    padding: 20px;
  }

  .evolution-hero.avatar-stage {
    min-height: 420px;
  }

  #evolutionView #avatarCanvas {
    min-height: 380px;
  }

  .evolution-avatar-readout {
    position: static;
    margin: 0 20px 20px;
  }

  .skills-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bootcamp-heading {
    gap: 8px;
  }

  .bootcamp-header.is-pillar-mode {
    padding: 16px 20px 0;
  }

  .constellation-shell,
  .bootcamp-pillar-panel {
    padding: 0;
  }

  .bootcamp-root-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .constellation-stage {
    --constellation-node-width: 92px;
    --constellation-orb-size: 60px;
    --constellation-core-size: 46px;
    width: 100vw;
  }

  .constellation-hud {
    top: 16px;
    right: 16px;
    left: 16px;
    gap: 8px;
  }

  .constellation-hud-stat {
    min-width: 120px;
  }

  .constellation-summary {
    top: 88px;
    left: 16px;
    max-width: calc(100% - 32px);
    gap: 10px;
  }

  .constellation-summary h1 {
    font-size: clamp(1.89rem, 8.1vw, 2.7rem);
  }

  .constellation-intro {
    max-width: 300px;
    font-size: 0.95rem;
  }

  .constellation-shell {
    padding-top: 208px;
  }

  .constellation-lock-card {
    bottom: 16px;
    width: calc(100% - 32px);
    padding: 16px;
  }

  .constellation-node-title {
    max-width: 92px;
    font-size: 0.72rem;
  }

  .constellation-core {
    font-size: 1.2rem;
  }

  .pillar-hero {
    --pillar-overlay-top: 208px;
    --pillar-overlay-bottom: 176px;
    min-height: clamp(620px, calc(100vh - 140px), 760px);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 84px 20px 20px;
  }

  .pillar-hero-stage {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
  }

  .pillar-hero-summary {
    max-width: none;
    gap: 12px;
  }

  .pillar-hero-player {
    justify-self: end;
    width: min(232px, 100%);
    grid-template-columns: repeat(2, minmax(86px, 1fr));
    gap: 8px;
  }

  .pillar-hero-player-stat {
    min-width: 86px;
    padding: 8px 10px;
  }

  .week-detail {
    left: 20px;
    width: min(300px, calc(100% - 40px));
    max-width: calc(100% - 40px);
  }

  .week-context-visual {
    justify-items: start;
  }

  .week-context-glyph {
    width: 72px;
    height: 72px;
    font-size: 1.8rem;
  }

  .week-context-popout {
    top: calc(100% + 10px);
    left: 0;
    width: min(300px, calc(100vw - 40px));
  }

  .pillar-timeline {
    --timeline-gap: 12px;
    --week-orb-size: 84px;
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .week-track-item {
    width: max(var(--orb-size), 92px);
  }

.week-track-item.is-test {
  width: max(var(--orb-size), 240px);
}
}

@media (max-width: 1180px) {
  .quests-stage-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quests-stage-stats {
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .quests-stage-layout {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 36px;
  }

  .quests-period-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(148px, 1fr);
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

@media (max-width: 760px) {
  .quests-stage-panel {
    min-height: calc(100vh - 58px);
    padding: 22px 18px 18px;
  }

  .quests-stage-panel::before {
    top: 160px;
    right: -28%;
    width: 84%;
    height: 48%;
  }

  .quests-stage-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .quests-stage-layout {
    margin-top: 28px;
  }

  .quests-stage-copy h1 {
    font-size: clamp(1.89rem, 8.1vw, 2.7rem);
  }

  .quests-stage-intro {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .quests-stage-stats {
    width: 100%;
  }

  .quests-stage-stats {
    justify-self: stretch;
    justify-content: stretch;
  }

  .quest-stage-stat {
    min-width: 0;
    flex: 1 1 0;
  }

  .quests-period-nav {
    grid-auto-columns: minmax(138px, 1fr);
    padding-bottom: 6px;
  }

  .quest-rail {
    gap: 14px;
  }

  .quest-mission-card {
    flex-basis: min(82vw, 300px);
    min-height: 320px;
    padding: 18px 16px 16px;
  }

  .quest-card-title {
    font-size: 1.08rem;
  }

  .quest-card-desc {
    font-size: 0.9rem;
  }

  .quest-card-footer {
    display: grid;
    gap: 10px;
  }

  .quest-card-action {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1240px) {
  .evolution-profile-stage {
    grid-template-columns: minmax(184px, 0.58fr) minmax(0, 1.12fr) minmax(320px, 0.92fr);
    padding: 20px;
    gap: 14px;
  }

  .evolution-profile-hero {
    min-height: 0;
  }

  #evolutionView #avatarCanvas {
    min-height: 0;
  }

  .evolution-profile-rank-card {
    max-width: 220px;
  }

  .evolution-profile-radar-wrap {
    width: min(100%, 330px);
  }
}

@media (max-width: 980px) {
  .evolution-profile-stage {
    grid-template-columns: minmax(174px, 0.56fr) minmax(0, 1fr) minmax(300px, 0.86fr);
    grid-template-areas: "identity hero skills";
    min-height: calc(100dvh - 58px);
    padding: 16px;
    gap: 12px;
  }

  .evolution-profile-identity,
  .evolution-profile-skills {
    padding-top: 0;
  }

  .evolution-profile-rank-card {
    max-width: 100%;
    gap: 10px;
    padding: 12px;
  }

  .evolution-rank-emblem {
    width: 86px;
  }

  .evolution-profile-rank-copy .profile-id h1 {
    font-size: clamp(1.65rem, 3vw, 2.1rem);
  }

  .evolution-profile-quickstats {
    grid-template-columns: 1fr 1fr;
  }

  .evolution-profile-meta {
    grid-template-columns: 1fr;
  }

  .evolution-profile-hero {
    min-height: 0;
  }

  #evolutionView #avatarCanvas {
    min-height: 0;
  }

  .evolution-profile-radar {
    justify-items: center;
  }

  .evolution-profile-radar-wrap {
    width: min(100%, 290px);
    padding: 12px;
  }

  .evolution-profile-attribute-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
