/* realm pages: ranking, hero profiles and the market.
   Loaded after styles.css (tokens, fonts, nav, sky, footer). */

:root {
  --stone: #1a1712;
  --panel: color-mix(in srgb, var(--surface) 86%, transparent);
  --panel-2: color-mix(in srgb, var(--surface-3) 90%, transparent);
}

.page {
  padding: calc(var(--nav-top) + var(--nav-h) + 28px) 0 96px;
  min-height: 100vh;
}
.page h1 {
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lead2 {
  margin-top: 16px;
  max-width: 460px;
  font-size: 17px;
  color: var(--text-2);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--gold) 70%, var(--text-2));
}
.kicker .ic {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 16px;
  --c: var(--gold);
}
.h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
}
.muted {
  color: var(--text-3);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  color: var(--on-primary);
  background: linear-gradient(180deg, var(--key-hi), var(--key-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(120, 70, 0, 0.22),
    0 10px 24px -12px rgba(233, 169, 58, 0.8);
  transition:
    transform 0.15s,
    filter 0.2s;
}
.btn[hidden] {
  display: none;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.btn--glass {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.btn .ic {
  width: 20px;
  height: 20px;
  background: none;
  box-shadow: none;
  font-size: 18px;
  --c: currentColor;
}
.iconbtn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}
.iconbtn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}
.iconbtn:disabled {
  opacity: 0.35;
  cursor: default;
}
.iconbtn .ic {
  width: 22px;
  height: 22px;
  background: none;
  box-shadow: none;
  font-size: 20px;
  --c: currentColor;
}

/* panels */
.panel {
  position: relative;
  border-radius: 22px;
  background: var(--panel);
  box-shadow:
    var(--rim),
    inset 0 0 0 1px var(--line),
    0 30px 60px -40px rgba(0, 0, 0, 0.9);
}
.panel__head {
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.panel__head .label {
  display: block;
  margin-bottom: 8px;
}

/* the baked hero sprite: six frames, idle loop of base, breathe, blink */
.hsprite {
  --s: 192px;
  display: block;
  width: var(--s);
  height: var(--s);
  background-image: var(--src);
  background-repeat: no-repeat;
  background-size: calc(var(--s) * 6) var(--s);
  background-position: 0 0;
  image-rendering: pixelated;
  animation: hidle 3.2s infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes hidle {
  0% {
    background-position-x: 0;
    animation-timing-function: step-end;
  }
  28% {
    background-position-x: calc(var(--s) * -1);
    animation-timing-function: step-end;
  }
  52% {
    background-position-x: 0;
    animation-timing-function: step-end;
  }
  80% {
    background-position-x: calc(var(--s) * -2);
    animation-timing-function: step-end;
  }
  86% {
    background-position-x: 0;
    animation-timing-function: step-end;
  }
}
.hsprite--still {
  animation: none;
}

/* a hero's head as an avatar: frame 0 of the strip, cropped to the face */
.ava {
  --a: 48px;
  position: relative;
  flex: none;
  width: var(--a);
  height: var(--a);
  border-radius: 12px;
  overflow: hidden;
  background:
    var(--src) no-repeat calc(var(--a) * -0.5) calc(var(--a) * -0.14) /
      calc(var(--a) * 12) calc(var(--a) * 2),
    radial-gradient(circle at 50% 30%, #3a5a3a, #1b2a20 70%);
  image-rendering: pixelated;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 6px 14px -8px rgba(0, 0, 0, 0.8);
}

.title-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}

.gold {
  color: var(--gold);
}
.num {
  font-variant-numeric: tabular-nums;
}
.up {
  color: var(--green);
}
.down {
  color: #ff6b7d;
}

.state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-2);
}
.state b {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--text);
}
.state .btn {
  margin-top: 18px;
}
.shimmer {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* torches: a flickering warm glow */
.torch {
  position: absolute;
  width: 14px;
  height: 22px;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff3c4, #ffb347 45%, #e2552a 75%, transparent 76%);
  filter: drop-shadow(0 0 18px rgba(255, 160, 60, 0.9));
  animation: flicker 1.6s infinite alternate;
}
.torch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 70, 0.22), transparent 65%);
  pointer-events: none;
}
.torch::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 18px;
  width: 8px;
  height: 30px;
  border-radius: 2px;
  background: linear-gradient(180deg, #5a3b22, #2a1a0e);
}
@keyframes flicker {
  0% {
    transform: scale(1) rotate(-2deg);
    opacity: 0.95;
  }
  40% {
    transform: scale(1.08, 0.94) rotate(2deg);
  }
  70% {
    transform: scale(0.94, 1.06) rotate(-1deg);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.04) rotate(1deg);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hsprite,
  .torch,
  .shimmer {
    animation: none;
  }
}
@media (max-width: 760px), (pointer: coarse) {
  .torch {
    filter: none;
  }
}

