/* 地图数据库：列表缩略图 / 详情小地图 / NPC / 商店 / 传点布局。
   骨架与列表、详情、掉落卡片复用 items.css；这里只补地图特有的部分。 */

/* 列表：小地图比物品图标大一号，行首留 64px */
li.item-row { grid-template-columns: 64px minmax(0, 1fr); }
.item-icon.map-thumb {
  width: 56px; height: 56px; border-radius: 9px;
  background: #0c0f14;
}
.item-icon.map-thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 5px; }
.item-icon.map-thumb svg { width: 30px; height: 30px; color: var(--accent); }
.item-icon.map-thumb.noimg { background: #12151b; }

/* 分类色：与物品分类同一种表达，不新增图例 */
.badge.map-city { color: #9ece6a; }
.badge.map-field { color: #73daca; }
.badge.map-dungeon { color: #bb9af7; }
.badge.map-instance { color: #7aa2f7; }
.badge.map-castle { color: #e0af68; }
.badge.map-battleground { color: #f7768e; }
.badge.map-other { color: #9aa3b2; }

/* 详情头：128px 小地图 + 标题 */
.dicon.mapicon {
  width: 128px; height: 128px; border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, #1b2029, #0b0e13 74%);
  padding: 4px;
}
.dicon.mapicon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.dicon.mapicon svg { width: 58px; height: 58px; color: var(--accent); }

.subhead { margin: 0 0 6px; font-size: 12px; color: var(--fg-dim); font-weight: 600; letter-spacing: .4px; }
.dim { color: var(--fg-dim); font-size: 11.5px; }

/* 传点：出口 / 入口两栏，窄屏上下堆叠 */
.warp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.warptable { font-size: 12.5px; }
.warptable td, .warptable th { padding: 5px 7px; text-align: center; }
.warptable td:nth-child(1), .warptable td:nth-child(2), .warptable td:nth-child(4) { white-space: nowrap; }
.warptable th { white-space: nowrap; }
.warptable td:nth-child(3) { min-width: 130px; }
.warptable .dim { margin-left: 4px; }

/* NPC 表：与上方出口表同宽；名称/类型/坐标分别对齐出口/目的地/目标坐标 */
.npctable { font-size: 12.5px; width: calc(50% - 6px); table-layout: fixed; }
.npctable td, .npctable th { padding: 5px 7px; text-align: center; }
.npctable th:nth-child(1) { width: 22%; }
.npctable th:nth-child(2) { width: 14%; }
.npctable th:nth-child(3) { width: 49.5%; }
.npctable th:nth-child(4) { width: 14.5%; }
.npctable td:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npctable .npc-spacer { padding: 0; border: 0; }
.taglist .drop-inline { flex-basis: 100%; }
.tag.open { border-color: var(--accent); color: var(--fg); }
.npc-more, .shop-more, .drop-more { margin: 4px 0 8px; }
.npc-more summary, .shop-more summary, .drop-more summary {
  cursor: pointer; color: var(--accent); font-size: 12.5px; padding: 4px 0;
}

/* 商店卡片：一间店一张卡，商品按网格铺开 */
.shop-card {
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elev2);
  padding: 9px 11px; margin-bottom: 9px;
}
.shop-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.shop-sprite {
  width: 44px; height: 44px; flex: none; border-radius: 8px;
  border: 1px solid var(--line); background: #12151b;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.shop-sprite img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shop-sprite-ph, .shop-sprite.no-img { color: var(--fg-dim); font-size: 14px; }
.shop-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.shop-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.shop-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 7px;
  align-items: center; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg-elev); color: inherit; text-decoration: none; min-width: 0;
}
.shop-item:hover { border-color: var(--accent-dim); background: var(--bg-elev2); }
.shop-item img { width: 28px; height: 28px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; background: #12151b; }
.shop-noimg {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 5px; color: var(--fg-dim); font-size: 11px;
}
.shop-item-name { font-size: 12px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-item-price { grid-column: 2; font-family: var(--mono); font-size: 10.5px; color: var(--fg-dim); }

/* 刷新卡片沿用 drops 网格；小地图在窄屏仍然有足够的详情宽度 */
@media (max-width: 1100px) {
  .shop-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .warp-cols { grid-template-columns: 1fr; }
  .warptable { width: 100%; }
  .npctable { width: 100%; }
  .dicon.mapicon { width: 96px; height: 96px; }
  .dicon.mapicon img { width: 100%; height: 100%; }
  .shop-items { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  li.item-row { grid-template-columns: 60px minmax(0, 1fr); }
  .item-icon.map-thumb { width: 54px; height: 54px; }
  .item-icon.map-thumb img { width: 50px; height: 50px; }
}
