.ach-dashboard {
  --ach-ink: #403548;
  --ach-muted: #766c7c;
  --ach-pink: #d78eae;
  --ach-pink-deep: #b9678e;
  --ach-lilac: #a893c8;
  --ach-cream: #fffaf5;
  --ach-paper: rgba(255, 252, 249, 0.92);
  --ach-line: rgba(117, 87, 122, 0.18);
  --ach-shadow: 0 16px 40px rgba(84, 58, 91, 0.12);
  --ach-radius: 22px;
  color: var(--ach-ink);
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 18px 64px;
}

.ach-dashboard *,
.ach-dashboard *::before,
.ach-dashboard *::after { box-sizing: border-box; }

.ach-dashboard a { color: inherit; }

.ach-intro {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.ach-intro h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
}

.ach-intro p:last-child {
  margin: 0 auto;
  color: var(--ach-muted);
  line-height: 1.7;
}

.ach-kicker,
.ach-section-kicker {
  margin: 0;
  color: var(--ach-pink-deep);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ach-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--ach-line);
  border-radius: 16px;
  background: var(--ach-paper);
}

.ach-notice--error { border-color: rgba(174, 85, 103, .3); }
.ach-notice span { color: var(--ach-muted); }
.ach-notice a { margin-left: auto; font-weight: 800; }

.ach-hero-card,
.ach-section,
.ach-method-note {
  border: 1px solid var(--ach-line);
  border-radius: var(--ach-radius);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 185, 235, .22), transparent 31%),
    radial-gradient(circle at 0 100%, rgba(245, 181, 207, .18), transparent 28%),
    var(--ach-paper);
  box-shadow: var(--ach-shadow);
}

.ach-hero-card {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(320px, 1.2fr);
  gap: 22px 30px;
  padding: 24px;
  overflow: hidden;
}

.ach-character {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ach-character__image-wrap {
  flex: 0 0 108px;
  width: 108px;
  height: 132px;
  overflow: hidden;
  border: 1px solid rgba(117, 87, 122, .2);
  border-radius: 18px;
  background: linear-gradient(145deg, #fbe1ed, #ebe1fa);
}

.ach-character__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.ach-character__image--avatar { object-position: center; }

.ach-character__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
}

.ach-character__copy h2 { margin: 2px 0 4px; font-size: 1.55rem; }
.ach-character__copy p { margin: 0 0 8px; color: var(--ach-muted); }
.ach-character__title { color: var(--ach-pink-deep) !important; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ach-text-link { font-size: .86rem; font-weight: 800; text-decoration: none; }
.ach-text-link:hover { text-decoration: underline; }

.ach-main-stat {
  align-self: center;
  padding: 8px 0;
}

.ach-main-stat__eyebrow {
  display: block;
  color: var(--ach-muted);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ach-main-stat__value {
  display: block;
  margin: 2px 0 16px;
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.06em;
}

.ach-completion-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: .9rem;
}

.ach-progress {
  position: relative;
  height: 15px;
  overflow: hidden;
  border: 1px solid rgba(117, 87, 122, .16);
  border-radius: 999px;
  background: rgba(123, 104, 137, .11);
}

.ach-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ach-pink), var(--ach-lilac));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.ach-progress--small { height: 10px; }

.ach-progress-caption,
.ach-category-card__remaining {
  margin: 7px 0 0;
  color: var(--ach-muted);
  font-size: .8rem;
}

.ach-stat-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ach-mini-stat,
.ach-momentum-card {
  padding: 15px 16px;
  border: 1px solid var(--ach-line);
  border-radius: 16px;
  background: rgba(255,255,255,.55);
}