/* ---------- ranking ---------- */
.page--lb {
  padding-top: 0;
}
.lbhero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-top) + var(--nav-h) + 40px) 0 40px;
}
.lbhero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.lbhero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(0.8) brightness(0.7);
  image-rendering: pixelated;
}
.lbhero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 4, 10, 0.92) 0%, rgba(3, 4, 10, 0.4) 50%, rgba(3, 4, 10, 0.75) 100%),
    linear-gradient(180deg, rgba(3, 4, 10, 0.4) 0%, transparent 30%);
}
.lbhero__bg {
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.lbhero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 40px;
  min-height: 520px;
}
.lbhero__copy .btn {
  margin-top: 28px;
}
.lbhero__copy .btn svg {
  flex: none;
}

/* podium: three plinths, the winner in the middle and highest */
.podium {
  position: relative;
  padding: 30px 30px 0;
  border-radius: 200px 200px 24px 24px;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 200, 87, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(30, 24, 18, 0.55), rgba(12, 10, 8, 0.85));
  box-shadow:
    inset 0 0 0 10px rgba(58, 48, 38, 0.55),
    inset 0 0 0 12px rgba(0, 0, 0, 0.5),
    0 40px 80px -40px rgba(0, 0, 0, 0.95);
}
.torch--l {
  left: -6px;
  top: 46%;
}
.torch--r {
  right: -6px;
  top: 46%;
}
.podium__row {
  padding-top: 96px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}
