/* 物品博物馆 —— 与 moleworld.net 同一套设计语言(绿/草地渐变/胶囊/白卡片)。 */
:root {
  --green: #5bb56a; --green-d: #469256; --blue: #3a9fe0; --blue-d: #2b82bd;
  --ink: #2b3a2f; --muted: #6b7d70; --card: #fff; --soft: #eef7ef; --line: #d7e4da;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); line-height: 1.55;
  font-family: -apple-system, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #bfe6ff 0%, #dff3e4 26%, #f3faf3 52%, #eef7ef 100%) fixed;
  min-height: 100vh;
}
a { color: var(--green-d); text-decoration: none; }

/* 站点顶栏 */
.site-bar {
  width: min(1200px, 100%); margin: 0 auto;
  padding: 16px 18px 0; display: flex; justify-content: space-between; align-items: center;
}
.site-bar .brand { font-size: 1.32rem; font-weight: 800; color: var(--green-d); }
.site-bar .back {
  background: rgba(255, 255, 255, .78); border-radius: 999px; padding: .42rem 1.15rem;
  font-size: .9rem; font-weight: 700; color: var(--green-d); box-shadow: 0 1px 6px #0001;
  transition: background .15s, transform .12s;
}
.site-bar .back:hover { background: #fff; transform: translateY(-1px); }

/* 标题 + 搜索 */
.museum-head { width: min(1200px, 100%); margin: 0 auto; padding: 18px 18px 6px; text-align: center; }
.museum-head h1 { color: var(--green-d); font-size: 2rem; margin: .2rem 0 .1rem; letter-spacing: 1px; }
.museum-head p { color: var(--muted); margin: 0 0 14px; font-size: 1rem; }
.search-wrap { max-width: 520px; margin: 0 auto; }
#search {
  width: 100%; font: inherit; font-size: 1.05rem; padding: .75rem 1.2rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  box-shadow: 0 3px 14px #0001; transition: border-color .15s, box-shadow .15s;
}
#search:focus { outline: none; border-color: var(--green); box-shadow: 0 4px 18px rgba(70, 146, 86, .18); }

