* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #f8f7f1;
  --card: #fffefa;
  --primary: #f5c228;
  --dark: #263d30;
  --muted: #74806e;
  --green: #678d60;
  --red: #b74537;
}
body {
  font-family: "Nunito", sans-serif;
  background: var(--bg);
  color: var(--dark);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font-family: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #a5791b;
  outline-offset: 4px;
}
.app {
  max-width: 480px;
  margin: auto;
  min-height: 100svh;
}
.app > header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--bg);
}
.back-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e1e5d9;
  border-radius: 50%;
  background: var(--card);
  color: inherit;
  flex-shrink: 0;
}
.page-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex: 1;
}
.count-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 20px;
  background: #e9eee2;
  color: #4d6747;
  white-space: nowrap;
}
main {
  padding: 0 20px 110px;
}
.overview {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 126px;
  align-items: center;
  padding: 26px 22px 20px;
  border: 1px solid #e9dfbc;
  border-radius: 26px;
  background: radial-gradient(ellipse at 90% 20%, #ffe48780, transparent 65%), #fff8df;
}
.ov-info {
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 900;
  color: #907221;
  margin-bottom: 10px;
}
.ov-info h2 {
  font-family: "Bricolage Grotesque", "Nunito", sans-serif;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1px;
}
.ov-info p {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #7b795e;
  max-width: 210px;
}
.ov-trophy {
  grid-column: 2;
  grid-row: 1;
  width: 150px;
  margin-left: -12px;
  filter: drop-shadow(0 12px 12px #a7781526);
  animation: trophy-arrive 650ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}
.ov-trophy img {
  width: 100%;
  display: block;
}
.ov-meter {
  grid-column: 1/-1;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #e8ddbb;
}
.ov-meter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #77765d;
  margin-bottom: 10px;
}
.ov-meter-row strong {
  color: #3b5037;
  font-size: 17px;
  font-weight: 900;
}
.ov-track,
.badge-track,
.next-track {
  height: 6px;
  background: #e7e9df;
  border-radius: 8px;
  overflow: hidden;
}
.ov-track {
  background: #e9dfbd;
}
.ov-fill,
.badge-fill,
.next-fill {
  height: 100%;
  border-radius: 8px;
  background: #799467;
  transition: width 450ms ease;
}
.ov-fill {
  background: #bc9228;
}
.reward-ready {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  margin-top: 14px;
  border: 1px solid #d7e4cd;
  border-radius: 18px;
  background: #eaf1e3;
  text-align: left;
}
.reward-ready[hidden],
.next-achievement[hidden] {
  display: none;
}
.reward-ready > svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #557644;
}
.reward-ready span {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  color: #65775a;
}
.reward-ready strong {
  display: block;
  font-size: 14px;
  color: #304a2b;
}
.next-achievement {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 13px;
  align-items: center;
  width: 100%;
  text-align: left;
  margin: 16px 0 24px;
  padding: 17px;
  border: 1px solid #e2e5d9;
  border-radius: 20px;
  background: var(--card);
}
.next-icon {
  width: 50px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f4ecd8;
  color: #a27e2b;
}
.next-icon svg {
  width: 26px;
  height: 26px;
}
.next-kicker {
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 900;
  color: #7b856f;
}
.next-name {
  font-size: 16px;
  font-weight: 900;
  margin: 3px 0;
}
.next-desc {
  font-size: 11px;
  color: #74806e;
  line-height: 1.5;
}
.next-progress-row,
.b-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #75816c;
  margin: 12px 0 6px;
}
.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 22px -2px 15px;
  scrollbar-width: thin;
}
.ftab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid #e1e5d8;
  border-radius: 30px;
  background: transparent;
  padding: 10px 13px;
  min-height: 42px;
  font-size: 12px;
  font-weight: 800;
}
.ftab svg {
  width: 15px;
  height: 15px;
}
.ftab.active {
  background: #2a4434;
  color: #fff;
  border-color: #2a4434;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 900;
  margin: 24px 0 12px;
}
.section-title svg {
  width: 17px;
  height: 17px;
  color: #7d8d70;
}
.section-title small {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: #7a846f;
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 26px;
}
.badge-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #e3e6da;
  border-radius: 22px;
  padding: 16px 12px 14px;
  background: var(--card);
  transition:
    transform 180ms,
    box-shadow 180ms;
}
.badge-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px #273e300b;
}
.badge-card.earned {
  border-color: #e7d49c;
  background: linear-gradient(#fff9e7, var(--card) 60%);
}
.badge-card.claimable {
  border-color: #a9c096;
  background: linear-gradient(#f0f6e9, var(--card) 60%);
}
.badge-status {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.25px;
  color: #7e8774;
  min-height: 19px;
  margin-bottom: 12px;
}
.earned .badge-status {
  color: #9a7623;
}
.claimable .badge-status {
  color: #46703a;
  background: #e4efd9;
  border-radius: 20px;
  padding: 3px 10px;
  margin-top: -3px;
  margin-bottom: 9px;
}
.b-icon,
.modal-icon {
  --badge-face: #eaf0e1;
  --badge-ink: #607951;
  display: grid;
  place-items: center;
  width: 70px;
  height: 76px;
  color: var(--badge-ink);
  background: linear-gradient(145deg, #ffffffa3, transparent 65%), var(--badge-face);
  border: 3px solid #fff9;
  outline: 1px solid color-mix(in srgb, var(--badge-ink) 22%, transparent);
  border-radius: 24px 24px 30px 30px;
  box-shadow:
    inset 0 -5px 0 #00000006,
    0 5px 9px #273e3008;
}
.b-icon svg {
  width: 32px;
  height: 32px;
}
.gold {
  --badge-face: #ffe69d;
  --badge-ink: #a47a1f;
}
.silver,
.blue {
  --badge-face: #e4edf5;
  --badge-ink: #657f9b;
}
.bronze,
.orange {
  --badge-face: #ffe4c2;
  --badge-ink: #b67a35;
}
.purple {
  --badge-face: #eae2f4;
  --badge-ink: #89709f;
}
.red {
  --badge-face: #fae0d7;
  --badge-ink: #b97057;
}
.green {
  --badge-face: #e5eed8;
  --badge-ink: #6f8951;
}
.locked .b-icon {
  --badge-face: #eef0e7;
  --badge-ink: #929b84;
  box-shadow: inset 0 -4px 0 #00000003;
}
.b-copy {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.b-name {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  margin: 15px 0 5px;
  min-height: 38px;
  display: grid;
  place-items: center;
}
.b-desc {
  font-size: 11px;
  line-height: 1.45;
  color: #7a8370;
  min-height: 33px;
}
.b-progress-row {
  margin-top: auto;
  padding-top: 14px;
}
.badge-fill {
  background: #b6c1a5;
}
.earned .badge-fill {
  background: #c6a653;
}
.claimable .badge-fill {
  background: #7d9f60;
}
.b-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 900;
  min-height: 30px;
  padding-top: 11px;
  color: #8c783e;
}
.b-reward svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.claimable .b-reward {
  color: #446b37;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: var(--card);
  z-index: 50;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #e1e5d9;
  padding: 8px 8px max(12px, env(safe-area-inset-bottom));
}
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 52px;
  padding: 8px 3px;
  border-radius: 14px;
  text-decoration: none;
  color: #75816c;
  font-size: 10px;
  font-weight: 800;
}
.nav-tab.active {
  background: #f6d34e;
  color: #263d30;
}
.nav-icon,
.nav-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}
#badgeModal {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 430px);
  max-width: 100vw;
  max-height: 90svh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  color: var(--dark);
  background: var(--bg);
  box-shadow: 0 20px 80px #10251b33;
}
#badgeModal::backdrop {
  background: #182d2375;
  backdrop-filter: blur(3px);
}
#badgeModal[open] {
  animation: sheet-arrive 180ms ease-out;
}
.modal {
  text-align: center;
  position: relative;
  padding: 32px 26px max(26px, env(safe-area-inset-bottom));
}
.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid #e1e5d9;
  display: grid;
  place-items: center;
}
.detail-close svg {
  width: 18px;
  height: 18px;
}
.modal-icon {
  width: 94px;
  height: 102px;
  margin: 7px auto 24px;
  border-radius: 30px 30px 38px 38px;
}
.modal-icon svg {
  width: 44px;
  height: 44px;
}
.modal-name {
  font-family: "Bricolage Grotesque", "Nunito", sans-serif;
  font-size: 29px;
  letter-spacing: -0.7px;
  font-weight: 800;
  margin: 10px 0;
}
.modal-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #76826d;
  margin: 0 auto 24px;
  max-width: 300px;
}
.detail-progress {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #e1e5d9;
  border-radius: 16px;
  background: var(--card);
}
.detail-progress .b-progress-row {
  padding: 0;
  margin: 0 0 9px;
}
.detail-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #637d53;
}
.modal-reward {
  color: #7b6735;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 14px;
}
.modal-reward > svg {
  vertical-align: middle;
}
.claim-btn,
.modal-close {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 15px;
  padding: 12px;
  font-size: 14px;
  font-weight: 900;
}
.claim-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #2a4434;
  color: white;
}
.claim-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.modal-close {
  background: #e9eee1;
  color: #526b46;
}
.claim-error {
  margin: 10px 0;
  color: #a74034;
  font-size: 12px;
  font-weight: 700;
}
@keyframes trophy-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) rotate(-7deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sheet-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 720px) {
  #badgeModal {
    inset: 0;
    margin: auto;
    border-radius: 28px;
  }
  .overview {
    grid-template-columns: 1fr 180px;
    padding: 30px;
  }
  .ov-trophy {
    width: 175px;
  }
  .ov-info h2 {
    font-size: 38px;
  }
  .ov-info p {
    max-width: none;
  }
  body[data-ek-page="achievements"] .badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  body[data-ek-page="achievements"] .badge-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 350px) {
  main {
    padding-inline: 14px;
  }
  .app > header {
    padding-inline: 14px;
    gap: 9px;
  }
  .page-title {
    font-size: 18px;
  }
  .count-pill {
    padding: 6px 8px;
  }
  .overview {
    grid-template-columns: 1fr 97px;
    padding: 23px 17px 18px;
  }
  .ov-info h2 {
    font-size: 26px;
  }
  .ov-trophy {
    width: 128px;
    margin-left: -18px;
  }
  .badge-card {
    padding-inline: 9px;
  }
  .b-name {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