.plinth {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.plinth__hero {
  position: relative;
  z-index: 2;
  display: block;
  margin-bottom: -22px;
  transition: transform 0.25s var(--ease);
}
.plinth__hero:hover {
  transform: translateY(-4px);
}
.plinth__hero .hsprite {
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.6));
}
.plinth__banner {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -100%;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 112px;
  padding: 10px 12px 18px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
  text-align: center;
  background: linear-gradient(180deg, #1c2236, #121626);
  box-shadow: inset 0 2px 0 var(--pc, #8fb4d8);
}
.plinth--1 .plinth__banner {
  --pc: var(--gold);
  background: linear-gradient(180deg, #2a2210, #171208);
}
.plinth--2 .plinth__banner {
  --pc: #c9d6e8;
}
.plinth--3 .plinth__banner {
  --pc: #e08a4b;
  background: linear-gradient(180deg, #2a1712, #160c09);
}
.plinth__ord {
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  color: var(--pc);
}
.plinth__ord sup {
  font-size: 11px;
  margin-left: 1px;
}
.plinth__banner b {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
}
.plinth__banner small {
  font-size: 12.5px;
  font-weight: 700;
  color: color-mix(in srgb, var(--pc) 75%, var(--text-2));
}
.plinth__stone {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  border-radius: 10px 10px 0 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 0, 0, 0.35) 22px 24px),
    linear-gradient(180deg, #4a3e30, #2b231b);
  box-shadow:
    inset 0 2px 0 rgba(255, 230, 190, 0.18),
    inset 0 -10px 20px rgba(0, 0, 0, 0.5);
}
.plinth__stone b {
  font-size: 30px;
  font-weight: 900;
  color: rgba(255, 225, 170, 0.35);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.plinth--1 .plinth__stone {
  height: 128px;
}
.plinth--2 .plinth__stone {
  height: 92px;
}
.plinth--3 .plinth__stone {
  height: 70px;
}
.plinth.is-empty {
  min-height: 240px;
  justify-content: flex-end;
}
.plinth.is-empty .plinth__banner {
  position: relative;
  translate: 0 0;
  left: auto;
  margin-bottom: 18px;
  opacity: 0.6;
}
.plinth.is-empty .shimmer {
  width: 80px;
}
.plinth:not(.is-empty) .plinth__banner {
  top: 8px;
}

/* board picker */
.boards {
  margin-top: 56px;
}
.boards__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg[hidden] {
  display: none;
}
.seg button {
  white-space: nowrap;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}
.seg button[aria-selected="true"] {
  color: var(--on-primary);
  background: linear-gradient(180deg, var(--key-hi), var(--key-lo));
}
.boards__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.boards__grid > .boardchip {
  flex: 1 1 0;
}
@media (max-width: 1180px) {
  .boards__grid > .boardchip {
    flex: 1 1 calc((100% - 30px) / 4);
  }
}
@media (max-width: 760px) {
  .boards__grid > .boardchip {
    flex: 1 1 calc((100% - 24px) / 4);
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 82px;
    padding: 10px 4px;
    font-size: 12.5px;
    text-align: center;
  }
}
.boardchip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 0 12px 0 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  transition:
    color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.boardchip .ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 20px;
}
.boardchip:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.boardchip[aria-selected="true"] {
  color: var(--text);
  background: color-mix(in srgb, var(--c) 10%, var(--panel));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent),
    0 0 28px -14px var(--c);
}

/* the ranked table */
#rankings {
  margin-top: 28px;
  scroll-margin-top: 100px;
}
.lbtable__cols,
.lbrow {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 160px 120px 150px 40px;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}
.lbtable__cols {
  height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.lbtable__num {
  text-align: right;
}
.lbtable__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lbtable__rows > li + li {
  border-top: 1px solid var(--line);
}
.lbrow {
  min-height: 72px;
  text-decoration: none;
  transition: background 0.2s;
}
a.lbrow:hover {
  background: rgba(255, 255, 255, 0.03);
}
a.lbrow:hover .lbrow__go {
  --c: var(--gold);
  translate: 2px -2px;
}
.lbrow--ghost {
  display: flex;
}
.lbrow--ghost .shimmer {
  width: 60%;
}
.lbrow__rank {
  padding-left: 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-2);
}
.lbrow__who {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.lbrow__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.lbrow__name b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--gold);
}
.lbrow__class {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}
.lbrow__level {
  text-align: right;
  font-size: 18px;
  font-weight: 800;
}
.lbrow__xp {
  text-align: right;
  font-size: 14px;
  color: var(--text-2);
}
.lbrow__go {
  width: 28px;
  height: 28px;
  background: none;
  box-shadow: none;
  font-size: 16px;
  --c: var(--text-3);
  transition: translate 0.2s;
}
.lbtable__empty {
  padding: 26px 24px;
  text-align: center;
}
.lbtable__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 1020px) {
  .lbhero__grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .podium {
    margin-top: 70px;
  }
}
@media (max-width: 760px) {
  .lbhero {
    padding-top: calc(var(--nav-top) + var(--nav-h) + 24px);
  }
  .podium {
    padding: 22px 10px 0;
    border-radius: 120px 120px 18px 18px;
  }
  .plinth__hero .hsprite {
    --s: 120px !important;
  }
  .plinth--1 .plinth__hero .hsprite {
    --s: 140px !important;
  }
  .plinth__banner {
    min-width: 0;
    width: 100%;
    padding: 8px 6px 14px;
  }
  .plinth__banner b {
    font-size: 13.5px;
    max-width: 100%;
  }
  .plinth--1 .plinth__stone {
    height: 92px;
  }
  .plinth--2 .plinth__stone {
    height: 66px;
  }
  .plinth--3 .plinth__stone {
    height: 50px;
  }
  .torch {
    display: none;
  }
  .boards {
    margin-top: 40px;
  }
  .boards__grid {
    gap: 8px;
  }
  .boardchip .ic {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
  #periods {
    display: flex;
    width: 100%;
  }
  #periods[hidden] {
    display: none;
  }
  #periods button {
    flex: 1;
    padding: 0 6px;
    font-size: 13px;
  }
  .lbtable__cols,
  .lbrow {
    grid-template-columns: 38px minmax(0, 1fr) 64px 28px;
    padding: 0 14px;
  }
  .lbtable__class,
  .lbrow__class,
  .lbrow__xp,
  #colXp {
    display: none;
  }
  .lbrow__rank {
    padding-left: 2px;
  }
  .lbrow .ava {
    --a: 38px !important;
  }
  .panel__head {
    padding: 22px 18px 16px;
  }
}