/* 分类胶囊 tab */
.cat-tabs {
  width: min(1200px, 100%); margin: 14px auto 4px; padding: 0 18px;
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.cat-tabs .ct {
  background: rgba(255, 255, 255, .72); border: none; color: var(--muted);
  font: inherit; font-size: .92rem; font-weight: 700; padding: .42rem 1.05rem;
  border-radius: 999px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cat-tabs .ct:hover { color: var(--green-d); }
.cat-tabs .ct.active {
  background: linear-gradient(180deg, var(--green), var(--green-d)); color: #fff;
  box-shadow: 0 4px 14px rgba(70, 146, 86, .35);
}
.cat-tabs .ct .n { opacity: .7; font-weight: 600; margin-left: .25rem; font-size: .82em; }

/* 网格 */
.stage { width: min(1200px, 100%); margin: 0 auto; padding: 14px 18px 40px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px;
}
.card {
  background: var(--card); border-radius: 14px; padding: 10px 8px 8px; text-align: center;
  box-shadow: 0 2px 10px #0001; cursor: pointer; transition: transform .12s, box-shadow .12s;
  border: 1.5px solid transparent;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(70, 146, 86, .18); border-color: #cfe6d5; }
.card .thumb {
  width: 100%; height: 84px; display: flex; align-items: center; justify-content: center;
  background: #f3faf5; border-radius: 10px; overflow: hidden;
}
.card .thumb img { max-width: 100%; max-height: 100%; image-rendering: -webkit-optimize-contrast; }
.card .thumb.miss { color: #b9ccbe; font-size: 1.8rem; }
.card .nm { margin-top: 6px; font-size: .86rem; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .id { font-size: .72rem; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 1.1rem; }

/* 场景区 */
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.scene-card { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: 0 2px 10px #0001; }
.scene-card h3 { margin: 0 0 8px; color: var(--green-d); font-size: 1.05rem; }
.scene-card .pic { background: #cdeccd; border-radius: 12px; overflow: auto; max-height: 360px; }
.scene-card .pic img { display: block; width: 100%; }

/* 详情弹窗 */
.modal { position: fixed; inset: 0; background: rgba(43, 58, 47, .5); display: flex;
  align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 20px; max-width: 560px; width: 100%;
  max-height: 88vh; overflow: auto; position: relative; box-shadow: 0 20px 60px #0004;
  animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: none } }
.modal-close { position: absolute; top: 12px; right: 12px; border: none; background: var(--soft);
  color: var(--muted); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.modal-close:hover { background: #e0efe3; color: var(--ink); }
.modal-body { display: flex; gap: 18px; padding: 26px 24px 24px; flex-wrap: wrap; }
.modal-thumb { flex: 0 0 180px; min-height: 180px; background: #f3faf5; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal-thumb img { max-width: 100%; max-height: 240px; image-rendering: -webkit-optimize-contrast; }
.modal-info { flex: 1 1 240px; min-width: 0; }
.modal-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-title h2 { margin: 0; color: var(--green-d); font-size: 1.5rem; }
.id-badge { background: var(--soft); color: var(--green-d); font-weight: 700; font-size: .82rem;
  padding: .2rem .6rem; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { background: var(--soft); color: var(--green-d); font-size: .78rem; font-weight: 600;
  padding: .24rem .66rem; border-radius: 999px; }
.chip.spec { background: #fff3e0; color: #9a6a16; }
.chip.cat { background: linear-gradient(180deg, var(--green), var(--green-d)); color: #fff; }
.modal-desc { color: var(--ink); font-size: .95rem; margin: 8px 0 14px; line-height: 1.7; }
.modal-stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.modal-stats dt { color: var(--muted); }
.modal-stats dd { margin: 0; font-weight: 600; }

.museum-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 10px 16px 30px; line-height: 1.7; }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .modal-body { padding: 22px 16px 18px; }
}

/* ── D: 版本徽标 / 变体切换 / 版本时间线 ── */
.card .thumb { position: relative; }
.vbadge { position: absolute; left: 4px; bottom: 4px; background: rgba(70,146,86,.85); color: #fff;
  font-size: .64rem; font-weight: 700; padding: 1px 5px; border-radius: 6px; }
.mbadge { position: absolute; right: 4px; top: 4px; background: #e8913a; color: #fff;
  font-size: .62rem; font-weight: 700; padding: 1px 5px; border-radius: 6px; }

.modal-thumb { position: relative; }
.vswitch { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center;
  justify-content: space-between; gap: 6px; background: rgba(43,58,47,.72); border-radius: 999px; padding: 3px 6px; }
.vbtn { border: none; background: rgba(255,255,255,.92); color: var(--green-d); width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1; font-weight: 800; }
.vbtn:hover { background: #fff; }
.vlabel { color: #fff; font-size: .76rem; font-weight: 700; text-align: center; flex: 1; }
.chip.ver { background: #dbeafe; color: #2b6cb0; }
.chip.mv { background: #fde3c4; color: #9a5a16; }

.ver-timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.vcard { background: var(--card); border-radius: 14px; padding: 8px; box-shadow: 0 2px 10px #0001;
  border: 1.5px solid transparent; }
.vcard.hot { border-color: #e8913a; }
.vshot { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #eef7ef; }
.vshot img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.vshot .vicon { position: absolute; right: 6px; bottom: 6px; width: 38px; height: 38px;
  aspect-ratio: 1; border-radius: 9px; box-shadow: 0 2px 8px #0004; border: 2px solid #fff; }
.vcard .vlab { margin-top: 7px; font-size: .9rem; font-weight: 800; color: var(--green-d); }
.vcard .vlab .chg { display: inline-block; background: #fde3c4; color: #9a5a16; font-size: .64rem;
  padding: 1px 6px; border-radius: 6px; font-weight: 700; vertical-align: middle; }
.vcard .vlab .chg.load { background: #cfe9ff; color: #1f6aa6; }
.vcard .vnote { margin-top: 4px; font-size: .68rem; color: var(--muted); line-height: 1.4;
  max-height: 4.3em; overflow: hidden; }

/* ── 音频:网格徽标 + 弹窗播放框 ── */
.abadge { position: absolute; left: 4px; top: 4px; background: #3a9fe0; color: #fff;
  font-size: .62rem; font-weight: 700; padding: 1px 5px; border-radius: 6px; line-height: 1.3; }
.audio-box { margin-top: 14px; }
.audio-box[hidden] { display: none; }
.audio-h { font-size: .82rem; font-weight: 800; color: var(--blue-d); margin-bottom: 6px; }
.audio-list { display: flex; flex-wrap: wrap; gap: 6px; }
.arow { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line);
  background: #f2f9ff; color: var(--ink); font: inherit; font-size: .82rem; font-weight: 600;
  padding: .3rem .7rem .3rem .5rem; border-radius: 999px; cursor: pointer; transition: all .12s; }
.arow:hover { border-color: var(--blue); background: #e6f4ff; }
.arow .aplay { display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff;
  font-size: .66rem; line-height: 1; }
.arow .alabel { white-space: nowrap; }
