@import url("https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&text=%E4%B8%8D%E5%91%A8%E5%B1%B1&display=swap");
/* Mount Buzhou window (bm.js) - layout only, the rest is the kit (ui.css). Gate (no army inside): the owner's art,
   Marcellus title + brush 不周山 like the login seal. Outside: path bar | legends row | the army. Inside: the floor
   ladder | defenders | your legends. */
.bm-body{min-height:0;display:flex;flex-direction:column}
.bm-body>.bm-wait{margin:auto}
.bm-h{display:flex;align-items:baseline;gap:.6em;margin:0 0 .55em;font-weight:650;color:#f3e7c8}
.bm-h .fs-note{font-weight:400}
.bm-face{width:2.9em;height:2.9em;border-radius:50%;object-fit:cover;object-position:top;background:#000;flex:0 0 auto;box-shadow:0 0 0 1px rgba(227,179,86,.35)}
.bm-face.sm{width:2.3em;height:2.3em}
.bm-gen-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:.1em;text-align:left}
.bm-gen-t b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bm-gen-t i{font-style:normal;font-size:.82em;color:var(--fs-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bm-tr{display:flex;flex-direction:column;align-items:flex-end;gap:.1em;flex:0 0 auto;font-variant-numeric:tabular-nums}
.bm-tr b{font-weight:650}.bm-tr i{font-style:normal;font-size:.8em;color:var(--fs-dim)}

/* ---------- the gate (no army inside): the owner's mountain art full-bleed, the name, a little of the myth, Enter.
   The one bold moment of the window: the art settles in once, the text sits on a soft dusk scrim on the left. */
.bm-gatew .fs-win-head{position:absolute;inset:0 0 auto;z-index:2;border:0;background:none}
.bm-gatew .fs-win-head h3,.bm-gatew .fs-win-sub{display:none}
.bm-gatew .fs-win-tools .fs-wallet{display:none}
.bm-gatew .fs-win-head .fs-btn,.bm-gatew .fs-win-head .fs-iconbtn{background:rgba(14,12,22,.45);backdrop-filter:blur(4px);color:#f6ead0}
.bm-gatew .fs-win-foot{display:none}
.bm-gate{position:relative;flex:1;min-height:0;overflow:hidden;background:#2a2333}
.bm-gate-art{position:absolute;inset:0;background:url(bm/banner.webp) 62% 40%/cover no-repeat,url(bm/banner_small.webp) 62% 40%/cover no-repeat;
  animation:bm-settle 1.6s cubic-bezier(.22,1,.36,1) both}
.bm-gate-vid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:62% 40%;opacity:0;transition:opacity .8s ease}
.bm-gate-vid.on{opacity:1}
.bm-gate::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(20,14,26,.86) 0%,rgba(20,14,26,.62) 32%,rgba(20,14,26,.08) 62%,transparent 75%),
             linear-gradient(0deg,rgba(20,14,26,.55) 0%,transparent 30%)}
.bm-gate-text{position:absolute;z-index:1;left:3.2em;bottom:3em;width:min(31em,48%);display:flex;flex-direction:column;gap:.75em;color:#f6ead0;
  animation:bm-rise .9s .25s cubic-bezier(.22,1,.36,1) both}
.bm-gate-cn{font-family:"Ma Shan Zheng",serif;font-size:2.1em;line-height:1;color:#e9b75c;text-shadow:0 2px 12px rgba(0,0,0,.5)}
.bm-gate-text h2{margin:0;font-family:Marcellus,"Palatino Linotype",Georgia,serif;font-weight:400;font-size:3.3em;line-height:1.02;letter-spacing:.015em;
  color:#fbf1dc;text-shadow:0 2px 18px rgba(0,0,0,.55),0 0 1px rgba(0,0,0,.6)}
.bm-gate-text p{margin:0;max-width:36em;font-family:Marcellus,"Palatino Linotype",Georgia,serif;font-size:1.08em;line-height:1.6;color:rgba(251,241,220,.9);text-shadow:0 1px 6px rgba(0,0,0,.6)}
.bm-gate-text .bm-gate-sub{font-size:.98em;color:rgba(251,241,220,.72)}
.bm-gate-acts{display:flex;align-items:center;gap:1.1em;margin-top:.6em}
.bm-gate .fs-btn.bm-gate-go{min-width:9.5em;padding:.7em 1.6em;font-size:1.12em;letter-spacing:.02em;color:#20140a;background:linear-gradient(180deg,#f2cc72,#d9a443);box-shadow:0 6px 20px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.35)}
.bm-gate .fs-btn.bm-gate-go:hover:not(:disabled){color:#1a1006;background:linear-gradient(180deg,#f8d989,#e2ae4d)}
.bm-gate .fs-btn.bm-gate-go:focus-visible{outline:2px solid #fbf1dc;outline-offset:2px}
.bm-gate-ent{display:inline-flex;align-items:center;gap:.45em;font-size:.95em;color:rgba(251,241,220,.85);text-shadow:0 1px 6px rgba(0,0,0,.6)}
.bm-gate-ent b{font-size:1.1em;color:#fbf1dc;font-variant-numeric:tabular-nums}
@keyframes bm-settle{from{transform:scale(1.06);opacity:.4}to{transform:none;opacity:1}}
@keyframes bm-rise{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}

/* ---------- outside: path bar, ONE scrollable row of legends (owner), then the army with the room */
.bm-out{flex:1;min-height:0;display:flex;flex-direction:column;gap:.8em;padding:.8em .9em}
.bm-top{display:flex;flex-direction:column;gap:.4em}
.bm-pathbar{display:flex;align-items:center;gap:1em}
.bm-tabs{flex:0 1 30em}
.bm-tabs button{padding:.5em .9em;font-weight:600}
.bm-entries{margin-left:auto;display:inline-flex;align-items:center;gap:.45em;padding:.3em .35em .3em .7em;border-radius:8px;background:rgba(0,0,0,.25);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);white-space:nowrap}
.bm-entries b{font-variant-numeric:tabular-nums;color:#f6ead0}
.bm-pathdesc{margin:0;min-height:1.3em;font-size:.9em;color:rgba(232,230,227,.72)}
/* left: the legends, one vertical scrolling column (owner: "it needs to be a vertical column for the legends") */
.bm-main{flex:1;min-height:0;display:grid;grid-template-columns:15em minmax(0,1fr);gap:.9em}
.bm-strip{display:flex;flex-direction:column;min-height:0;padding-right:.9em;border-right:1px solid rgba(255,255,255,.06)}
.bm-strip .bm-h{margin-bottom:.45em}
.bm-strip-wait{padding:.9em 0}
.bm-chips{flex:1;min-height:0;display:flex;flex-direction:column;gap:.35em;overflow-y:auto;padding:.1em .3em .2em .1em}
.bm-chip{flex:0 0 auto;display:flex;align-items:center;gap:.55em;padding:.4em .55em;border-radius:10px;text-align:left;
  background:rgba(255,255,255,.035);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.bm-chip:hover:not(:disabled){background:rgba(255,255,255,.07)}
.bm-chip.on{background:rgba(227,179,86,.11);box-shadow:inset 0 0 0 1px rgba(227,179,86,.6)}
.bm-chip.off{opacity:.42;cursor:default}
.bm-chip-f{position:relative;flex:0 0 auto}
.bm-chip-f .bm-gen-n{position:absolute;right:-.3em;bottom:-.2em}
.bm-gen-n{width:1.45em;height:1.45em;display:grid;place-items:center;border-radius:50%;font-size:.8em;font-weight:800;color:#20140a;background:var(--fs-gold-hi);box-shadow:0 0 0 2px #16171b}

.bm-army{flex:1;min-height:0;display:flex;flex-direction:column}
.bm-army-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35em;border-radius:12px;color:var(--fs-dim);text-align:center;
  border:1px dashed rgba(227,179,86,.28);background:rgba(255,255,255,.015)}
.bm-army-empty b{color:#f3e7c8;font-weight:600}
/* one grid for the header and every row, so the columns line up */
.bm-cols,.bm-row{display:grid;grid-template-columns:2em minmax(8.5em,10.5em) minmax(17em,1fr) minmax(13.5em,17em) 5.8em;align-items:center;gap:.9em}
.bm-cols{padding:0 .8em .35em;color:var(--fs-dim)}
.bm-cols span{font-size:.8em}
.bm-rows{display:flex;flex-direction:column;gap:.45em;min-height:0;padding-right:.2em}
.bm-row{padding:.6em .8em;border-radius:12px;background:rgba(255,255,255,.035);box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.bm-ord{width:1.9em;height:1.9em;display:grid;place-items:center;border-radius:50%;font-weight:800;font-variant-numeric:tabular-nums;color:var(--fs-gold-hi);
  box-shadow:inset 0 0 0 1.5px rgba(227,179,86,.55)}
.bm-who{display:flex;align-items:center;gap:.6em;min-width:0}
.bm-trp{display:flex;flex-direction:column;gap:.35em;min-width:0}
.bm-trp-top{display:flex;gap:.4em}
.bm-trp-top .bm-sol{flex:1;min-width:0;padding:.35em .45em;color-scheme:dark}
.bm-trp-top .bm-num{width:5.4em;padding:.35em .45em;text-align:right;font-variant-numeric:tabular-nums}
.bm-trp-bot{display:flex;align-items:center;gap:.5em}
.bm-trp-note{font-size:.78em;color:var(--fs-dim);font-variant-numeric:tabular-nums}
.bm-max{flex:0 0 auto;padding:.1em .5em;border-radius:5px;font-size:.8em;font-weight:700;color:var(--fs-gold-hi);box-shadow:inset 0 0 0 1px rgba(227,179,86,.45)}
.bm-max:hover:not(:disabled){background:rgba(227,179,86,.15)}
.bm-max:disabled{opacity:.35;cursor:default}
/* the troop slider: gold up to the chosen share */
.bm-range{flex:1;min-width:0;height:1.2em;margin:0;background:none;-webkit-appearance:none;appearance:none;cursor:pointer;--p:0%}
.bm-range::-webkit-slider-runnable-track{height:.4em;border-radius:3px;background:linear-gradient(90deg,var(--fs-gold) var(--p),rgba(255,255,255,.1) var(--p))}
.bm-range::-moz-range-track{height:.4em;border-radius:3px;background:linear-gradient(90deg,var(--fs-gold) var(--p),rgba(255,255,255,.1) var(--p))}
.bm-range::-webkit-slider-thumb{-webkit-appearance:none;width:1em;height:1em;margin-top:-.3em;border-radius:50%;background:#f6ead0;box-shadow:0 0 0 2px var(--fs-gold),0 2px 6px rgba(0,0,0,.5)}
.bm-range::-moz-range-thumb{width:1em;height:1em;border:0;border-radius:50%;background:#f6ead0;box-shadow:0 0 0 2px var(--fs-gold),0 2px 6px rgba(0,0,0,.5)}
.bm-range:focus-visible{outline:1px solid var(--fs-gold);outline-offset:2px;border-radius:4px}
/* artefact picker: icons, the chosen one ringed in gold and named underneath */
.bm-art-pick{display:flex;flex-direction:column;gap:.3em;min-width:0}
.bm-art-icons{display:flex;flex-wrap:wrap;align-items:center;gap:.3em}
.bm-art-icons{gap:.4em}
.bm-art-icons .fs-cell{width:2.7em;height:2.5em;opacity:.55;transition:opacity .12s}
.bm-art-icons .fs-cell:hover{opacity:1}
/* the ring is an outline: an inset shadow would sit under the icon image */
.bm-art-icons .fs-cell.on{opacity:1;outline:2px solid var(--fs-gold-hi);outline-offset:2px;box-shadow:0 0 10px rgba(240,199,102,.35)}
.bm-none{height:2.5em;padding:0 .6em;border-radius:8px;font-size:.82em;color:var(--fs-dim);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.bm-none:hover{color:var(--fs-text)}
.bm-none.on{color:var(--fs-text);box-shadow:inset 0 0 0 2px var(--fs-gold-hi)}
.bm-art-name{font-size:.85em;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--fs-dim)}
.bm-move{display:flex;gap:.1em;justify-content:flex-end}
.bm-move .fs-iconbtn{width:1.85em;height:1.85em}
.bm-move .fs-iconbtn:disabled{opacity:.25;cursor:default;background:none;color:inherit}
@media (prefers-reduced-motion:reduce){.bm-gate-art,.bm-gate-text{animation:none}}

/* artefact chips (outside: the party; inside: your legends) */
.bm-arts{display:flex;flex-wrap:wrap;align-items:center;gap:.3em}
.bm-arts-k{font-size:.8em;color:var(--fs-dim);margin-right:.15em}
.bm-art{display:inline-flex;align-items:center;gap:.4em;max-width:100%;padding:.18em .55em .18em .2em;border-radius:7px;font-size:.86em;
  background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.bm-art>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bm-art .fs-cell{width:1.9em;height:1.75em;border-radius:5px}
.bm-art .fs-cell img{border-radius:5px}
.bm-art.none{padding:.35em .65em;color:var(--fs-dim)}
.bm-art:hover:not(:disabled){background:rgba(255,255,255,.08)}
.bm-art.on{background:rgba(227,179,86,.14);box-shadow:inset 0 0 0 1.5px var(--fs-gold-hi)}
.bm-art.on.none{color:var(--fs-text)}
.bm-art:disabled{opacity:.5;cursor:default}

/* ---------- inside: the trail up the mountain is the window's one bold piece */
.bm-in{flex:1;min-height:0;display:grid;grid-template-columns:9.5em minmax(0,1fr);gap:.9em;padding:.8em .9em}
.bm-ladder{position:relative;min-height:0;border-radius:12px;overflow:hidden;
  background:linear-gradient(180deg,rgba(18,14,24,.35),rgba(18,14,24,.78) 70%,rgba(18,14,24,.9)),url(bm/banner.webp) 63% 18%/auto 150% no-repeat,#211b29;
  box-shadow:inset 0 0 0 1px rgba(227,179,86,.18)}
.bm-trail{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.bm-trail polyline{fill:none;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.bm-trail .done{stroke:var(--fs-gold-hi);stroke-width:2.5;filter:drop-shadow(0 0 3px rgba(240,199,102,.55))}
.bm-trail .ahead{stroke:rgba(246,234,208,.45);stroke-width:1.5;stroke-dasharray:2 5}
.bm-stop{position:absolute;transform:translate(-50%,-50%);width:2.15em;height:2.15em;display:grid;place-items:center;border-radius:50%;
  font-weight:700;font-size:.92em;font-variant-numeric:tabular-nums;color:rgba(246,234,208,.7);background:rgba(18,14,24,.82);
  box-shadow:inset 0 0 0 1px rgba(246,234,208,.35)}
.bm-stop.done{color:#20140a;background:linear-gradient(180deg,#e9c06a,#c9953c);box-shadow:none}
.bm-stop.here{width:2.75em;height:2.75em;font-size:1.05em;color:#20140a;background:linear-gradient(180deg,#fbe2a0,#f0c766);
  box-shadow:0 0 0 3px rgba(18,14,24,.85),0 0 0 5px rgba(240,199,102,.7),0 0 18px rgba(240,199,102,.6);animation:bm-glow 2.4s ease-in-out infinite}
.bm-summit{position:absolute;left:50%;top:3.2%;transform:translateX(-50%);color:rgba(246,234,208,.75)}
.bm-summit .ic{width:1.4em;height:1.4em;fill:rgba(246,234,208,.18)}
@keyframes bm-glow{50%{box-shadow:0 0 0 3px rgba(18,14,24,.85),0 0 0 5px rgba(240,199,102,.45),0 0 26px rgba(240,199,102,.85)}}
@media (prefers-reduced-motion:reduce){.bm-stop.here{animation:none}}
.bm-floor{display:flex;flex-direction:column;gap:.7em;min-height:0}
.bm-floor-h b{font-size:1.2em;font-weight:650;color:#f3e7c8}
.bm-floor-h p{margin:.25em 0 0;max-width:70ch;line-height:1.45}
.bm-sides{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:.9em}
.bm-col{display:flex;flex-direction:column;min-height:0}
.bm-foes,.bm-mine{display:flex;flex-direction:column;gap:.4em;min-height:0}
.bm-foe{display:flex;align-items:center;gap:.6em;padding:.45em .65em;border-radius:10px;background:rgba(255,107,94,.045);box-shadow:inset 0 0 0 1px rgba(255,107,94,.13)}
.bm-me{display:flex;flex-direction:column;gap:.5em;padding:.55em .65em;border-radius:10px;background:rgba(255,255,255,.035);box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.bm-me-h{display:flex;align-items:center;gap:.6em}
.bm-foot-note{max-width:40em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fs-win-foot .fs-btn .ic{width:1.05em;height:1.05em}
.bm-clear{display:flex;flex-direction:column;gap:.3em;margin:auto 0}
.bm-clear b{font-size:1.1em;font-weight:650;color:var(--fs-gold-hi)}

/* ---------- reinforce dialog (a small window over Mount Buzhou) */
.bmr-body{display:flex;flex-direction:column;gap:.45em;padding:.75em .85em}
.bmr-tal{display:flex;align-items:center;gap:.6em;padding:.45em .55em;margin-bottom:.2em;border-radius:9px;background:rgba(0,0,0,.25);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.bmr-tal>span:nth-child(2){flex:1;display:flex;flex-direction:column}
.bmr-tal b{font-weight:600}.bmr-tal i{font-style:normal;font-size:.85em;color:var(--fs-dim)}
.bmr-tal .fs-cell{width:2.4em;height:2.25em}
.bmr-row{display:grid;grid-template-columns:auto minmax(0,1fr) 10.5em 5.6em auto auto;align-items:center;gap:.45em;padding:.35em .45em;border-radius:9px}
.bmr-row.on{background:rgba(227,179,86,.08);box-shadow:inset 0 0 0 1px rgba(227,179,86,.3)}
.bmr-row .bm-sol,.bmr-row .bm-num{padding:.33em .4em;color-scheme:dark}
.bmr-row .bm-num{text-align:right;font-variant-numeric:tabular-nums}
.bmr-of{white-space:nowrap;font-variant-numeric:tabular-nums}

/* native dropdown lists: dark like the window (the browser's default list was white with the window's light text) */
.bm select option,.bmr select option{background:#1b1c21;color:#e8e6e3}
.bm select option:disabled,.bmr select option:disabled{color:rgba(232,230,227,.35)}