.lbrow__rank--1 {
  color: var(--gold);
}
.lbrow__rank--2 {
  color: #c9d6e8;
}
.lbrow__rank--3 {
  color: #e08a4b;
}

/* ---------- hero profile ---------- */
.page--hero {
  position: relative;
  overflow: hidden;
}
.hp__bg {
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  z-index: -1;
}
.hp__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: blur(2px) saturate(0.7);
  image-rendering: pixelated;
}
.hp__bg {
  -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
}
.hp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  min-height: 600px;
}
.hp--empty {
  display: block;
  min-height: 0;
}
.hp__id h1 {
  margin-top: 8px;
  font-size: clamp(38px, 4.4vw, 60px);
  overflow-wrap: anywhere;
}
.hp__ghost {
  width: 260px;
  height: 48px;
  border-radius: 12px;
}
.hp__level {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-2);
}
.hp__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line-2);
  list-style: none;
}
.hp__meta li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}
.hp__meta .ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 17px;
}
.hp__meta .hp__xp {
  flex-basis: 100%;
  display: grid;
  gap: 8px;
}
.hp__actions {
  margin-top: 24px;
}
.bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}
.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c, var(--gold)) 70%, #000), var(--c, var(--gold)));
  box-shadow: 0 0 12px -2px var(--c, var(--gold));
}

/* the arch the hero stands in */
.hp__stage {
  display: grid;
  justify-items: center;
}
.arch {
  position: relative;
  width: 420px;
  height: 540px;
  border-radius: 210px 210px 18px 18px;
  overflow: hidden;
  background: #0d1220;
  box-shadow:
    0 0 0 10px #2c2620,
    0 0 0 12px #14100c,
    0 0 0 13px rgba(255, 220, 160, 0.12),
    0 40px 80px -30px rgba(0, 0, 0, 0.95);
}
.arch__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.arch::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 85%, transparent 30%, rgba(3, 4, 10, 0.55) 80%),
    linear-gradient(180deg, rgba(3, 4, 10, 0.15), transparent 30%, rgba(3, 4, 10, 0.35));
  pointer-events: none;
}
.arch__say {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--key-hi);
  text-shadow:
    0 2px 0 rgba(60, 30, 0, 0.9),
    0 0 18px rgba(0, 0, 0, 0.8);
}
.arch__hero {
  position: absolute;
  left: 50%;
  bottom: 40px;
  z-index: 2;
  translate: -50% 0;
}
.arch__hero .hsprite {
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.55));
}
.arch__shadow {
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 1;
  width: 150px;
  height: 22px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
}
.hp__walk {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}
.hp__walk[hidden] {
  display: none;
}
.hp__walk small {
  display: block;
  font-size: 13px;
  color: var(--text-3);
}
.hp__walk b {
  font-size: 19px;
  font-weight: 800;
}
.hp__rule {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 87, 0.6), transparent);
}

