/* Lakbay market: the stall, the price tag, the Palengke dock, the Tiangge and the spirit cards. Classes start with lk-.
   The spirit card CSS is design F (Salapi), copied from the design board and scoped under .lk-sc. */

/* the stall on the walk map, and the price tag that rises on approach */
.lk-spot.market::before { display: none; }
.lk-stall { position: absolute; left: -44px; top: -74px; width: 88px; height: 78px; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
.lk-stall svg, .lk-stall img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lk-lab.lk-price { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-color: var(--cream); background: #4a3258; }
.lk-lab.lk-price .lk-art { width: 34px; height: 34px; flex: none; border-radius: 8px; background: #3b2947; border: 2px solid #5d4470; overflow: hidden; }
.lk-lab.lk-price .lk-art img { width: 100%; height: 100%; object-fit: contain; }
.lk-lab.lk-price span { display: grid; text-align: left; line-height: 1.15; }
.lk-lab.lk-price small { font-size: 11px; color: var(--muted); font-weight: 800; }

/* item pictures made of an image */
.lk-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lk-cn { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; white-space: nowrap; }
.lk-cn i { width: 13px; height: 13px; border-radius: 50%; background: #f0c23c; border: 2px solid #8a5f1a; box-sizing: border-box; flex: none; }

/* the dock: a panel along the bottom, the walk map stays visible above it */
.lk-center:has(> .lk-dock) { background: none; pointer-events: none; place-items: end center; padding: 0 12px 12px; overflow: visible; }
.lk-card.lk-dock { pointer-events: auto; position: relative; width: min(920px, 100%); max-height: 62%; text-align: left; gap: 8px; padding: 12px 16px; }
.lk-dock > h2 { font-size: 22px; padding-right: 150px; }
.lk-dock .lk-dcoins { position: absolute; top: 14px; right: 52px; }
.lk-dock > .lk-x { top: 10px; right: 10px; }
.lk-dmain { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.lk-art.lk-dtile { width: 84px; height: 84px; border-radius: 12px; background: #3b2947; border: 2px solid #5d4470; overflow: hidden; }
.lk-dinfo { display: grid; gap: 2px; min-width: 0; }
.lk-dinfo b { font: 700 20px Fredoka, sans-serif; color: var(--cream); }
.lk-dinfo small { color: var(--muted); font-weight: 700; }
.lk-dinfo p { margin: 0; font-size: 13px; }
.lk-dbuy { display: grid; gap: 8px; justify-items: stretch; }
.lk-step { display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--amber); border-radius: 999px; overflow: hidden; background: var(--plum); }
.lk-step b { min-width: 34px; text-align: center; }
.lk-step button { width: 34px; height: 32px; border: 0; background: #3b2947; font-weight: 800; font-size: 18px; }
.lk-step button:hover { background: #4a3258; }
.lk-dsell { display: grid; gap: 6px; border-top: 1px dashed #5d4470; padding-top: 8px; min-height: 0; }
.lk-dsell > b { font-size: 13px; color: var(--muted); }
.lk-sells { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow: auto; }
.lk-sell { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; background: var(--plum-d); border: 2px solid var(--amber); border-radius: 10px; }
.lk-sell:hover { background: #3b2947; }
.lk-sell .lk-art { width: 30px; height: 30px; flex: none; }
.lk-sell span { display: grid; text-align: left; line-height: 1.1; font-size: 13px; }
.lk-sell small { color: var(--muted); font-size: 11px; }
.lk-dfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lk-dfoot small { color: var(--muted); }
.lk-dfoot .lk-btn { display: inline-flex; align-items: center; gap: 6px; }
.lk-dfoot .lk-ic svg { width: 18px; height: 18px; }
.lk-say { min-height: 1.3em; font-size: 13px; }

/* the Tiangge */
.lk-card.lk-tg { width: min(980px, 100%); height: 100%; text-align: left; grid-template-rows: auto auto 1fr; gap: 8px; }
.lk-tg > h2 { display: none; }
.lk-tgtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 36px; }
.lk-tgtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lk-tgtabs button { border-radius: 10px 10px 0 0; border: 2px solid var(--amber); border-bottom: 0; background: var(--plum); padding: 6px 14px; font-weight: 800; }
.lk-tgtabs button.on { background: var(--amber); color: #3a1a05; }
.lk-tgpane { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 10px; }
.lk-tgpane h3 { font-size: 16px; }
.lk-tgcols { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 14px; align-items: start; }
.lk-tgmap { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: #1c1222; border: 2px solid #5d4470; }
.lk-tgmap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lk-tgpin { position: absolute; transform: translate(-50%, -50%); padding: 0; border: 2px solid var(--ink); background: var(--amber); color: #3a1a05; border-radius: 999px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; box-shadow: 0 0 0 3px rgba(224, 160, 80, .35); }
.lk-tgpin b { padding: 0 6px; }
.lk-tgpin span { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); display: none; padding: 2px 8px; background: var(--plum); color: var(--cream); border: 2px solid var(--amber); border-radius: 8px; font-size: 12px; white-space: nowrap; z-index: 2; }
.lk-tgpin:hover span, .lk-tgpin:focus-visible span, .lk-tgpin.on span { display: block; }
.lk-tgpin.on { background: var(--cream); box-shadow: 0 0 0 3px var(--amber); }
.lk-tgright { display: grid; gap: 8px; min-width: 0; }
.lk-tgchips { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-tgchips button { padding: 3px 12px; border-radius: 999px; border: 2px solid var(--amber); background: var(--plum); font-weight: 800; font-size: 13px; }
.lk-tgchips button.on { background: var(--amber); color: #3a1a05; }
.lk-tglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.lk-li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--plum-d); border-radius: 9px; }
.lk-li .lk-art { width: 40px; height: 40px; flex: none; border-radius: 8px; background: #3b2947; border: 2px solid #5d4470; overflow: hidden; }
.lk-li .lk-g { flex: 1; min-width: 0; display: grid; }
.lk-li b { color: var(--cream); font-weight: 800; line-height: 1.2; }
.lk-li small { color: var(--muted); font-size: 12px; line-height: 1.25; }
.lk-pr { display: grid; justify-items: end; white-space: nowrap; }
.lk-mini .lk-sp { width: 100%; height: 100%; object-fit: contain; }
.lk-mut { color: var(--muted); font-size: 12px; margin: 0; }
.lk-pform { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lk-pform > span { display: grid; }
.lk-pform input { width: 84px; padding: 5px 8px; border-radius: 8px; border: 2px solid var(--amber); background: var(--plum); color: var(--cream); font: 800 14px Nunito, sans-serif; }

/* spirit cards in the Passport and on the result screen */
.lk-scsec { display: grid; gap: 8px; margin-top: 6px; }
.lk-scgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lk-scsm { display: grid; justify-items: center; }
.lk-scsm .card { zoom: .55; }
.lk-screveal { display: grid; justify-items: center; gap: 6px; }
.lk-screveal small { font-weight: 800; color: var(--cream); }
.lk-scbig { --rest-x: 7deg; --rest-y: -17deg; }
.lk-scbig .card { zoom: .6; }
.lk-screveal.fly .lk-scbig { animation: lksc-reveal .7s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes lksc-reveal { from { opacity: 0; transform: translateY(24px) rotateY(90deg) scale(.8); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lk-screveal.fly .lk-scbig { animation: none; } }

@media (max-width: 640px) {
  .lk-card.lk-dock { max-height: 70%; padding: 10px 12px; }
  .lk-dock > h2 { font-size: 18px; padding-right: 100px; }
  .lk-dock .lk-dcoins { right: 46px; top: 12px; }
  .lk-dmain { grid-template-columns: auto 1fr; }
  .lk-dbuy { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; }
  .lk-art.lk-dtile { width: 60px; height: 60px; }
  .lk-tgcols { grid-template-columns: 1fr; }
  .lk-tgmap { width: min(100%, 230px); margin: 0 auto; }
  .lk-li { flex-wrap: wrap; }
  .lk-pform { justify-content: flex-start; }
}

@media (max-height: 460px) {
  .lk-card.lk-dock { max-height: 78%; gap: 5px; padding: 8px 12px; }
  .lk-dinfo p, .lk-dinfo > small:nth-of-type(1) { display: none; }
  .lk-art.lk-dtile { width: 54px; height: 54px; }
  .lk-sells { max-height: 56px; }
  .lk-dfoot small { display: none; }
}
.lkb-result:has(.lk-screveal) .lkb-art { height: 72px; } .lkb-result:has(.lk-screveal) .lkb-art > * { height: 72px; width: 72px; object-fit: contain; }