.ach-mini-stat span,
.ach-mini-stat small,
.ach-momentum-card span,
.ach-momentum-card small { display: block; color: var(--ach-muted); }
.ach-mini-stat strong { display: block; margin: 2px 0; font-size: 1.35rem; }
.ach-mini-stat span { font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.ach-mini-stat small { font-size: .78rem; }

.ach-section {
  margin-top: 20px;
  padding: 24px;
}

.ach-section--nested { margin-top: 0; }

.ach-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ach-section-heading h2 { margin: 3px 0 4px; font-size: clamp(1.35rem, 3vw, 2rem); }
.ach-section-heading p:last-child { margin: 0; color: var(--ach-muted); font-size: .9rem; line-height: 1.55; }
.ach-section-heading--row { align-items: center; }

.ach-pill {
  align-self: flex-start;
  padding: 7px 10px;
  border: 1px solid rgba(185, 103, 142, .2);
  border-radius: 999px;
  background: rgba(245, 210, 225, .52);
  color: var(--ach-pink-deep);
  font-size: .8rem;
  font-weight: 900;
  white-space: nowrap;
}

.ach-pill--good { background: rgba(220, 240, 218, .6); color: #577453; border-color: rgba(87,116,83,.18); }

.ach-milestone__layout {
  display: grid;
  grid-template-columns: minmax(200px, .65fr) minmax(300px, 1.35fr);
  gap: 20px;
}

.ach-milestone__summary {
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(247, 220, 233, .72), rgba(233, 224, 248, .72));
}

.ach-milestone__summary > strong { display: block; font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1; }
.ach-milestone__summary > span { display: block; margin-top: 5px; color: var(--ach-muted); }
.ach-milestone__summary p { margin: 18px 0 0; font-size: .88rem; line-height: 1.55; }

.ach-milestone__list { display: grid; gap: 8px; }

.ach-plan-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--ach-line);
  border-radius: 14px;
  background: rgba(255,255,255,.54);
  text-decoration: none;
}

.ach-plan-row:hover { transform: translateY(-1px); border-color: rgba(185,103,142,.32); }
.ach-plan-row span { min-width: 0; }
.ach-plan-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.ach-plan-row small { color: var(--ach-muted); }
.ach-plan-row > strong { color: var(--ach-pink-deep); white-space: nowrap; }

.ach-target-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ach-target-tab {
  appearance: none;
  padding: 9px 15px;
  border: 1px solid var(--ach-line);
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  color: var(--ach-ink);
  font: inherit;
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
}

.ach-target-tab:hover,
.ach-target-tab.is-active {
  border-color: rgba(185,103,142,.32);
  background: linear-gradient(135deg, rgba(245,207,225,.82), rgba(227,216,246,.82));
  color: var(--ach-pink-deep);
}

.ach-target-panel { display: none; }
.ach-target-panel.is-active { display: block; }

.ach-target-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ach-target-panel__head strong,
.ach-target-panel__head span { display: block; }
.ach-target-panel__head span { color: var(--ach-muted); font-size: .82rem; }

.ach-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ach-suggestion-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ach-suggestion {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 15px;
  border: 1px solid var(--ach-line);
  border-radius: 16px;
  background: rgba(255,255,255,.6);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ach-suggestion:hover {
  transform: translateY(-2px);
  border-color: rgba(185,103,142,.32);
  box-shadow: 0 9px 24px rgba(84,58,91,.08);
}

.ach-suggestion__top,
.ach-suggestion__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ach-type-tag {
  color: var(--ach-pink-deep);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ach-suggestion__top > strong { color: var(--ach-pink-deep); font-size: .82rem; }
.ach-suggestion h3 { margin: 10px 0 6px; font-size: 1rem; line-height: 1.2; }
.ach-suggestion p { margin: 0 0 14px; color: var(--ach-muted); font-size: .79rem; line-height: 1.45; }
.ach-suggestion__meta { margin-top: auto; color: var(--ach-muted); font-size: .7rem; }
.ach-reward-label { margin-top: auto; padding-top: 10px; color: var(--ach-pink-deep); font-size: .8rem; }
.ach-suggestion--reward .ach-suggestion__meta { margin-top: 8px; }

.ach-momentum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ach-momentum-card strong { display: block; margin: 3px 0; font-size: 1.6rem; }

.ach-history-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--ach-line);
  border-radius: 18px;
  background: rgba(255,255,255,.5);
}

.ach-history-card__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ach-history-card__head span { color: var(--ach-muted); font-size: .78rem; }

.ach-history-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  align-items: end;
}

.ach-history-bar { min-width: 0; text-align: center; }
.ach-history-bar__track { position: relative; height: 120px; overflow: hidden; border-radius: 10px; background: rgba(123,104,137,.08); }
.ach-history-bar__track span { position: absolute; inset: auto 0 0; min-height: 2px; border-radius: 10px; background: linear-gradient(180deg, var(--ach-lilac), var(--ach-pink)); }
.ach-history-bar strong { display: block; margin-top: 5px; font-size: .72rem; }
.ach-history-bar small { display: block; color: var(--ach-muted); font-size: .68rem; white-space: nowrap; }

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

.ach-category-card {
  padding: 18px;
  border: 1px solid var(--ach-line);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
}

.ach-category-card__title { display: flex; gap: 11px; }
.ach-category-card__icon { font-size: 1.45rem; }
.ach-category-card h3 { margin: 0 0 3px; font-size: 1.05rem; }
.ach-category-card__title p { margin: 0; color: var(--ach-muted); font-size: .77rem; line-height: 1.4; }