/* equipment grid */
.hp__gear .h2 {
  margin-bottom: 18px;
}
.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 12px;
  max-width: 340px;
}
.slot {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.slot__tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1.15;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.05), transparent 70%),
    #16130f;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    inset 0 -8px 16px rgba(0, 0, 0, 0.45);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.slot__tile .ic {
  width: 44px;
  height: 44px;
  background: none;
  box-shadow: none;
  font-size: 36px;
}
.slot.is-worn .slot__tile {
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 22%, transparent), transparent 75%),
    #1b1813;
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, rgba(255, 255, 255, 0.1)),
    inset 0 -8px 16px rgba(0, 0, 0, 0.45),
    0 0 24px -12px var(--c);
}
.slot.is-broken .slot__tile {
  filter: grayscale(1);
  opacity: 0.6;
}
.slot__glint {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.slot:hover .slot__tile {
  transform: translateY(-2px);
}
.slot[aria-pressed="true"] .slot__tile {
  box-shadow:
    inset 0 0 0 2px var(--gold),
    0 0 26px -10px var(--gold);
}
.slot[aria-pressed="true"] {
  color: var(--text);
}
.slotinfo {
  display: grid;
  gap: 4px;
  max-width: 340px;
  min-height: 96px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
}
.slotinfo b {
  font-size: 16.5px;
  font-weight: 800;
}
.bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.bonus {
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}

/* tabs */
.hp__tabs {
  margin-top: 44px;
}
.tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  max-width: 560px;
  margin: 0 auto 30px;
  border-bottom: 1px solid var(--line-2);
}
.tabs button {
  flex: 1;
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  background: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-2);
}
.tabs button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--gold);
}
.ogrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ostat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ostat .ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 21px;
}
.ostat small {
  display: block;
  font-size: 13px;
  color: var(--text-3);
}
.ostat b {
  font-size: 19px;
  font-weight: 800;
}
.ocards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.ocard {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px;
  font-size: 14.5px;
}
.ocard__big {
  font-size: 22px;
  font-weight: 800;
}
.ocard__set + .ocard__set {
  margin-top: 8px;
}
.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.skill {
  display: grid;
  gap: 12px;
  padding: 20px;
}
.skill__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.skill__head .ic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 22px;
}
.skill__head b {
  display: block;
  font-size: 17px;
  font-weight: 800;
}
.skill__head small {
  font-size: 13px;
}
.skill__lv {
  margin-left: auto;
  font-size: 20px;
  font-weight: 800;
  color: var(--c);
}
.skill__xp {
  font-size: 12.5px;
  text-align: right;
}
.journey {
  padding: 22px;
}
.journey + .journey {
  margin-top: 12px;
}
.heat {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 18px);
  grid-auto-columns: 18px;
  justify-content: start;
  gap: 5px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.heat__cell {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.heat__cell[data-l="1"] {
  background: rgba(62, 230, 160, 0.25);
}
.heat__cell[data-l="2"] {
  background: rgba(62, 230, 160, 0.45);
}
.heat__cell[data-l="3"] {
  background: rgba(62, 230, 160, 0.7);
}
.heat__cell[data-l="4"] {
  background: #3ee6a0;
  box-shadow: 0 0 8px -2px #3ee6a0;
}
.heat__legend {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  margin-top: 10px;
  font-size: 12.5px;
}
.heat__legend .heat__cell {
  width: 12px;
  height: 12px;
}
.sources {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.source {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.source__name b {
  display: block;
  font-size: 15px;
}
.source .num {
  text-align: right;
  font-weight: 700;
}
.hp__nav {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  gap: 10px;
}
.hp__nav .iconbtn {
  background: rgba(10, 12, 22, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hp__nav .iconbtn.is-off {
  opacity: 0.3;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .hp {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hp__gear {
    grid-column: 1 / -1;
  }
  .slots {
    grid-template-columns: repeat(6, 1fr);
    max-width: none;
  }
  .slotinfo {
    max-width: none;
  }
}
@media (max-width: 1020px) {
  .ogrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ocards,
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .hp {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .arch {
    width: min(340px, 100%);
    height: 440px;
    border-radius: 170px 170px 16px 16px;
  }
  .arch__hero .hsprite {
    --s: 240px !important;
  }
  .slots {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 8px;
  }
  .slot__tile {
    width: 100%;
    aspect-ratio: 1;
  }
  .slot__tile .ic {
    font-size: 28px;
  }
  .slot {
    font-size: 12px;
  }
  .hp__rule {
    display: none;
  }
  .ocards,
  .skills {
    grid-template-columns: minmax(0, 1fr);
  }
  .source {
    grid-template-columns: 100px minmax(0, 1fr) 80px;
    gap: 10px;
  }
  .hp__nav {
    right: 14px;
    bottom: 14px;
  }
}

/* ---------- market ---------- */
.page--tp {
  position: relative;
  overflow: hidden;
}
.tp__bg {
  position: absolute;
  inset: 0 0 auto;
  height: 760px;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.tp__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: blur(3px) saturate(0.7);
}
.page--tp .wrap {
  width: min(1440px, 100% - var(--pad));
}
.tp__head h1 {
  font-size: clamp(42px, 5vw, 64px);
}
.tp__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px 210px;
  gap: 12px;
  margin-top: 30px;
}
.tp__search,
.tp__select {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tp__search:focus-within,
.tp__select:focus-within {
  box-shadow: inset 0 0 0 1px rgba(255, 200, 87, 0.6);
}
.tp__search .ic {
  width: 44px;
  height: 44px;
  background: none;
  box-shadow: none;
  font-size: 20px;
  --c: var(--text-2);
}
.tp__search input,
.tp__select select {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--text);
}
.tp__search input::placeholder {
  color: var(--text-3);
}
.tp__select select {
  padding: 0 40px 0 16px;
  appearance: none;
  cursor: pointer;
  font-weight: 700;
}
.tp__select select option {
  background: #0d1121;
}
.tp__select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  translate: 0 -70%;
  rotate: 45deg;
  pointer-events: none;
}
.tp {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 360px;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}
.tp__side {
  display: grid;
  gap: 16px;
}
.tp__types,
.tp__overview {
  padding: 18px;
}
.tp__h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 800;
}
.tp__h .ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 17px;
  --c: var(--gold);
}
.tp__h--sub {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.ttype {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: none;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
}
.ttype .ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
}
.ttype:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.ttype[aria-selected="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tslots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 4px 10px 56px;
}
.tslot {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tslot[aria-pressed="true"] {
  color: var(--on-primary);
  background: var(--gold);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text-2);
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}
.tp__overview dl {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.tp__overview dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
}
.tp__overview dt {
  color: var(--text-2);
}
.tp__overview dd {
  margin: 0;
  font-weight: 800;
}
.tp__hot {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.linkish {
  padding: 0;
  border: 0;
  cursor: pointer;
  background: none;
  text-align: left;
  font: inherit;
  font-weight: 700;
  color: var(--text);
}
.linkish:hover {
  text-decoration: underline;
}

.tp__main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.tp__items {
  padding: 18px 18px 10px;
}
.tp__itemshead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.tp__itemshead .tp__h {
  margin-bottom: 10px;
}
.tp__itemshead .muted {
  font-size: 13.5px;
}
.tpt__head,
.tpt__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 76px 78px 76px 60px;
  align-items: center;
  gap: 10px;
}
.tpt__head {
  white-space: nowrap;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-3);
}
.r {
  text-align: right;
  justify-self: end;
}
.tpt__row {
  width: 100%;
  min-height: 62px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--text);
}
.tpt__row + .tpt__row {
  margin-top: 2px;
}
.tpt__row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.tpt__row[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tpt__row--ghost {
  display: flex;
  cursor: default;
}
.tpt__row--ghost .shimmer {
  width: 70%;
}
.tpt__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tpt__item > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.tpt__item b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 700;
}
.tpt__item small {
  display: block;
  font-size: 12.5px;
  color: var(--text-3);
}
.hotchip {
  flex: none;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.14);
}
.itile {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 18%, transparent), transparent 75%),
    #16130f;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, rgba(255, 255, 255, 0.08));
}
.itile .ic {
  width: 26px;
  height: 26px;
  background: none;
  box-shadow: none;
  font-size: 22px;
}
.itile--lg {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}
.itile--lg .ic {
  width: 44px;
  height: 44px;
  font-size: 40px;
}
.cn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.cn__dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe7a8, var(--gold) 45%, #b98424 100%);
  box-shadow: 0 0 6px rgba(255, 200, 87, 0.5);
}
.muted.cn--big {
  font-size: 24px;
}
.cn--big {
  gap: 10px;
  font-size: 36px;
  font-weight: 800;
}
.cn--big .cn__dot {
  width: 30px;
  height: 30px;
}
.tp__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px 4px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  font-size: 13.5px;
}
.tp__pager div {
  display: flex;
  gap: 8px;
}
.tp__pager .iconbtn {
  width: 38px;
  height: 38px;
}

