/* ==========================================================================
   Activity Arcade — hub and shared chrome
   Palette and type follow The Language Page design system: warm paper, Oxford
   navy, deep teal, domain colours, Fraunces display + Atkinson Hyperlegible.
   ========================================================================== */

:root {
  --paper: #f8f4ea;
  --surface: #ffffff;
  --subtle: #f0e9da;
  --hover: #e6dcc6;
  --ink: #101c2c;
  --ink-2: #3f4c5e;
  --ink-3: #4f5b6c;
  --navy: #14294a;
  --navy-700: #0b1b34;
  --teal: #0b6a62;
  --teal-soft: #e6f4f1;
  --gold: #7d5410;
  --gold-soft: #fdf4e3;
  --coral: #c2562f;

  --listening: #075568;
  --reading: #2e4a94;
  --speaking: #8a3a5c;
  --writing: #9a4a26;

  --line: #e6e0d6;
  --line-2: #d5cdc0;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(24, 34, 48, 0.06), 0 2px 8px rgba(24, 34, 48, 0.05);
  --shadow-md: 0 2px 4px rgba(24, 34, 48, 0.05), 0 18px 34px -14px rgba(24, 34, 48, 0.24);
  --shadow-lg: 0 6px 12px rgba(24, 34, 48, 0.06), 0 32px 70px -24px rgba(24, 34, 48, 0.38);

  --font: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.25, 1);
  --skill: var(--reading);
  --skill-soft: #eceef8;
}

html[data-text="1"] {
  font-size: 17.5px;
}
html[data-text="2"] {
  font-size: 19px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(900px 480px at 12% -8%, rgba(15, 118, 110, 0.07), transparent 60%),
    radial-gradient(760px 420px at 92% 2%, rgba(194, 86, 47, 0.06), transparent 62%),
    linear-gradient(180deg, #fbfaf7, var(--paper) 420px);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid #1d63ed;
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: #cdeae4;
}

.wrap {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus {
  top: 0;
}

/* ------------------------------------------------------------------ header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(130%);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 3px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.brand-mark i {
  border-radius: 2.5px;
  background: var(--navy);
}
.brand-mark i:nth-child(2) {
  background: var(--teal);
}
.brand-mark i:nth-child(3) {
  background: var(--coral);
}
.brand-mark i:nth-child(4) {
  background: #e2b14a;
}
.brand-mark.small {
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  gap: 2px;
  padding: 4px;
  border-radius: 7px;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}
.brand-copy strong {
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.brand-copy span {
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 12px;
}
.head-nav a,
.head-nav .link-btn {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}
.head-nav a:hover,
.head-nav .link-btn:hover {
  color: var(--navy);
}
.head-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--teal);
  transition: right 0.22s var(--ease);
}
.head-nav a:hover::after {
  right: 0;
}

.head-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-size: 0.88rem;
}
.link-btn:hover {
  color: var(--teal);
}

.seg-lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
}
.seg-lang button {
  border: 0;
  background: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.seg-lang button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s;
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover {
  background: var(--subtle);
  border-color: #c4bbac;
}
.icon-btn:active {
  transform: translateY(1px);
}

.i-sound {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--icon-sound, none) center / contain no-repeat;
  mask: var(--icon-sound, none) center / contain no-repeat;
}

/* -------------------------------------------------------------------- hero */

main {
  display: block;
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 64px;
  align-items: center;
  padding: 66px 0 46px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.hero h1 {
  margin: 14px 0 18px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 4.6vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--navy);
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--teal);
}

.lede {
  max-width: 46ch;
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
}
.hero-skills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-skills i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--skill);
}

/* ----------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--navy);
  --btn-ink: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease),
    box-shadow 0.16s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 18px -10px rgba(30, 58, 95, 0.7);
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--navy-700);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-quiet {
  --btn-bg: #fff;
  --btn-ink: var(--navy);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}
.btn-quiet:hover {
  background: var(--subtle);
  border-color: #c8bfb0;
}

.btn-gold {
  --btn-bg: #f2e4c9;
  --btn-ink: #5c3a10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold:hover {
  background: #f8edd8;
}

.btn-lg {
  min-height: 56px;
  padding: 9px 22px;
  font-size: 1rem;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.btn-lg .btn-note {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.78;
}

.btn-card {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.84rem;
  border-radius: 10px;
}

/* ------------------------------------------------------------ player card */

.player-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.player-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.13), transparent 68%);
  pointer-events: none;
}

.pc-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.level-ring {
  --pct: 0;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 3px rgba(24, 34, 48, 0.06);
  position: relative;
}
.level-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.level-ring circle {
  fill: none;
  stroke-width: 7;
}
.level-ring .ring-bg {
  stroke: #e9e4da;
}
.level-ring .ring-fg {
  stroke: var(--teal);
  stroke-linecap: round;
  transition: stroke-dasharray 0.9s var(--ease);
}
.level-ring span,
.level-ring small {
  position: relative;
  z-index: 1;
  display: block;
}
.level-ring span {
  font-family: var(--display);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 600;
  color: var(--navy);
}
.level-ring small {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-weight: 700;
  margin-top: 2px;
}

