/* 店：品の行・パック・身代わり人形・鍛冶屋・強化 */
/* 読み込む順番に意味がある（後のファイルが前の規則を上書きする）。並べ方は tools/css/regroup.mjs が決める */
.shop {
  display: grid;
  gap: 8px;
  margin-block: 14px;
}
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--wall);
  border: 1px solid var(--wall-hi);
  text-align: left;
}
.item:disabled {
  opacity: 0.45;
  cursor: default;
}
.item .nm {
  font-size: 15px;
}
.item .ds {
  font-size: 12px;
  color: var(--dim);
  grid-column: 1;
}
.item .pr {
  grid-row: span 2;
  grid-column: 2;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.lnew {
  margin: 6px 0 0;
  color: var(--torch);
  font-size: 13px;
}
.packs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.item.pack {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.item.pack .pr {
  grid-row: auto;
  grid-column: auto;
  color: var(--ink);
}
.doll {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--torch);
  background: #2a2415;
}
.item.shopit {
  grid-template-columns: 44px 1fr auto;
}
.item.shopit .sic {
  grid-row: span 2;
  display: grid;
  place-items: center;
}
.item.shopit .sic .spr {
  width: 40px;
  height: 40px;
}
.item.shopit .nm,
.item.shopit .ds {
  grid-column: 2;
}
.item.shopit .pr {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--gem);
}
.item.pack .pic .spr {
  width: 46px;
  height: 46px;
}
.invamt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 14px;
}
.invamt input {
  width: 7em;
  padding: 6px 8px;
  background: #11141a;
  color: var(--ink);
  border: 1px solid var(--wall-hi);
  font: inherit;
}
.buyp {
  font-size: 20px !important;
  color: var(--gem) !important;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.item.deal {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-color: var(--torch);
  background: linear-gradient(#2a2415, #211d14);
  text-align: left;
}
.item.deal .pic .spr {
  width: 40px;
  height: 40px;
}
.item.deal .nm {
  display: grid;
  gap: 2px;
}
.item.deal .nm b {
  font-weight: 400;
  color: var(--torch);
  font-size: 16px;
}
.item.deal .nm small {
  font-size: 12px;
  color: var(--dim);
}
.item.deal .pr {
  color: var(--ink);
  grid-row: auto;
  grid-column: auto;
}
.item.deal.pass {
  border-color: var(--gem);
  background: linear-gradient(#17222e, #141b24);
}
.item.deal.pass .nm b {
  color: var(--gem);
}
.item.deal.evpass {
  border-color: #6b4a86;
  background: linear-gradient(#2a1f33, #221a2b);
}
/* 救援を頼む枠：ボタンを文の下に横いっぱいで置き、文の幅を広く取る */
.doll.resq {
  grid-template-columns: auto 1fr;
}
.town .item:not(:disabled):active,
.town .evcard:active,
.town .bk:active,
.town .stabs button:active,
.town .btn:not(:disabled):active {
  transform: translateY(2px);
  filter: brightness(1.15);
}
.town .item .nm,
.town .dcard .dname {
  text-shadow: 1px 1px 0 #000;
}
.town .item .pr {
  color: #ffd77a;
  text-shadow:
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
}
/* 鍛冶屋：装備の段。開いていない段は赤字で「地下N階で買える」 */
.glock {
  color: #ff7a6a;
  font-size: 11px;
  white-space: nowrap;
}
.gon {
  font-size: 10px !important;
  color: #ffe2a0 !important;
}
.town .item.on {
  border-image-source: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAV0lEQVR4nGNkYGBgEOFh+c+AA7z58oeREabg9Y1JGApENfLANBNcwadHGLgiQASsiAWm6+Gls7hshJhECBClCG7dhQt3cSqC+w7mSGTQseENRBGIIBROADiCIavHs3DWAAAAAElFTkSuQmCC") !important;
  color: #241505;
}
.town .item.on .ds {
  color: #5a3a10;
}
.town .item:disabled .glock {
  opacity: 1;
}
.upn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0;
}
.upn .btn {
  flex: none;
  min-width: 44px;
  padding: 4px 10px;
}
/* 気配の数え方の見本（地下5階・15階に初めて着いたとき） */
.wh {
  display: grid;
  justify-items: center;
  text-align: center;
  margin: 6px 0;
}
.wh-g {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 4px;
}
.wh-c .spr {
  width: 42px;
  height: 42px;
}
.wh-b {
  position: absolute;
  top: 1px;
  right: 2px;
  font-style: normal;
  font-size: 10px;
  padding: 0 3px;
  color: #ffd2a1;
  background: rgba(40, 20, 10, 0.9);
}
/* 装備中の段は押せないが、薄くしない（金の札の上の文字が読めなくなる）。暗い札用の黒い影は、金の札では文字が二重に見えるので明るい影にする */
.town .item.on:disabled {
  opacity: 1 !important;
}
.town .item.on .nm {
  color: #241505;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
.town .item.on .gon {
  text-shadow: none;
}
.town .item.on .ds {
  color: #3a2408 !important;
}
.town .item.on .gon {
  border-image-source: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAASklEQVR4nGNkYGBgEOFh+Q+ikcGbL38YGUESR2Z5okhs2XefoWPFDQYWmIBN3vk3MHZFgIAIiGZCNw4Z4JUEGwuyA2YUMmDE51oAvE0VwRr+EREAAAAASUVORK5CYII=") !important;
  color: #ffe2a0 !important;
}
.lnew {
  display: grid;
  gap: 6px;
  margin: 6px 0;
}
.lni .spr {
  width: 44px;
  height: 44px;
}
.code,
.invamt input,
.nmin,
.inqf select,
.inqf textarea,
.inqf input,
.codebox input {
  border: 6px solid transparent !important;
  border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAQklEQVR4nGNkYGBgEOFh+c+AA7z58oeRCaTg0282Bmw4zUsBbAALTAcHJw8uwxiYcMoMnCKww0v8pfAqYgQRhMIJAHhfF9dO9f9EAAAAAElFTkSuQmCC") 3 fill / 6px !important;
  background: none !important;
  image-rendering: pixelated;
  border-radius: 0;
}
.wh-c {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--floor);
  box-shadow: inset 0 0 0 2px #140a04;
}
.lnr {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border: 6px solid transparent;
  border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAZUlEQVR4nGNkYGBgEOFh+c+AA7z58oeREabg0CwvDAV2advANCNIEUhBwTI+DEUmXCcYZm17wMACE7h7+zqmIn0IzYTLLciAKEVw696/fYlFmgPhcBAjzUsBQwnI0WBFIIJQOAEAqjYdOqenZDAAAAAASUVORK5CYII=") 3 fill / 6px;
  image-rendering: pixelated;
}
.lnr p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
.lni {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--floor);
  box-shadow: inset 0 0 0 2px #140a04;
}
/* ===== shop（店）・3段目 ===== */
.doll small {
  color: var(--dim);
}
/* ===== shop（店）・4段目 ===== */
.upn b {
  min-width: 3.5em;
  text-align: center;
  font-size: 18px;
}
.wh-c b {
  font-size: 24px;
}
.lnr b {
  font-size: 14px;
  color: #ffd77a;
}

/* 情報屋 */
.info-say {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 12px;
  padding: 12px 14px;
  background: #1b1f28;
  border: 1px solid #8a6a36;
  border-radius: 10px;
}
.info-say p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.info-who {
  flex: none;
  padding: 2px 10px;
  background: #5a2a4a;
  color: #ffd36b;
  border-radius: 6px;
  font-size: 13px;
}
.rainbow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 0 0 12px;
}
.rb {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 0 4px;
  background: #13161d;
  border: 1px solid #2c3140;
  border-radius: 8px;
}
.rb.on {
  border-color: #8a6a36;
}
.rb small {
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}
.rb .spr {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.rb small {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
}
.info-rb {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #13161d;
  border: 1px dashed #3a4050;
  border-radius: 10px;
  opacity: 0.65;
}
.info-rb.on {
  opacity: 1;
  border: 1px solid #c9963f;
}
.info-rb b {
  display: block;
  color: #ffd36b;
}
.info-rb small {
  font-size: 12px;
}
.rb-big {
  width: 56px;
  height: 56px;
  flex: none;
}
.rb-q {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #3a4050;
  font-size: 22px;
}
.info-used {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
}
.info-used div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 10px;
  background: #13161d;
  border-radius: 6px;
  font-size: 13px;
}
.info-used b {
  color: #ffd36b;
}

/* 飾り棚：今置いた品をポンと置く */
.slot.just .spr,
.sti.just .spr {
  animation: putpop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.slot.just {
  animation: putglow 0.7s ease-out;
}
@keyframes putpop {
  0% {
    transform: translateY(-26px) scale(0.6);
    opacity: 0;
  }
  60% {
    transform: translateY(2px) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: none;
  }
}
@keyframes putglow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 211, 107, 0.9);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(255, 211, 107, 0);
  }
}
