.ach-page {
  padding: 1.5rem 0 3rem;
}

.ach-page h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
}

.ach-lead {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.ach-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
}

.ach-crumbs a {
  color: var(--accent);
}

.ach-cat {
  margin: 0 0 1.5rem;
}

.ach-cat__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.55rem;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.ach-cat__bar:hover {
  border-color: rgba(77, 107, 254, 0.45);
  background: rgba(77, 107, 254, 0.12);
}

.ach-cat__name {
  color: #c8cddc;
}

.ach-cat__item.is-unlocked a {
  color: #8ea2ff;
}

.ach-cat__item.is-unlocked .ach-cat__lvl {
  color: #8dffb0;
  font-weight: 700;
}

.ach-cat__chevron::before {
  content: '▶';
  font-size: 0.95rem;
  opacity: 0.95;
  display: inline-block;
}

.ach-cat.is-open .ach-cat__chevron::before {
  content: '▼';
}

.ach-cat__grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 1.25rem;
  padding: 0.15rem 0 0.85rem;
}

.ach-cat.is-open .ach-cat__grid {
  display: grid;
}

.ach-cat__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.35rem 0;
}

.ach-cat__item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-1px);
}

.ach-cat__item a {
  color: var(--accent);
  font-weight: 600;
}

.ach-cat__item a:hover {
  color: var(--accent-hover);
}

.ach-cat__lvl {
  color: #6f7588;
  font-size: 0.85rem;
  white-space: nowrap;
}

.ach-meta {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.ach-meta b {
  color: var(--text);
  font-weight: 600;
}

.ach-rules {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
}

.ach-rules h3,
.ach-level__name {
  margin: 0 0 0.45rem;
}

.ach-rules pre {
  margin: 0;
  overflow: auto;
  color: #c8cde0;
  font-size: 0.82rem;
}

.ach-level {
  margin: 0 0 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.ach-level.is-locked {
  opacity: 0.62;
}

.ach-level__bar {
  background: #2a3340;
  color: #d7dbe6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
}

.ach-level.is-done .ach-level__bar {
  background: #215273;
  color: #fff;
}

.ach-level__body {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  padding: 0.9rem 1rem 1rem;
  align-items: start;
}

.ach-level__text h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.ach-level__sub {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.ach-level__desc {
  margin: 0;
  color: #c5c9d6;
}

.ach-progress {
  height: 6px;
  background: #2a2a32;
  border-radius: 99px;
  margin: 0.55rem 0 0.2rem;
  overflow: hidden;
}

.ach-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

.ach-hex {
  width: 72px;
  height: 80px;
  display: grid;
  place-items: center;
  position: relative;
  margin: 0 auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.ach-hex__shape {
  width: 72px;
  height: 80px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.ach-hex__lvl {
  position: absolute;
  right: 2px;
  bottom: 8px;
  min-width: 1.15rem;
  height: 1.15rem;
  border-radius: 99px;
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.ach-hex.is-locked .ach-hex__shape {
  filter: grayscale(1) brightness(0.45);
}

.ach-honeycomb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.45rem;
  align-items: flex-start;
}

.ach-honeycomb a,
.ach-honeycomb button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.ach-honeycomb__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  max-width: 72px;
  text-decoration: none;
}

.ach-honeycomb__item.has-cap {
  max-width: 72px;
}

.ach-honeycomb__cap {
  width: 100%;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ach-honeycomb .ach-hex {
  width: 58px;
  height: 64px;
}

.ach-honeycomb .ach-hex__shape {
  width: 58px;
  height: 64px;
  font-size: 1.25rem;
}

.ach-honeycomb .ach-hex__lvl {
  bottom: 6px;
}

.ach-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin: 0 0 1.25rem;
}

.profile-card .ach-profile {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.85rem 0 0;
  margin: 0.85rem 0 0;
  border-top: 1px solid var(--border);
}

.profile-card .ach-profile__head {
  margin-bottom: 0.55rem;
}

.profile-card .ach-honeycomb {
  margin: 0;
}

.profile-card .ach-empty {
  padding-bottom: 0;
}

.ach-profile__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ach-profile__head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.ach-profile__head a {
  color: var(--accent);
  font-size: 0.9rem;
}

.ach-empty {
  color: var(--muted);
  margin: 0;
  padding: 0.35rem 0 0.15rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.ach-empty-wrap {
  display: grid;
  gap: 0.65rem;
  justify-items: start;
}

.ach-empty__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  background: rgba(77, 107, 254, 0.18);
  border: 1px solid rgba(77, 107, 254, 0.4);
  color: #8ea2ff;
  font-weight: 600;
  text-decoration: none;
}

.ach-empty--hint {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .ach-cat__grid {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .ach-cat__item {
    min-height: 44px;
  }
}

.ach-tip {
  position: relative;
}

.ach-tip[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: #111218;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 800px) {
  .ach-cat__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .ach-cat__grid,
  .ach-level__body {
    grid-template-columns: 1fr;
  }
}