.pc-rank {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}
.pc-xp {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.xp-track {
  height: 8px;
  border-radius: 99px;
  background: #eee9e0;
  margin-top: 18px;
  overflow: hidden;
}
.xp-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #2f9c8d);
  transition: width 0.8s var(--ease);
}
.xp-note {
  margin-top: 7px;
  font-size: 0.72rem;
  color: var(--ink-3);
}

.pc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pc-stats div {
  display: grid;
  gap: 1px;
}
.pc-stats strong {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.pc-stats strong small {
  font-size: 0.7rem;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 1px;
}
.pc-stats span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  font-weight: 700;
}

.pc-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}
.pc-link:hover {
  text-decoration: underline;
}

/* ----------------------------------------------------------------- mission */

.mission {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.4fr) auto;
  align-items: center;
  gap: 28px;
  padding: 26px 30px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 200px at 8% 0%, rgba(255, 255, 255, 0.1), transparent 70%),
    radial-gradient(400px 220px at 100% 100%, rgba(15, 118, 110, 0.5), transparent 70%),
    var(--navy);
  color: #eef2f7;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.mission .kicker {
  color: #e2b14a;
}
.mission .kicker i {
  box-shadow: 0 0 0 4px rgba(226, 177, 74, 0.18);
}
.mission h2 {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 8px;
  color: #fff;
  max-width: 22ch;
}

.mission-head {
  position: relative;
  padding-right: 74px;
}

.mission-ring {
  --done: 0;
  position: absolute;
  right: 0;
  top: 2px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: conic-gradient(
    #7fd7c6 0 calc(var(--done) / 3 * 100%),
    rgba(255, 255, 255, 0.16) calc(var(--done) / 3 * 100%) 100%
  );
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.05);
}
.mission-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--navy);
}
.mission-ring span {
  position: relative;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.mission-ring small {
  font-size: 0.65rem;
  opacity: 0.7;
}

.mission-tasks {
  display: grid;
  gap: 8px;
}
.task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  transition: background 0.2s var(--ease);
}
.task .tick {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: transparent;
}
.task.is-done {
  background: rgba(15, 118, 110, 0.34);
  border-color: rgba(127, 215, 198, 0.4);
}
.task.is-done .tick {
  background: #7fd7c6;
  border-color: #7fd7c6;
  color: #10312f;
}
.task.is-done strong {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  opacity: 0.85;
}

/* --------------------------------------------------------------- catalogue */

.catalogue {
  padding: 58px 0 26px;
}

.cat-head {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 40px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.cat-copy h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--navy);
}
.cat-copy p {
  margin-top: 7px;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 52ch;
}

.cat-tools {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.seg-band {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line-2);
  padding: 3px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.seg-band button {
  border: 0;
  background: none;
  padding: 8px 16px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.seg-band button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s, color 0.18s;
}
.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--skill);
}
.chip:hover {
  border-color: #c4bbac;
  background: var(--subtle);
}
.chip[aria-pressed="true"] {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}

.cat-count {
  font-size: 0.76rem;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.grid.is-swapping {
  animation: grid-in 0.36s var(--ease);
}
@keyframes grid-in {
  from {
    opacity: 0.35;
    transform: translateY(8px);
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease),
    border-color 0.24s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d9d1c3;
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--subtle);
}
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card-art img {
  transform: scale(1.04);
}
.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 34, 48, 0) 55%, rgba(24, 34, 48, 0.22));
  pointer-events: none;
}

.skill-tag {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 3px rgba(24, 34, 48, 0.18);
}
.skill-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--skill);
}

.new-pill {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f2e4c9;
  color: #5c3a10;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}
.card-body h3 {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.card-body h3 a {
  color: var(--navy);
  text-decoration: none;
}
.card-body h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--teal);
}
.card-tag {
  margin-top: 7px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
  flex: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 14px;
  font-size: 0.73rem;
  color: var(--ink-3);
  font-weight: 700;
}
.card-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-meta li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c9c0b2;
}
.card-meta .muted {
  color: var(--ink-3);
  font-weight: 400;
  opacity: 0.75;
}