.ach-category-card__numbers {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0 7px;
}

.ach-category-card__numbers strong { font-size: 1.35rem; }
.ach-category-card__numbers span { color: var(--ach-muted); font-size: .8rem; }

.ach-category-next {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--ach-line);
}

.ach-category-next > span { color: var(--ach-muted); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.ach-category-next a { display: flex; justify-content: space-between; gap: 9px; text-decoration: none; font-size: .78rem; }
.ach-category-next a:hover b { text-decoration: underline; }
.ach-category-next em { color: var(--ach-pink-deep); font-style: normal; font-weight: 800; white-space: nowrap; }

.ach-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.ach-stack { display: grid; gap: 9px; }

.ach-stack-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--ach-line);
  border-radius: 14px;
  background: rgba(255,255,255,.54);
  text-decoration: none;
}

.ach-stack-card:hover { border-color: rgba(185,103,142,.32); }
.ach-stack-card span { color: var(--ach-pink-deep); font-size: .67rem; font-weight: 900; text-transform: uppercase; }
.ach-stack-card h3 { margin: 2px 0 4px; font-size: .9rem; }
.ach-stack-card p { margin: 0; color: var(--ach-muted); font-size: .74rem; line-height: 1.4; }
.ach-stack-card aside { text-align: right; white-space: nowrap; }
.ach-stack-card aside strong { display: block; color: var(--ach-pink-deep); font-size: .8rem; }
.ach-stack-card aside small { color: var(--ach-muted); font-size: .68rem; }

.ach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid rgba(185,103,142,.24);
  border-radius: 999px;
  background: rgba(245,210,225,.5);
  color: var(--ach-pink-deep) !important;
  font-size: .8rem;
  font-weight: 900;
  text-decoration: none;
}

.ach-recent-list { display: grid; gap: 7px; }

.ach-recent-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: rgba(255,255,255,.48);
  text-decoration: none;
}

.ach-recent-row:hover { border-color: var(--ach-line); background: rgba(255,255,255,.74); }
.ach-recent-row__spark { color: var(--ach-pink-deep); }
.ach-recent-row__copy small { display: block; color: var(--ach-muted); font-size: .69rem; }
.ach-recent-row__copy strong { display: block; margin-top: 1px; font-size: .9rem; }
.ach-recent-row__meta { text-align: right; }
.ach-recent-row__meta b { display: block; color: var(--ach-pink-deep); font-size: .76rem; }
.ach-recent-row__meta time { display: block; color: var(--ach-muted); font-size: .7rem; }

.ach-method-note {
  margin-top: 20px;
  padding: 18px 20px;
}

.ach-method-note strong { color: var(--ach-pink-deep); }
.ach-method-note p { margin: 5px 0; color: var(--ach-muted); font-size: .8rem; line-height: 1.45; }
.ach-method-note small { display: block; margin-top: 9px; color: var(--ach-muted); font-size: .7rem; }
.ach-empty { color: var(--ach-muted); font-size: .86rem; }

@media (max-width: 920px) {
  .ach-hero-card { grid-template-columns: 1fr; }
  .ach-stat-grid { grid-column: auto; }
  .ach-suggestion-grid,
  .ach-suggestion-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ach-two-column { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .ach-dashboard { padding-inline: 10px; }
  .ach-hero-card,
  .ach-section { padding: 17px; border-radius: 18px; }
  .ach-character { align-items: flex-start; }
  .ach-character__image-wrap { flex-basis: 86px; width: 86px; height: 105px; }
  .ach-stat-grid,
  .ach-momentum-grid,
  .ach-category-grid { grid-template-columns: 1fr; }
  .ach-milestone__layout { grid-template-columns: 1fr; }
  .ach-section-heading,
  .ach-section-heading--row,
  .ach-target-panel__head { display: block; }
  .ach-section-heading .ach-pill,
  .ach-target-panel__head .ach-pill { display: inline-block; margin-top: 9px; }
  .ach-suggestion-grid,
  .ach-suggestion-grid--compact { grid-template-columns: 1fr; }
  .ach-suggestion { min-height: 0; }
  .ach-history-bars { gap: 4px; overflow-x: auto; }
  .ach-history-bar { min-width: 47px; }
  .ach-recent-row { grid-template-columns: auto minmax(0, 1fr); }
  .ach-recent-row__meta { grid-column: 2; display: flex; gap: 8px; text-align: left; }
  .ach-recent-row__meta b,
  .ach-recent-row__meta time { display: inline; }
}
