/* 🏰 城主調稅率（js/npc.js castleHtml／taxConfirm，伺服器本機改動第 122 項）：城堡侍從長 NPC 視窗的「城堡」分頁。
   上面一列城堡名、現行稅率、公庫；中間 －／大數字／＋ 和拉條；下面「標價 100 玩家實付」卡片、三種稅的拆法、金色「確定」。
   確認視窗疊在 NPC 視窗裡（.tax-ov）。商店購買清單上方的「本城稅率 ○%」也在這裡（.npw-taxline）。
   手機直式、電腦（pcui.css 把 NPC 視窗變成左邊的小視窗）照下面；手機橫式（max-height 500）全部縮小 */

#npc-window .tax-start { display: flex; justify-content: center; padding: 24px 8px; }
#npc-window .tax-open { min-width: 60%; padding: 12px 18px; font-size: 17px; letter-spacing: .15em; }
#npc-window .tax-msg { text-align: center; }

#npc-window .tax-box { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
#npc-window .tax-now { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 10px;
  border: 1px solid #4a3c29; border-radius: 6px; background: linear-gradient(180deg, rgba(42,33,22,.95), rgba(22,17,11,.95)); font-size: 14px; color: #c9b98f; }
#npc-window .tax-now b { color: #f4efe3; font-size: 16px; }
#npc-window .tax-now .tax-castle { color: #f3d48a; font-size: 16px; font-weight: 700; letter-spacing: .12em; text-shadow: 0 1px 0 #000; }
#npc-window .tax-now .tax-gold { color: #facc15; }

