/* tongwu.network — "career as a game" edition.
   Palette and type carried over from the 2026-09 site; sticker/pixel layer added. */
:root {
  --paper: #f4f2eb;
  --paper-2: #ebe8dd;
  --ink: #272721;
  --muted: #66665d;
  --line: #d7d5cc;
  --accent: #c74326;
  --orange: #e65b39;
  --claude: #d97757;
  --dark: #272a24;
  --gold: #e8b93a;
  --green: #3f8a5b;
  --blue: #2f6fb0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --r: 16px;
  --shadow: 4px 4px 0 var(--ink);
  --hud-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip-link:focus {
  left: 8px;
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Sticker primitive: the core "game UI" look ── */
.sticker {
  background: #fffdf7;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font: 600 0.98rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.2s;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 var(--orange);
}
.btn-outline {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.btn:hover {
  transform: translate(-2px, -2px);
}
.btn-primary:hover {
  box-shadow: 6px 6px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  text-transform: inherit;
  letter-spacing: inherit;
}

/* ── Clawd (the guide) ── */
.c-body {
  fill: var(--claude);
}
.c-eyes rect {
  fill: #1d1d1b;
}
.c-eyes {
  transform-origin: 13px 8px;
  animation: blink 4.2s infinite;
}
@keyframes blink {
  0%,
  94%,
  100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.1);
  }
}
.bob {
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.wave .c-arm-r {
  animation: wave 0.5s ease-in-out 3;
  transform-origin: 22px 9px;
}
@keyframes wave {
  50% {
    transform: translateY(-4px);
  }
}

/* ── Boot dialog ── */
.boot {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(560px, 100% - 28px);
  width: 100%;
  overflow: visible;
}
.boot::backdrop {
  background: rgb(39 39 33 / 0.55);
  backdrop-filter: blur(3px);
}
.boot[open] .boot-card {
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes pop {
  from {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }
}
.boot-card {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 30px 30px 24px;
  text-align: center;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 14px 14px;
}
.boot-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.pill {
  font: 500 0.7rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}
.pill-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--line);
}
.boot-clawd {
  width: 104px;
  height: 88px;
  margin: 10px auto 6px;
  display: block;
}
.boot-hello {
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: none;
}
.boot-title {
  font: 700 clamp(1.45rem, 4.6vw, 1.9rem) / 1.15 var(--sans);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.boot-title em {
  font-size: 1em;
}
.boot-copy {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 22px;
}
.boot-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.boot-hint {
  margin-top: 16px;
  color: var(--muted);
  text-transform: none;
}
kbd {
  font: 500 0.72rem var(--mono);
  border: 1.5px solid var(--ink);
  border-bottom-width: 3px;
  border-radius: 5px;
  padding: 1px 6px;
  background: #fff;
}

/* ── HUD ── */
.hud {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 max(20px, (100% - 1180px) / 2);
  background: rgb(244 242 235 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.wordmark {
  font: 700 1.2rem/1 var(--sans);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.dot {
  color: var(--orange);
}
.hud-xp {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 360px;
}
.hud-lv {
  background: var(--ink);
  color: var(--paper);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.xp-track {
  flex: 1;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.xp-fill {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 6px,
    var(--claude) 6px 12px
  );
  transition: width 0.15s linear;
}
.hud-trophy {
  white-space: nowrap;
  color: var(--accent);
  font-weight: 500;
}
.hud-trophy.bump {
  animation: bump 0.5s ease;
}
@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}
.hud-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 0.92rem;
}
.hud-nav a {
  text-decoration: none;
  font-weight: 500;
}
.hud-nav a:not(.hud-cta):hover {
  color: var(--accent);
}
.hud-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 999px;
}
html:not(.js) .hud-xp {
  visibility: hidden;
}

/* ── Section scaffolding ── */
section {
  padding: 96px 0;
  position: relative;
}
.sec-head {
  max-width: 720px;
  margin-bottom: 44px;
}
.sec-kicker {
  display: inline-block;
  color: #a8381d;
  margin-bottom: 14px;
  padding: 5px 10px;
  border: 1.5px dashed var(--accent);
  border-radius: 8px;
}
h2 {
  font: 700 clamp(2rem, 5vw, 3.3rem) / 1.04 var(--sans);
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
h2 em {
  font-size: 1.08em;
}
.sec-sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 60ch;
}

/* ── Player ── */
.player {
  padding-top: 72px;
  padding-bottom: 72px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
}
.player-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  color: var(--muted);
  margin-bottom: 20px;
}
.blink {
  color: var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
.hero-title {
  font: 700 clamp(2.5rem, 6.4vw, 4.9rem) / 0.98 var(--sans);
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}
.hero-title em {
  font-size: 1.06em;
  letter-spacing: -0.02em;
}
.lede {
  font-size: 1.18rem;
  color: #45453d;
  max-width: 52ch;
  margin-bottom: 30px;
}
.hero-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 28px;
  font-size: 0.82rem;
  text-transform: none;
}
.hero-links a {
  display: inline-block;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: #fffdf7;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-links a:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sheet {
  padding: 22px;
  transform: rotate(1.2deg);
  transition: transform 0.3s ease;
}
.sheet:hover {
  transform: rotate(0deg) translateY(-3px);
}
.sheet-head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 2px dashed var(--line);
}
.sheet-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.sheet-label {
  color: var(--muted);
  font-size: 0.68rem;
  margin-bottom: 6px;
}
.sheet-name {
  font: 700 1.5rem/1.1 var(--sans);
  letter-spacing: -0.02em;
}
.sheet-class {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
}
.sheet-now {
  color: var(--muted);
  font-size: 0.66rem;
  margin-top: 4px;
  text-transform: none;
}
.sheet-block {
  padding: 16px 0 4px;
}
.langs li {
  display: grid;
  grid-template-columns: 7.5em 1fr 4.2em;
  gap: 12px;
  align-items: center;
  padding: 5px 0;
  font-weight: 600;
}
.bar {
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: var(--v);
  background: var(--green);
  border-radius: 999px;
}
.js .bar span {
  width: 0;
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}
.js .ready .bar span {
  width: var(--v);
}
.lang-lv {
  text-align: right;
  color: var(--ink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 0.86rem;
  font-weight: 500;
  padding: 5px 11px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}
.sheet-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px dashed var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

/* ── World map ── */
.map {
  background: var(--paper-2);
  border-block: 2px solid var(--ink);
}
.levels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  counter-reset: lvl;
}
.levels::before {
  /* the path between level nodes */
  content: "";
  position: absolute;
  top: 26px;
  left: 10%;
  right: 10%;
  border-top: 3px dashed var(--ink);
  opacity: 0.35;
}
.level {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.level-node {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--paper);
  display: grid;
  place-items: center;
  font: 700 1.3rem var(--mono);
  margin-bottom: 18px;
  transition:
    background 0.4s,
    color 0.4s,
    transform 0.4s;
}
.level.unlocked .level-node,
html:not(.js) .level-node {
  background: var(--orange);
  color: #fff;
}
.level.unlocked .level-node {
  animation: unlock 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes unlock {
  40% {
    transform: scale(1.25) rotate(-8deg);
  }
}
.level-now .level-node::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  animation: ring 1.8s ease-out infinite;
}
@keyframes ring {
  from {
    transform: scale(0.85);
    opacity: 1;
  }
  to {
    transform: scale(1.3);
    opacity: 0;
  }
}
.level-card {
  width: 100%;
  flex: 1;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.level-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
}
.js .level:not(.unlocked) .level-card {
  filter: grayscale(1);
  opacity: 0.55;
}
.js .level .level-card {
  transition:
    filter 0.6s,
    opacity 0.6s,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.level-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  gap: 8px;
}
.level-logo {
  height: 40px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
}
.level-logo-adecco {
  height: 34px;
  max-width: 70px;
}
.logo-uf {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.logo-uf img {
  display: block;
  height: 12px;
  width: auto;
}
.q-logo.logo-uf img {
  height: 11px;
}
.level-logo-wide {
  max-width: 100px;
  height: 28px;
}
.level-years {
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
}
.level-live {
  color: var(--green);
  font-weight: 500;
}
.level-world {
  color: var(--accent);
  font-size: 0.68rem;
}
.level-card h3 {
  font: 700 1.12rem/1.2 var(--sans);
  letter-spacing: -0.01em;
}
.level-card p:not(.mono):not(.loot) {
  color: var(--muted);
  font-size: 0.92rem;
}
.loot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 2px dashed var(--line);
  font-weight: 600;
  font-size: 0.9rem;
}
.loot span {
  font: 500 0.62rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gold);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  padding: 2px 6px;
  margin-right: 6px;
  vertical-align: 2px;
}

