:root {
  --bg: #fff8fb;
  --surface: rgba(255, 255, 255, 0.82);
  --ink: #17202a;
  --text: #3e4854;
  --muted: #788391;
  --line: rgba(23, 32, 42, 0.1);
  --pink: #ff4f8b;
  --coral: #ff8a5b;
  --danger: #c93636;
  --shadow: 0 18px 54px rgba(35, 42, 58, 0.1);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 79, 139, 0.14), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(97, 183, 255, 0.15), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, #f8fbff 54%, #fffaf5 100%);
  font-family: "Nunito Sans", "Plus Jakarta Sans", "Avenir Next", "Segoe UI", "Helvetica Neue", ui-rounded, ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(var(--max), calc(100% - 28px));
  min-height: 62px;
  margin: 14px auto 0;
  padding: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 58px rgba(35, 42, 58, 0.1);
  backdrop-filter: blur(18px);
}

.header-account-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-avatar {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.header-avatar span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 79, 139, 0.94), rgba(255, 138, 91, 0.9)),
    var(--pink);
  background-position: center top;
  background-size: cover;
  box-shadow: 0 10px 22px rgba(255, 79, 139, 0.22);
  font-size: 16px;
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--coral));
  box-shadow: 0 10px 22px rgba(255, 79, 139, 0.26);
}

.mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--text);
  font-size: 14px;
}

.nav a:hover {
  color: var(--pink);
}

.header-action,
.primary,
.small-link,
.progress-action,
.stack button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  font-weight: 650;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.header-action,
.small-link,
.progress-action {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  font-size: 14px;
}

.progress-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-action {
  min-width: 116px;
}

.progress-action-secondary {
  color: var(--ink);
  background: rgba(23, 32, 42, 0.07);
}

.header-action:hover,
.primary:hover,
.small-link:hover,
.progress-action:hover,
.stack button[type="submit"]:hover {
  transform: translateY(-1px);
}

.account-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.account-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.account-section {
  width: min(760px, 100%);
  margin: 0 auto;
}

.profile-section {
  display: grid;
  gap: 16px;
}

.account-tabs {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 38px rgba(35, 42, 58, 0.08);
  backdrop-filter: blur(16px);
}

.account-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 750;
}

.account-tabs button.is-active {
  color: #fff;
  background: var(--ink);
}

.account-intro {
  padding: 10px 0 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 460px;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.06;
  font-weight: 560;
}

h2 {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 560;
}

.account-intro > p:not(.eyebrow),
.muted {
  color: var(--text);
}

.account-intro > p:not(.eyebrow) {
  max-width: 440px;
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.58;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.tabs button,
.text-button {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight: 650;
}

.tabs button.is-active {
  color: #fff;
  background: var(--ink);
}

.stack {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.stack label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 500;
}

input::placeholder {
  color: rgba(62, 72, 84, 0.58);
}

input:focus,
select:focus {
  outline: 3px solid rgba(255, 79, 139, 0.16);
  border-color: rgba(255, 79, 139, 0.42);
}

.check {
  grid-template-columns: 18px 1fr;
  align-items: start;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}

.check input {
  min-height: 18px;
  margin: 2px 0 0;
  border-radius: 5px;
}

.check a {
  color: var(--pink);
  font-weight: 700;
}

.primary,
.stack button[type="submit"] {
  min-height: 46px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--coral));
  box-shadow: 0 12px 24px rgba(255, 79, 139, 0.2);
}

.text-button {
  min-height: 40px;
  color: var(--text);
}

.account-summary {
  padding: 20px 20px 2px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.account-summary h1 {
  max-width: 100%;
  font-size: 24px;
}

.account-summary .muted {
  margin: 8px 0 0;
  font-size: 14px;
  word-break: break-word;
}

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

.account-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 79, 139, 0.9), rgba(255, 138, 91, 0.88)),
    var(--pink);
  background-position: center top;
  background-size: cover;
  box-shadow: 0 12px 26px rgba(255, 79, 139, 0.2);
  font-size: 20px;
  font-weight: 750;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.avatar-upload,
.secondary-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.avatar-upload {
  position: relative;
  padding: 0 15px;
  border: 1px solid rgba(255, 79, 139, 0.24);
  color: var(--pink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.avatar-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.avatar-upload:has(input:disabled) {
  cursor: default;
  opacity: 0.62;
}

.secondary-action {
  padding: 0 17px;
  border: 0;
  color: #fff;
  background: var(--ink);
}

.card-heading {
  padding: 16px 18px 0;
}

.inline-heading {
  padding: 0;
}

.danger-zone {
  background: rgba(201, 54, 54, 0.035);
}

.danger {
  color: #fff !important;
  background: var(--danger) !important;
  box-shadow: 0 12px 24px rgba(201, 54, 54, 0.16) !important;
}

.panel-heading {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.progress-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.progress-item {
  min-height: 92px;
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.progress-cover {
  width: 78px;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 79, 139, 0.18), rgba(255, 138, 91, 0.16)),
    #fff;
  background-size: cover;
  background-position: center top;
}

.progress-cover-link,
.progress-creator-link {
  color: inherit;
  text-decoration: none;
}

.progress-cover-link {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.progress-cover-link:hover,
.progress-cover-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(23, 32, 42, 0.12);
}

.progress-copy {
  min-width: 0;
}

.progress-copy strong,
.progress-copy span,
.progress-creator-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-copy strong {
  font-weight: 650;
}

.progress-creator-link {
  width: max-content;
  max-width: 100%;
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-creator-link:hover,
.progress-creator-link:focus-visible {
  color: var(--ink);
  outline: none;
}

.progress-creator-name,
.progress-meta {
  color: var(--text);
  font-size: 13px;
}

.empty-progress {
  margin: 0;
  padding: 10px 2px;
  color: var(--text);
}

.status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--pink);
  font-weight: 650;
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    border-radius: 28px;
  }

  .nav {
    display: none;
  }

  .account-shell {
    width: min(100% - 24px, 560px);
    padding-top: 28px;
  }

  .account-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 22px;
  }

  .account-summary {
    grid-template-columns: 1fr;
  }

  .progress-item {
    grid-template-columns: 70px 1fr;
  }

  .progress-cover {
    width: 70px;
  }

  .progress-action {
    grid-column: 1 / -1;
  }

  .progress-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .progress-action {
    width: 100%;
    min-width: 0;
    grid-column: auto;
  }
}