.tp__book {
  padding: 6px 18px 14px;
}
.tabs--left {
  justify-content: flex-start;
  align-items: center;
  max-width: none;
  margin: 0 0 6px;
}
.tabs--left button {
  flex: none;
  padding: 0 14px;
  font-size: 15.5px;
}
.tp__bookfor {
  margin-left: auto;
  font-size: 13px;
}
.book__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) 60px 90px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 4px;
  font-size: 14px;
}
.book__row + .book__row {
  border-top: 1px solid var(--line);
}
.book__row--head {
  min-height: 38px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-3);
}
.book__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.book__who b {
  display: block;
  font-size: 14.5px;
}
.book__who small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.book__who > span {
  min-width: 0;
}
.book__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.deal {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #e879f9;
  background: rgba(232, 121, 249, 0.14);
}
.deal--trade {
  margin-left: 0;
  color: #46e0f0;
  background: rgba(70, 224, 240, 0.14);
}

/* detail panel */
.tp__detail {
  position: sticky;
  top: calc(var(--nav-top) + var(--nav-h) + 14px);
  display: grid;
  gap: 14px;
  padding: 20px;
  transition: opacity 0.2s;
}
.tp__detail.is-loading {
  opacity: 0.6;
}
.dt__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dt__name {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
}
.dt__head small {
  display: block;
  font-size: 13.5px;
  color: var(--text-2);
}
.dt__vendor {
  font-weight: 700;
  color: var(--text-3) !important;
}
.dt__blurb,
.dt__lvl {
  font-size: 14.5px;
}
.dt__price {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.dt__price small {
  font-size: 13px;
}
.dt__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.dt__grid dt {
  font-size: 12px;
  color: var(--text-3);
}
.dt__grid dd {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 800;
}
.dt__facts {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-2);
}
.dt__facts li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dt__facts .ic {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 15px;
}
.dt__chart {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.dt__charthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.dt__charthead b {
  display: block;
  font-size: 15px;
}
.dt__charthead small {
  font-size: 12.5px;
}
.seg--sm button {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
}
.chart {
  display: block;
  width: 100%;
  height: auto;
}
.chart__grid {
  stroke: rgba(255, 255, 255, 0.06);
}
.chart__axis {
  fill: var(--text-3);
  font-size: 9.5px;
  font-family: var(--body);
}
.chart__empty {
  fill: var(--text-3);
  font-size: 12px;
  font-family: var(--body);
}
.chart__line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linejoin: round;
}
.chart__area {
  fill: rgba(255, 200, 87, 0.1);
}
.chart__dot {
  fill: #1a1203;
  stroke: var(--gold);
  stroke-width: 1.4;
}
.chart__vol {
  fill: rgba(70, 224, 240, 0.45);
}

