/* The Dungeon Market pages (6.22.0): the showcase /store/, a store /store/<hero>/ and a listing /store/<hero>/<code>/.
   Every thing for sale sits in the game's inventory slot: dark slate, a black keyline and a rim in its rarity's colour
   (Legendary gold, Rare blue, Magic cream, items green). The finest listing leads the showcase at double size. */
.store-page .hidden { display: none !important; }
/* the body is a flex column: without a width the market would grow to its widest unwrapped row on a phone */
.store-page main.market { width: 100%; min-width: 0; }
.market { --rare-l: #f8dd45; --rare-r: #3fa6ff; --rare-m: #d8d1bb; --rare-i: #8ee089; }
.market > .crumbs + * { margin-top: 18px; }
.r-L { --r: var(--rare-l); --r-glow: rgba(248, 221, 69, .34); --r-ink: #1d1704; }
.r-R { --r: var(--rare-r); --r-glow: rgba(63, 166, 255, .32); --r-ink: #04111d; }
.r-M { --r: var(--rare-m); --r-glow: rgba(216, 209, 187, .16); --r-ink: #17150e; }
.r-I { --r: var(--rare-i); --r-glow: rgba(142, 224, 137, .22); --r-ink: #08160a; }

/* ---------------------------------------------------------------- breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 800 14px/1.4 var(--body); color: var(--muted); text-shadow: var(--outline-sm); }
.crumbs a { color: var(--rim-hi); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { width: 7px; height: 7px; border-top: 2px solid var(--stone-hi); border-right: 2px solid var(--stone-hi); transform: rotate(45deg); }
.crumbs [aria-current] { color: var(--cream-dim); }

/* ---------------------------------------------------------------- the hall: intro + filters */
.tablet-titled > .plaque:first-child h1 { font-size: clamp(26px, 2.8vw, 34px); padding: 2px 16px 5px; background: linear-gradient(180deg, #5e6072, var(--stone) 55%, var(--stone-lo)); border-radius: 12px; box-shadow: 0 0 0 2px var(--keyline), inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 5px 6px -2px rgba(0, 0, 0, .55); }
.tablet-titled > .plaque:first-child { margin-top: calc(-1 * var(--frame-w) - 6px); }
.hall-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; }
.hall-intro p { max-width: 62ch; color: var(--cream-dim); font-size: 17px; line-height: 1.55; }
.hall-chest { width: 112px; height: auto; margin: -18px 6px -8px 0; transform: rotate(-6deg); filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55)); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 22px 0 0; padding: 14px; background: var(--inset-2); border: 1px solid var(--keyline); border-radius: 14px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .05); }
.search-field { position: relative; flex: 1 1 320px; min-width: 0; }
.filters .pill-row { order: 2; }
.search-field svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--cream-dim); stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.search-field input { min-height: 44px; padding-left: 46px; font-size: 16px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px 1px;
  color: var(--cream);
  font: 800 14px/1 var(--body);
  text-shadow: var(--outline-sm);
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(180deg, #44454f, #2a2b32 70%, #24252b);
  border: 2px solid var(--stone-hi);
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px var(--keyline), inset 0 1px 0 rgba(255, 255, 255, .16), 0 2px 3px rgba(0, 0, 0, .4);
  transition: border-color .15s ease, background .15s ease, transform .15s var(--ease-out);
}
.chip:hover { border-color: var(--rim); transform: translateY(-1px); }
.chip[aria-pressed="true"] { border-color: var(--select); background: linear-gradient(180deg, #3d5a78, #263547 70%, #1f2b3a); }
.chip.r-L::before, .chip.r-R::before, .chip.r-M::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--r); box-shadow: 0 0 0 1.5px var(--keyline); transform: rotate(45deg); }
.chip img { width: auto; height: 18px; margin-left: -3px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.sort-field { display: flex; align-items: center; gap: 10px; margin-left: auto; order: 1; }
.filters .pill-row:first-of-type { flex: 1 1 auto; }
.sort-field span { font: 900 13px/1 var(--body); color: var(--label); text-shadow: var(--outline-sm); }
.sort-field select { width: auto; min-height: 40px; padding: 6px 36px 6px 14px; font-size: 15px; cursor: pointer; appearance: none; background: linear-gradient(45deg, transparent 50%, var(--cream-dim) 50%) right 18px center / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, var(--cream-dim) 50%) right 12px center / 6px 6px no-repeat, linear-gradient(180deg, #2a2b32, #34353e); }
.sort-field select option { background: var(--inset); color: var(--cream); }
.result-line { min-height: 1.4em; margin: 16px 2px 14px; font: 800 14px/1.4 var(--body); color: var(--muted); }
.result-line b { color: var(--cream); }

/* ---------------------------------------------------------------- listing cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 18px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--cream);
  text-decoration: none;
  background: linear-gradient(180deg, #202127, var(--inset-2));
  border: 2px solid var(--stone-lo);
  border-radius: 16px;
  box-shadow: 0 0 0 1.5px var(--keyline), 0 12px 18px -12px rgba(0, 0, 0, .85);
  transition: transform .22s var(--ease-out), border-color .16s ease, box-shadow .22s var(--ease-out);
}
.card:hover { color: var(--cream); transform: translateY(-4px); border-color: var(--r); box-shadow: 0 0 0 1.5px var(--keyline), 0 18px 24px -14px rgba(0, 0, 0, .9); }
.card:focus-visible { outline: 3px solid var(--select); outline-offset: 3px; }
.slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin: 10px 10px 0;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 46%, var(--r-glow), transparent 64%), radial-gradient(circle at 50% 38%, #2d2f3a, #15161b 74%);
  box-shadow: inset 0 0 0 2px var(--keyline), inset 0 0 0 5px var(--r), inset 0 0 0 6.5px var(--keyline), inset 0 6px 16px rgba(0, 0, 0, .6);
}
.slot img { width: 64%; height: 64%; object-fit: contain; filter: drop-shadow(0 7px 6px rgba(0, 0, 0, .6)); transition: transform .35s var(--ease-out); }
.card:hover .slot img { transform: translateY(-3px) scale(1.06); }
.slot .letter { font: 700 clamp(48px, 6vw, 72px)/1 var(--display); color: var(--r); text-shadow: var(--outline); }
.slot img + .letter { display: none; }
/* item icons are square paintings with their own backdrop: smaller, with the game's rounded corners */
.r-I .slot img, .r-I.stage img { width: 46%; height: 46%; border-radius: 14%; box-shadow: 0 0 0 2px var(--keyline), 0 8px 12px -4px rgba(0, 0, 0, .6); filter: none; }
/* Legendary slots catch the light now and then: one slow sheen across the rim */
.r-L .slot::after, .r-L.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 245, 190, .2) 48%, transparent 58%) -150% 0 / 250% 100% no-repeat;
  animation: sheen 5.5s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes sheen { 0%, 62% { background-position: -150% 0; } 100% { background-position: 150% 0; } }
.rar-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  padding: 3px 9px 4px;
  font: 900 11px/1 var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--r-ink);
  background: var(--r);
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px var(--keyline), 0 2px 3px rgba(0, 0, 0, .5);
}
.trade-tag { position: absolute; right: 14px; top: 14px; z-index: 1; padding: 3px 9px 4px; font: 900 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: #08160a; background: var(--ok); border-radius: 999px; box-shadow: 0 0 0 1.5px var(--keyline), 0 2px 3px rgba(0, 0, 0, .5); }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.card-cat { font: 900 12px/1.3 var(--body); color: var(--label); text-shadow: var(--outline-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { display: -webkit-box; overflow: hidden; font: 800 17px/1.25 var(--body); text-shadow: var(--outline-sm); overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.card-desc { display: -webkit-box; overflow: hidden; color: var(--cream-dim); font: 600 15px/1.45 var(--body); overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.card-seller { display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 14px/1.2 var(--body); color: var(--cream-dim); }
.card-seller span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-price { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font: 900 18px/1 var(--body); text-shadow: var(--outline-sm); font-variant-numeric: lining-nums tabular-nums; }
.card-price small { font: 800 13px/1 var(--body); color: var(--cream-dim); }
/* the finest listing leads the showcase at double size */
.cards .card.featured { grid-column: span 2; grid-row: span 2; }
.card.featured .slot { margin: 14px 14px 0; box-shadow: inset 0 0 0 2px var(--keyline), inset 0 0 0 7px var(--r), inset 0 0 0 8.5px var(--keyline), inset 0 8px 22px rgba(0, 0, 0, .6); }
.card.featured .slot img { width: 58%; height: 58%; }
.card.featured .card-body { gap: 8px; padding: 16px 20px 20px; }
.card.featured .card-title { font: 700 clamp(22px, 2.2vw, 28px)/1.15 var(--display); text-shadow: var(--outline); }
.card.featured .card-cat { font-size: 13px; }
.card.featured .card-price { font-size: 24px; }
.card.featured .rar-tag::after { content: " · finest in the market"; }
.empty-hall { display: grid; justify-items: center; gap: 14px; padding: 36px 16px 28px; text-align: center; color: var(--cream-dim); }
.empty-hall img { width: 120px; height: auto; opacity: .9; filter: grayscale(.35) drop-shadow(0 8px 8px rgba(0, 0, 0, .5)); }
.empty-hall b { font: 800 19px/1.3 var(--body); color: var(--cream); text-shadow: var(--outline-sm); }

/* currencies: the game's coins, drawn small */
.coin { flex: none; display: inline-block; width: 1.05em; height: 1.05em; border-radius: 50%; background: radial-gradient(circle at 34% 30%, var(--c1), var(--c2) 72%); box-shadow: 0 0 0 1.5px var(--keyline), inset 0 -2px 0 rgba(0, 0, 0, .28), inset 0 1.5px 0 rgba(255, 255, 255, .55); }
.coin.gold { --c1: #fff0a0; --c2: #d6970a; }
.coin.silver { --c1: #ffffff; --c2: #8b93a3; }
.coin.idols { --c1: #c6ebff; --c2: #1a78dc; border-radius: 22%; transform: rotate(45deg) scale(.86); }

/* ---------------------------------------------------------------- stores strip */
.store-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.store-chip { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; color: var(--cream); text-decoration: none; background: var(--inset-2); border: 2px solid var(--stone-lo); border-radius: 999px; box-shadow: 0 0 0 1.5px var(--keyline); transition: border-color .15s ease, transform .15s var(--ease-out); }
.store-chip:hover { color: var(--cream); border-color: var(--rim); transform: translateY(-2px); }
.store-chip b { display: block; overflow: hidden; font: 800 16px/1.2 var(--body); text-overflow: ellipsis; white-space: nowrap; text-shadow: var(--outline-sm); }
.store-chip small { display: block; font: 700 13px/1.3 var(--body); color: var(--muted); }
.store-chip > span:last-child { min-width: 0; }

/* ---------------------------------------------------------------- a store's banner */
.seller-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin: 0 0 24px; padding: 16px 20px; background: var(--inset-2); border: 1px solid var(--keyline); border-radius: 14px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55); }
.seller-banner .portrait { --size: 84px; }
.seller-banner .who { flex: 1 1 220px; min-width: 0; }
.seller-banner .who b { display: block; font: 700 clamp(24px, 2.4vw, 30px)/1.1 var(--display); text-shadow: var(--outline); }
.seller-banner .who .cls { margin: 8px 0 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.stat-row div { display: grid; gap: 2px; }
.stat-row dt { font: 900 12px/1 var(--body); color: var(--label); text-shadow: var(--outline-sm); }
.stat-row dd { margin: 0; font: 700 22px/1.1 var(--display); text-shadow: var(--outline-sm); font-variant-numeric: lining-nums tabular-nums; }
.seller-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-mini { min-height: 40px; padding: 0 15px 1px; gap: 8px; font-size: 14px; }
.btn-mini svg { width: 17px; height: 17px; fill: none; stroke: var(--cream); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: none; }

/* ---------------------------------------------------------------- one listing */
.listing-view { padding: clamp(18px, 3vw, 36px); }
.listing-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(22px, 4vw, 52px); align-items: start; }
.stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 48%, var(--r-glow), transparent 62%), radial-gradient(circle at 50% 36%, #30323e, #131418 76%);
  box-shadow: inset 0 0 0 2.5px var(--keyline), inset 0 0 0 9px var(--r), inset 0 0 0 11px var(--keyline), inset 0 10px 30px rgba(0, 0, 0, .65), 0 16px 24px -14px rgba(0, 0, 0, .8);
}
.stage img { width: 56%; height: 56%; object-fit: contain; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .6)); }
.stage .letter { font: 700 clamp(90px, 14vw, 160px)/1 var(--display); color: var(--r); text-shadow: var(--outline); }
.stage img + .letter { display: none; }
.stage .rar-tag { left: 22px; top: 22px; padding: 5px 12px 6px; font-size: 13px; }
.stage .trade-tag { right: 22px; top: 22px; padding: 5px 12px 6px; font-size: 13px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.link-line { margin-top: 10px; }
.link-line code { font: 600 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); word-break: break-all; }
.info-col h1 { font-size: clamp(30px, 3.6vw, 46px); overflow-wrap: anywhere; }
.item-name { margin-top: 10px; font: 800 18px/1.3 var(--body); color: var(--r, var(--cream)); text-shadow: var(--outline-sm); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tags li { padding: 4px 11px 5px; font: 800 13px/1.2 var(--body); color: var(--cream); text-shadow: var(--outline-sm); background: var(--inset-2); border: 2px solid var(--stone-lo); border-radius: 999px; box-shadow: 0 0 0 1px var(--keyline); }
.tags li.t-rarity { border-color: var(--r); }
.tags li.t-trade { border-color: var(--ok); color: var(--ok); }
.tags li.t-plain { padding: 0; background: none; border: 0; box-shadow: none; }
.tags .cls { margin: 0; padding: 4px 11px 5px 9px; font-size: 12px; }
.price-plate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 22px 0 16px; padding: 16px 20px; background: linear-gradient(180deg, #2e2f37, #1c1d22); border: 2px solid var(--rim-lo); border-radius: 16px; box-shadow: 0 0 0 1.5px var(--keyline), inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 14px -10px rgba(0, 0, 0, .8); }
.price-plate .coin { font-size: 34px; }
.price-plate .amount { font: 700 clamp(30px, 3.2vw, 42px)/1 var(--display); text-shadow: var(--outline); font-variant-numeric: lining-nums tabular-nums; }
.price-plate .cur { font: 800 16px/1.2 var(--body); color: var(--cream-dim); }
.buy-box { padding: 16px 18px 14px; }
.buy-box .error { min-height: 0; margin: 0 0 10px; }
.buy-box .error:empty { margin: 0; }
.redeem-label { margin: 0 0 4px; font: 900 14px/1.3 var(--body); color: var(--label); text-shadow: var(--outline-sm); }
.hero-picks { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 12px; }
.hero-picks p { color: var(--cream-dim); font-size: 15px; }
.hero-pick { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; cursor: pointer; color: var(--cream); background: var(--inset); border: 2px solid var(--stone-lo); border-radius: 999px; box-shadow: 0 0 0 1px var(--keyline); font: 800 15px/1.2 var(--body); text-align: left; transition: border-color .15s ease; }
.hero-pick:hover { border-color: var(--rim-lo); }
.hero-pick small { display: block; font: 700 12.5px/1.2 var(--body); color: var(--muted); }
.hero-pick[aria-checked="true"] { border-color: var(--select); background: linear-gradient(180deg, #2f4560, #1f2b3a); }
.hero-pick .portrait { --size: 36px; }
.buy-btn { width: 100%; }
.signin-line { margin-top: 10px; font: 700 14px/1.4 var(--body); color: var(--muted); }
.signin-line:empty { display: none; }
.redeem-done { margin: 0 0 12px; padding: 11px 14px; font-weight: 800; color: var(--ok); background: rgba(90, 170, 110, .1); border: 1px solid rgba(140, 210, 160, .35); border-radius: 10px; }
.redeem-done a { color: var(--ok); }
.seller-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; margin-top: 18px; padding: 16px 18px; background: var(--inset-2); border: 2px solid var(--stone-lo); border-radius: 16px; box-shadow: 0 0 0 1.5px var(--keyline); }
.seller-card .portrait { --size: 64px; }
.seller-card .who small { display: block; font: 900 12px/1 var(--body); color: var(--label); text-shadow: var(--outline-sm); }
.seller-card .who b { display: block; margin-top: 4px; overflow: hidden; font: 700 24px/1.1 var(--display); text-overflow: ellipsis; white-space: nowrap; text-shadow: var(--outline); }
.seller-card .who .cls { margin: 6px 0 0; }
.seller-card .stat-row, .seller-card .seller-actions { grid-column: 1 / -1; }
.seller-card .stat-row { padding-top: 12px; border-top: 1px solid var(--line); }

/* tabs: the game's window tabs, a gold underline on the open one */
.tabs { margin-top: clamp(26px, 3vw, 38px); }
.tab-list { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--stone-lo); }
.tab-list [role="tab"] { margin-bottom: -2px; padding: 12px 18px 11px; cursor: pointer; color: var(--muted); font: 900 16px/1 var(--body); text-shadow: var(--outline-sm); background: none; border: 0; border-bottom: 3px solid transparent; transition: color .15s ease, background .15s ease; }
.tab-list [role="tab"]:hover { color: var(--cream); background: rgba(255, 255, 255, .04); }
.tab-list [role="tab"][aria-selected="true"] { color: var(--cream); border-bottom-color: var(--rim); background: linear-gradient(180deg, transparent, rgba(240, 203, 12, .07)); }
.tab-pane { max-width: 74ch; padding: 22px 4px 4px; color: var(--cream-dim); }
.tab-pane .desc { white-space: pre-line; color: var(--cream); font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.tab-pane .quiet { color: var(--muted); }
.details { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font: 700 15px/1.4 var(--body); }
.details li { padding: 8px 12px; border-radius: 10px; background: var(--inset-2); border: 1px solid var(--keyline); color: var(--cream); }
.details li.stat { color: #f3e7b5; }
.details li.power { color: var(--rare-l); }
.details li.magic { color: #7fc8ff; }
.details li.proc { color: #ffb37a; }
.details li.rune { color: var(--ok); }
.details li.dye { color: #e0a7ff; }

.status { margin: 20px auto 0; text-align: center; font: 800 16px/1.4 var(--body); color: var(--muted); }
.status:empty { display: none; }
.status.error { color: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  .r-L .slot::after, .r-L.stage::after { animation: none; }
  .card, .card .slot img, .chip, .store-chip { transition: none; }
}
@media (max-width: 860px) {
  .listing-grid { grid-template-columns: minmax(0, 1fr); }
  .stage-col { max-width: 520px; width: 100%; margin-inline: auto; }
  .sort-field { margin-left: 0; }
}
@media (max-width: 560px) {
  .hall-intro { grid-template-columns: minmax(0, 1fr); }
  .hall-chest { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cards .card.featured { grid-column: 1 / -1; grid-row: auto; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 15px; }
  .card-price { font-size: 16px; }
  .slot { margin: 7px 7px 0; }
  .card.featured .rar-tag::after { content: ""; }
  .filters { padding: 12px; }
  .filters > * { min-width: 0; }
  .filters .pill-row { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
  .sort-field { flex: 1 1 100%; }
  .sort-field select { flex: 1; }
}