.stars {
  display: inline-flex;
  gap: 1px;
  color: #c8bda9;
  font-style: normal;
  letter-spacing: 0.02em;
}
.stars i {
  font-style: normal;
  opacity: 0.45;
}
.stars i.on {
  color: var(--gold);
  opacity: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.card-skill {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ink-3);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- journey */

.journey-panel {
  margin: 56px 0 70px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.journey-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.journey-head h2 {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.journey-head p {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0 26px;
}
.j-stat {
  background: var(--subtle);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 3px;
}
.j-stat span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--ink-3);
}
.j-stat strong {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.j-stat strong small {
  font-size: 0.8rem;
  color: var(--ink-3);
  font-weight: 400;
}
.j-stat small {
  font-size: 0.72rem;
  color: var(--ink-3);
}

.badge-shelf h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}
.badge {
  display: grid;
  gap: 2px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px dashed var(--line-2);
  background: #fcfbf8;
  opacity: 0.62;
}
.badge.is-owned {
  border-style: solid;
  border-color: #bfe0d8;
  background: linear-gradient(180deg, #f3faf7, #fff);
  opacity: 1;
}
.badge-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--subtle);
  color: var(--ink-3);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.badge.is-owned .badge-icon {
  background: var(--teal-soft);
  color: var(--teal);
}
.badge strong {
  font-size: 0.84rem;
  color: var(--navy);
}
.badge small {
  font-size: 0.71rem;
  color: var(--ink-3);
  line-height: 1.35;
}

.next-step {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f2f7f5, #fbfaf6);
  border: 1px solid #d9e6e2;
}
.ns-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}
.next-step div {
  flex: 1;
}
.next-step strong {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}
.next-step p {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-top: 2px;
}

/* ------------------------------------------------------------------ modals */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s var(--ease);
}
body.has-modal {
  overflow: hidden;
}

.modal {
  width: min(540px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  animation: pop-in 0.28s var(--ease);
}
.modal-kicker {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--teal);
}
.modal h2 {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--navy);
  margin: 7px 0 12px;
}
.modal-sub {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.modal-actions .btn-primary {
  flex: 1;
  min-width: 130px;
}
.modal-foot {
  margin-top: 16px;
  font-size: 0.76rem;
  color: var(--ink-3);
  font-style: italic;
}
.modal-settings {
  display: grid;
  gap: 8px;
  margin: 18px 0 4px;
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fcfbf8;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.setting:hover {
  background: var(--subtle);
}
.switch {
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: #d9d2c6;
  position: relative;
  transition: background 0.2s var(--ease);
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 34, 48, 0.3);
  transition: transform 0.2s var(--ease);
}
.setting[aria-pressed="true"] .switch {
  background: var(--teal);
}
.setting[aria-pressed="true"] .switch::after {
  transform: translateX(18px);
}

/* ------------------------------------------------------------------ toasts */

.toast-stack {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 140;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  box-shadow: var(--shadow-md);
  animation: toast-in 0.34s var(--ease);
}
.toast-badge {
  border-left-color: #e2b14a;
}
.toast-level {
  border-left-color: var(--navy);
}
.toast.is-leaving {
  animation: toast-out 0.24s var(--ease) forwards;
}
.toast-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}
.toast-copy {
  display: grid;
  gap: 1px;
  flex: 1;
}
.toast-copy strong {
  font-size: 0.88rem;
  color: var(--navy);
}
.toast-copy small {
  font-size: 0.76rem;
  color: var(--ink-3);
  line-height: 1.35;
}
.toast-close {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

/* ------------------------------------------------------------------ footer */

.site-foot {
  border-top: 1px solid var(--line);
  background: #f6f3ed;
  padding: 30px 0 36px;
}
.foot-inner {
  display: grid;
  gap: 8px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--navy);
}
.foot-brand strong {
  color: var(--navy);
}
.foot-note {
  max-width: 78ch;
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.foot-build {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  opacity: 0.8;
  font-family: var(--mono);
}

/* --------------------------------------------------------------- utilities */

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--ink-3);
}

.is-shaking {
  animation: shake 0.42s var(--ease);
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px) rotate(-0.4deg);
  }
  40% {
    transform: translateX(6px) rotate(0.3deg);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

.game-loading,
.game-error {
  min-height: 54vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  color: var(--ink-2);
}
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #e4ded3;
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 44px;
  }
  .player-card {
    max-width: 460px;
  }
  .mission {
    grid-template-columns: 1fr auto;
  }
  .mission-head {
    grid-column: 1 / -1;
  }
  .mission .btn-gold {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .wrap {
    width: min(100% - 32px, 1200px);
  }
  .head-nav {
    display: none;
  }
  .cat-tools {
    justify-items: start;
    width: 100%;
  }
  .cat-head {
    align-items: flex-start;
  }
  .journey-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .next-step {
    flex-wrap: wrap;
  }
  .next-step .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 34px 0 30px;
  }
  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 2.9rem);
  }
  .lede {
    font-size: 1rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .mission {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 18px;
  }
  .mission-tasks {
    gap: 6px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .journey-panel {
    padding: 22px;
    margin: 36px 0 44px;
  }
  .journey-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filters {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .seg-band {
    width: 100%;
  }
  .seg-band button {
    flex: 1;
  }
  .brand-copy span {
    display: none;
  }
  .toast-stack {
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