/* realm-wide feed */
.tp__feed {
  margin-top: 16px;
  padding: 18px;
}
.feed {
  margin: 0;
  padding: 0;
  list-style: none;
}
.feed__row {
  display: grid;
  grid-template-columns: 76px minmax(0, auto) minmax(0, 1fr) auto 120px;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  font-size: 14px;
}
.feed__row + .feed__row {
  border-top: 1px solid var(--line);
}
.feed__row .linkish {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed__ago {
  text-align: right;
  font-size: 13px;
}
.feed__empty {
  padding: 16px 0;
}
.feed__side {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}
.feed__side--buy {
  color: #3ee6a0;
  background: rgba(62, 230, 160, 0.12);
}
.feed__side--sell {
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.12);
}
.book__who .feed__side {
  flex: none;
}

@media (max-width: 1360px) {
  .tpt__opt2 {
    display: none;
  }
  .tpt__head,
  .tpt__row {
    grid-template-columns: minmax(0, 1fr) 76px 76px 78px 76px;
  }
}
@media (max-width: 1180px) {
  .tp {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .tp__detail {
    position: static;
    grid-column: 1 / -1;
    grid-row: 1;
  }
}
@media (max-width: 1020px) {
  .tp {
    grid-template-columns: minmax(0, 1fr);
  }
  .tp__detail {
    grid-row: auto;
    order: 2;
  }
  .tp__main {
    order: 1;
  }
  .tp__side {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
@media (max-width: 760px) {
  .tp__bar {
    grid-template-columns: 1fr 1fr;
  }
  .tp__search {
    grid-column: 1 / -1;
  }
  .tp__side {
    grid-template-columns: minmax(0, 1fr);
  }
  .tp__types {
    display: none;
  }
  .tp__items,
  .tp__book,
  .tp__detail,
  .tp__feed {
    padding-left: 12px;
    padding-right: 12px;
  }
  .tpt__head,
  .tpt__row {
    grid-template-columns: minmax(0, 1fr) 62px 62px;
    gap: 6px;
    padding: 0 6px;
  }
  .tpt__row {
    padding: 8px 6px;
  }
  .tpt__item {
    gap: 10px;
  }
  .tpt__item b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    font-size: 14px;
    line-height: 1.25;
  }
  .tpt__item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tpt__row .itile {
    width: 36px;
    height: 36px;
  }
  .tpt__row .cn {
    gap: 4px;
    font-size: 13px;
  }
  .tpt__row .cn__dot {
    width: 9px;
    height: 9px;
  }
  .tpt__opt,
  .tpt__opt2 {
    display: none;
  }
  .hotchip {
    display: none;
  }
  .book__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) 64px;
  }
  .book__row > :nth-child(3) {
    display: none;
  }
  .feed__row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    padding: 8px 0;
  }
  .feed__row > :nth-child(3),
  .feed__row .feed__ago {
    display: none;
  }
}