/* ── Inventory ── */
.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.item {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.item:hover {
  transform: translate(-3px, -3px) rotate(-0.4deg);
  box-shadow: 7px 7px 0 var(--ink);
}
.item-legendary {
  /* hero card: screenshot left, text right */
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-auto-rows: min-content;
  column-gap: 24px;
  align-content: start;
  background: linear-gradient(160deg, #fff7df, #fffdf7 55%);
}
.item-legendary > * {
  grid-column: 2;
}
.item-legendary .item-shot {
  grid-column: 1;
  grid-row: 1 / span 6;
  aspect-ratio: auto;
  height: 100%;
  min-height: 220px;
}
.item-legendary:hover {
  box-shadow: 7px 7px 0 var(--gold);
}
.rarity {
  font-size: 0.66rem;
  color: var(--muted);
}
.item-legendary .rarity {
  color: #7a5a06;
}
.item-epic .rarity {
  color: #7b47b8;
}
.item-rare .rarity {
  color: var(--blue);
}
.item h3 {
  font: 700 1.3rem/1.15 var(--sans);
  letter-spacing: -0.02em;
}
.item-legendary h3 {
  font-size: 1.7rem;
}
.item-one {
  color: #4a4a42;
}
.item-shot {
  border: 2px solid var(--ink);
  border-radius: 10px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  width: 100%;
}
.item-art {
  border: 2px solid var(--ink);
  border-radius: 10px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font: 700 3rem/1 var(--sans);
  letter-spacing: -0.04em;
}
.art-gateway {
  background: var(--dark);
  color: var(--paper);
}
.art-gateway i {
  font-style: normal;
  color: var(--orange);
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge {
  50% {
    transform: translateX(8px);
  }
}
.art-hours {
  background: var(--orange);
  color: #fff;
  flex-direction: column;
  gap: 2px;
}
.art-hours small {
  font: 500 0.75rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
details {
  border-top: 2px dashed var(--line);
  padding-top: 10px;
}
summary {
  cursor: pointer;
  font: 500 0.74rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: "▸ ";
}
details[open] summary::before {
  content: "▾ ";
}
details p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}
.item-meta {
  margin-top: auto;
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
}
.item-meta a {
  color: var(--ink);
  font-weight: 500;
}
.stars {
  background: var(--gold);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ── Quest log ── */
.quests {
  background: var(--paper-2);
  border-block: 2px solid var(--ink);
}
.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 34px;
  max-width: 860px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  border-left: 3px dotted var(--ink);
  opacity: 0.4;
}
.quest {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s ease;
}
.quest:hover {
  transform: translateX(6px);
}
.quest::before {
  /* checkpoint dot on the rail */
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
}
.q-group {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 14px;
}
.timeline + .q-group {
  margin-top: 36px;
}
.timeline-jobs .quest:first-child::before {
  background: var(--orange);
}
.q-logo {
  justify-self: start;
  max-height: 34px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
}
.q-logo-sq {
  height: 36px;
}
.q-mono {
  display: grid;
  place-items: center;
  width: 44px;
  height: 36px;
  border-radius: 8px;
  background: var(--c);
  color: #fff;
  font: 700 0.9rem/1 var(--sans);
  border: 2px solid var(--ink);
}
.q-org {
  font-weight: 700;
  font-size: 1.05rem;
}
.q-role {
  color: var(--muted);
  font-size: 0.95rem;
}
.q-date {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
  white-space: nowrap;
}
.q-live {
  display: inline-block;
  background: #357a4f;
  color: #fff;
  border-radius: 5px;
  padding: 2px 6px;
  margin-right: 8px;
  font-size: 0.62rem;
}
.quests-cta {
  margin-top: 32px;
}

/* ── Skill tree ── */
.edu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 36px;
}
.edu-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edu-years {
  color: var(--accent);
  font-size: 0.7rem;
}
.edu-card h3 {
  font: 700 1.45rem/1.15 var(--sans);
  letter-spacing: -0.02em;
}
.edu-school {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
}
.edu-card p:not(.mono):not(.edu-school) {
  color: var(--muted);
}
.edu-links {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  text-transform: none;
  font-size: 0.8rem;
}
.edu-links a {
  font-weight: 500;
}
.tree {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.branch-name {
  margin-bottom: 12px;
  color: var(--muted);
}
.branch .chips li {
  background: #fffdf7;
}

/* ── Achievements ── */
.achievements {
  background: var(--paper-2);
  border-block: 2px solid var(--ink);
}
.badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.badge {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 14px 18px;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.badge:hover {
  transform: translateY(-5px) rotate(-1.5deg);
  box-shadow: 5px 9px 0 var(--ink);
}
.badge-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--paper);
  font: 700 1.3rem var(--mono);
  box-shadow: inset 0 -5px 0 rgb(0 0 0 / 0.08);
}
.badge-gold .badge-icon {
  background: var(--gold);
}
.badge-name {
  font-weight: 700;
  line-height: 1.25;
}
.badge-by {
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: none;
}
.badge:hover .badge-icon {
  animation: spin 0.6s ease;
}
@keyframes spin {
  to {
    transform: rotateY(360deg);
  }
}

/* ── Side quests ── */
.side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.side-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.side-item {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  text-align: center;
  font-weight: 600;
}
.side-item:nth-child(2) {
  transform: translateY(18px) rotate(2deg);
}
.side-item:nth-child(3) {
  transform: rotate(-2deg);
}
.side-glyph {
  font: 400 3rem/1 "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  color: var(--accent);
  white-space: nowrap;
}

/* ── Save point ── */
.save {
  padding-top: 40px;
}
.save-card {
  background: var(--dark);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: 8px 8px 0 var(--orange);
  padding: clamp(36px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.save-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(244 242 235 / 0.1) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.save-kicker {
  color: var(--gold);
  margin-bottom: 18px;
}
.save-card h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  max-width: 20ch;
  margin-inline: auto;
}
.save-card h2 em {
  color: var(--orange);
}
.save-sub {
  color: #c9c7bd;
  max-width: 48ch;
  margin: 0 auto 30px;
  font-size: 1.1rem;
}
.save-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── Credits ── */
.credits {
  padding: 36px 0 44px;
}
.credits-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}
.credits-roll {
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: 640px;
  color: var(--muted);
  font-size: 0.95rem;
}
.credits-roll b {
  color: var(--ink);
}
.credits-clawd {
  width: 44px;
  height: 38px;
  flex-shrink: 0;
}
.credits-meta {
  color: var(--muted);
  font-size: 0.7rem;
}

/* ── Guide ── */
.guide {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.guide[hidden] {
  display: none;
}
.guide-bubble {
  pointer-events: auto;
  max-width: 260px;
  background: #fffdf7;
  border: 2px solid var(--ink);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 10px 13px;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.guide-bubble.show {
  opacity: 1;
  transform: none;
}
.guide-bubble:empty {
  display: none;
}
.guide-bubble:not(.show) {
  visibility: hidden;
  transition:
    opacity 0.25s,
    transform 0.25s,
    visibility 0s 0.25s;
}
.guide-btn {
  pointer-events: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.guide-btn:hover {
  transform: translate(-1px, -2px);
}
.guide-clawd {
  width: 42px;
  height: 36px;
}
.guide.dance .guide-clawd {
  animation: dance 0.35s ease-in-out 8;
}
@keyframes dance {
  25% {
    transform: rotate(-14deg) translateY(-6px);
  }
  75% {
    transform: rotate(14deg) translateY(-6px);
  }
}

/* ── Toasts ── */
.toasts {
  position: fixed;
  top: calc(var(--hud-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--orange);
  padding: 9px 16px 9px 10px;
  font: 500 0.8rem/1.2 var(--mono);
  letter-spacing: 0.03em;
  animation: toast 2.8s ease forwards;
  white-space: nowrap;
}
.toast b {
  background: var(--gold);
  color: var(--ink);
  border-radius: 6px;
  padding: 3px 7px;
  font-weight: 500;
}
@keyframes toast {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.9);
  }
  10%,
  82% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ── Confetti ── */
.confetti {
  position: fixed;
  top: -12px;
  width: 9px;
  height: 14px;
  z-index: 80;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  to {
    transform: translate(var(--dx), 105vh) rotate(var(--rot));
  }
}

/* ── Scroll reveal ── */
/* game.js drops data-reveal after the reveal, so hover transitions survive. */
.js [data-reveal] {
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.js [data-reveal]:not(.in) {
  opacity: 0;
  transform: translateY(22px);
}

/* ── Quiet "CV mode" (visitor skipped the game) ── */
.cv-mode .toasts,
.cv-mode .guide-bubble {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .levels {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-left: 72px;
  }
  .levels::before {
    top: 20px;
    bottom: 20px;
    left: 26px;
    right: auto;
    border-top: 0;
    border-left: 3px dashed var(--ink);
  }
  .level {
    display: block;
  }
  .level-node {
    position: absolute;
    left: -72px;
    top: 16px;
    margin: 0;
  }
  .items {
    grid-template-columns: 1fr 1fr;
  }
  /* 2 + 7 cells: let the last card close the grid */
  .items > .item:last-child {
    grid-column: span 2;
  }
}
@media (max-width: 860px) {
  .hud-nav a:not(.hud-cta) {
    display: none;
  }
  .player-grid,
  .edu,
  .tree,
  .side-grid {
    grid-template-columns: 1fr;
  }
  .player-grid {
    gap: 40px;
  }
  .sheet {
    transform: none;
  }
  section {
    padding: 72px 0;
  }
}
@media (max-width: 600px) {
  .badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .badge {
    padding: 16px 10px 14px;
  }
  .badges > li:last-child:nth-child(odd) {
    grid-column: span 2;
  }
  .badge-icon {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
  }
  .q-logo.logo-uf img {
    height: 9px;
  }
  :root {
    --hud-h: 56px;
  }
  body {
    font-size: 16px;
  }
  .hud {
    gap: 12px;
    padding: 0 14px;
  }
  .hud-trophy {
    display: none;
  }
  .hud-cta {
    padding: 7px 11px;
    font-size: 0.84rem;
  }
  .wrap {
    width: min(1180px, 100% - 28px);
  }
  .items {
    grid-template-columns: 1fr;
  }
  .item-legendary,
  .items > .item:last-child {
    grid-column: auto;
  }
  .item-legendary {
    display: flex;
  }
  .item-legendary .item-shot {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
  .levels {
    padding-left: 56px;
  }
  .levels::before {
    left: 20px;
  }
  .level-node {
    left: -56px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  .quest {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 12px 14px;
  }
  .q-logo {
    max-width: 56px;
    max-height: 26px;
  }
  .q-date {
    grid-column: 2;
    text-align: left;
  }
  .timeline {
    padding-left: 26px;
  }
  .timeline::before {
    left: 5px;
  }
  .quest::before {
    left: -27px;
  }
  .langs li {
    grid-template-columns: 6.6em 1fr 3.6em;
    gap: 8px;
  }
  .sheet-photo {
    width: 76px;
    height: 76px;
  }
  .guide {
    right: 12px;
    bottom: 12px;
  }
  .guide-btn {
    width: 54px;
    height: 54px;
  }
  .guide-bubble {
    max-width: 210px;
    font-size: 0.84rem;
  }
  .toast {
    white-space: normal;
    max-width: calc(100vw - 28px);
  }
  .side-list {
    gap: 10px;
  }
  .side-glyph {
    font-size: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal]:not(.in) {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .hud,
  .guide,
  .toasts,
  .boot,
  .credits-meta {
    display: none !important;
  }
  .sticker {
    box-shadow: none;
  }
  .js .level:not(.unlocked) .level-card {
    filter: none;
    opacity: 1;
  }
  section {
    padding: 28px 0;
  }
  .sticker {
    break-inside: avoid;
  }
  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .save-card {
    background: none;
    color: var(--ink);
  }
  .save-card *,
  .save-card .btn {
    color: var(--ink) !important;
    border-color: var(--ink) !important;
    background: none !important;
  }
}
html:not(.js) .js-only {
  display: none;
}