/* －／大數字／＋ */
#npc-window .tax-pick { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 4px; }
#npc-window .tax-step { width: 46px; height: 40px; padding: 0; font-family: inherit; font-size: 22px; font-weight: 700; line-height: 1; color: #fde68a; border: 1px solid #8a6a2c; border-radius: 6px; cursor: pointer;
  background: linear-gradient(180deg, #4a3514, #261a08); box-shadow: inset 0 1px rgba(255,230,160,.15), 0 2px 6px rgba(0,0,0,.5); touch-action: manipulation; }
#npc-window .tax-step:active:not(:disabled) { filter: brightness(1.3); }
#npc-window .tax-step:disabled { opacity: .3; cursor: default; }
#npc-window .tax-val { min-width: 3.4em; text-align: center; color: #e8dcc0; font: 700 20px/1 Georgia, "Times New Roman", serif; }
#npc-window .tax-val b { color: #fde68a; font-size: 44px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 #000, 0 0 12px rgba(253,230,138,.5); }

/* 拉條：暗金軌道＋金色圓鈕 */
#npc-window .tax-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: none; cursor: pointer; touch-action: pan-y; }
#npc-window .tax-range::-webkit-slider-runnable-track { height: 8px; border: 1px solid #6a5232; border-radius: 4px; background: linear-gradient(90deg, #3a2a10, #8a6a2c); }
#npc-window .tax-range::-moz-range-track { height: 8px; border: 1px solid #6a5232; border-radius: 4px; background: linear-gradient(90deg, #3a2a10, #8a6a2c); }
#npc-window .tax-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border: 2px solid #3a2a10; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c14e 45%, #9a6a14); box-shadow: 0 0 8px rgba(242,193,78,.6), 0 2px 4px rgba(0,0,0,.6); }
#npc-window .tax-range::-moz-range-thumb { width: 22px; height: 22px; border: 2px solid #3a2a10; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c14e 45%, #9a6a14); box-shadow: 0 0 8px rgba(242,193,78,.6), 0 2px 4px rgba(0,0,0,.6); }
#npc-window .tax-scale { display: flex; justify-content: space-between; margin-top: -6px; padding: 0 4px; font-size: 12px; color: #8f8268; }

/* 標價 100 玩家實付 */
#npc-window .tax-pay { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #8a6a2c; border-radius: 6px;
  background: linear-gradient(180deg, rgba(58,42,16,.9), rgba(30,22,8,.9)); box-shadow: inset 0 0 12px rgba(0,0,0,.5); font-size: 15px; color: #e9dcc0; }
#npc-window .tax-pay b { color: #facc15; font: 700 30px/1 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 #000, 0 0 10px rgba(250,204,21,.35); }
#npc-window .tax-parts { margin-top: -4px; font-size: 13px; color: #a8997a; text-align: right; }

#npc-window .npw-btn.tax-go { border-color: #b7791f; background: linear-gradient(180deg, #5a3f14, #2e1f08); color: #fde68a; }
#npc-window .tax-box > .tax-go { align-self: stretch; padding: 11px 12px; font-size: 17px; letter-spacing: .3em; }

/* 確認視窗：疊在 NPC 視窗的框裡 */
#npc-window .tax-ov { position: absolute; inset: 17px 49px 21px 15px; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 10px; background: rgba(0,0,0,.6); }
#npc-window .tax-cf { width: min(340px, 100%); padding: 14px 16px 12px; border: 1px solid #b7791f; border-radius: 8px; text-align: center;
  background: linear-gradient(180deg, #2a2116, #16110b); box-shadow: 0 0 0 1px #000, 0 0 18px rgba(242,193,78,.25), 0 8px 24px rgba(0,0,0,.8); }
#npc-window .tax-cf-t { font-size: 18px; font-weight: 700; color: #f3d48a; letter-spacing: .08em; text-shadow: 0 1px 0 #000; }
#npc-window .tax-cf-t b { font-size: 24px; color: #fde68a; }
#npc-window .tax-cf p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: #e9dcc0; }
#npc-window .tax-cf p b { color: #facc15; }
#npc-window .tax-cf .tax-nw { white-space: nowrap; }
#npc-window .tax-cf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
#npc-window .tax-cf-btns .npw-btn { padding: 10px 8px; font-size: 16px; }

/* 商店購買清單上方 */
#npc-window .npw-taxline { align-self: center; padding: 3px 14px; border: 1px solid #8a6a2c; border-radius: 12px; background: rgba(58,42,16,.85); font-size: 14px; font-weight: 700; color: #f3d48a; letter-spacing: .08em; }

/* 手機橫式：窗很矮 → 全部縮小 */
@media (max-height: 500px) {
  #npc-window .tax-start { padding: 10px 6px; }
  #npc-window .tax-msg { padding: 4px 8px; font-size: 13px; }
  #npc-window .tax-box { gap: 6px; padding: 0; }
  #npc-window .tax-now { padding: 4px 8px; font-size: 12px; }
  #npc-window .tax-now b, #npc-window .tax-now .tax-castle { font-size: 14px; }
  #npc-window .tax-pick { gap: 12px; padding-top: 0; }
  #npc-window .tax-step { width: 38px; height: 30px; font-size: 18px; }
  #npc-window .tax-val { font-size: 16px; }
  #npc-window .tax-val b { font-size: 30px; }
  #npc-window .tax-range { height: 22px; }
  #npc-window .tax-scale { display: none; }
  #npc-window .tax-pay { padding: 5px 10px; font-size: 13px; }
  #npc-window .tax-pay b { font-size: 22px; }
  #npc-window .tax-parts { margin-top: -2px; font-size: 11px; }
  #npc-window .tax-box > .tax-go { padding: 7px 10px; font-size: 15px; }
  #npc-window .tax-cf { padding: 10px 12px 8px; }
  #npc-window .tax-cf-t { font-size: 16px; }
  #npc-window .tax-cf-t b { font-size: 20px; }
  #npc-window .tax-cf p { margin-top: 4px; font-size: 13px; line-height: 1.4; }
  #npc-window .tax-cf-btns { margin-top: 8px; }
  #npc-window .tax-cf-btns .npw-btn { padding: 6px 8px; font-size: 14px; }
}