/* pixel art from the app (items.css, generated): placed on the 32 canvas like PixelStill, glow tinted */
.pix {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.pix::before,
.pix::after {
  content: "";
  position: absolute;
  left: calc(var(--x) / 32 * 100%);
  top: calc(var(--y) / 32 * 100%);
  width: calc(var(--w) / 32 * 100%);
  height: calc(var(--h) / 32 * 100%);
}
.pix::before {
  background: var(--src) 0 0 / calc(var(--n) * 100%) 100% no-repeat;
  image-rendering: pixelated;
}
.pix::after {
  background-color: var(--c, var(--gold));
  -webkit-mask: var(--glow, linear-gradient(transparent, transparent)) 0 0 / calc(var(--n) * 100%) 100% no-repeat;
  mask: var(--glow, linear-gradient(transparent, transparent)) 0 0 / calc(var(--n) * 100%) 100% no-repeat;
}
.itile .pix {
  position: absolute;
  inset: 10%;
  width: auto;
  height: auto;
}
.itile {
  position: relative;
}
.slot__tile .itile {
  width: 72%;
  height: 72%;
  background: none;
  box-shadow: none;
}
.slot__tile .itile .ic {
  width: 100%;
  height: 100%;
  font-size: 34px;
}
.hp__pet .itile {
  width: 56px;
  height: 56px;
}
