html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #ddd;
  font-family: "Microsoft JhengHei", "PMingLiU", sans-serif;
  overflow: hidden
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 480px;
  transform-origin: center center;
  background: #000;
  image-rendering: auto;
  user-select: none
}

.screen {
  position: absolute;
  inset: 0
}

body:has(#scr-login:not(.hidden)),
body:has(#scr-login:not(.hidden)) #stage {
  background: #0b0d19
}

body:has(#scr-news:not(.hidden))::before,
body:has(#scr-select:not(.hidden))::before {
  content: '';
  position: fixed;
  inset: -24px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.06);
  filter: blur(10px) brightness(.72);
  z-index: 0;
  pointer-events: none;
}

body:has(#scr-news:not(.hidden))::before {
  background-image: url(assets/ui/loading_bg.png);
}

body:has(#scr-select:not(.hidden))::before {
  background-image: url(assets/ui/cs/cs_bg_2106c.png);
  background-position: center bottom;
}

body:has(#scr-news:not(.hidden)) #stage,
body:has(#scr-select:not(.hidden)) #stage {
  background: transparent;
}

#scr-news,
#scr-select {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
}

.hidden {
  display: none !important
}

.bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 640px;
  height: 480px
}

#login-box {
  position: absolute;
  left: 195px;
  top: 292px;
  width: 250px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(16, 20, 36, .95), rgba(11, 13, 25, .97));
  border: 1px solid #d8b878;
  border-radius: 6px;
  box-shadow: 0 0 0 3px #0b0d19, 0 0 0 4px rgba(216, 184, 120, .38), 0 12px 30px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(245, 239, 226, .14)
}

#login-box .row {
  display: flex;
  align-items: center;
  margin: 5px 0
}

#login-box label {
  width: 42px;
  color: #d8b878;
  font-size: 13px;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px #000
}

#login-box input {
  flex: 1;
  height: 24px;
  background: #080a14;
  border: 1px solid rgba(216, 184, 120, .35);
  border-radius: 3px;
  color: #f5efe2;
  font-size: 13px;
  padding: 1px 8px;
  outline: none;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .85)
}

#login-box input:focus {
  border-color: #e8cc88;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .85), 0 0 8px rgba(232, 204, 136, .28)
}

.btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px
}

.db-btn {
  min-width: 84px;
  height: 27px;
  padding: 0 14px;
  border: 1px solid rgba(216, 184, 120, .48);
  border-radius: 4px;
  background: linear-gradient(180deg, #161b30, #0d101e);
  color: #d8b878;
  font: bold 13px/25px "Microsoft JhengHei", sans-serif;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 0 0 1px #06070d, inset 0 1px 0 rgba(245, 239, 226, .1);
  text-shadow: 0 1px 2px #000
}

.db-btn:hover {
  filter: brightness(1.16);
  border-color: #e8cc88;
  color: #f5efe2
}

.db-btn:active {
  transform: translateY(1px)
}

.db-btn.primary {
  border-color: #e8cc88;
  background: linear-gradient(180deg, #2a2417, #171410);
  color: #f5efe2;
  box-shadow: 0 0 0 1px #06070d, 0 0 10px rgba(216, 184, 120, .2), inset 0 1px 0 rgba(255, 236, 184, .28)
}

.db-btn.primary:hover {
  border-color: #ffe39e;
  color: #fffaf0;
  box-shadow: 0 0 0 1px #06070d, 0 0 14px rgba(232, 204, 136, .36), inset 0 1px 0 rgba(255, 236, 184, .36)
}

.imgbtn {
  border: 0;
  padding: 0;
  background: transparent no-repeat center/contain;
  cursor: pointer
}

.imgbtn:disabled {
  filter: grayscale(1) brightness(.6);
  cursor: not-allowed
}

.status {
  font-size: 12px;
  color: #cdb98a;
  text-align: center;
  margin-top: 6px;
  min-height: 15px
}

.status.err {
  color: #ff7a6a
}

.warn {
  font-size: 11px;
  color: #b08f5a;
  text-align: center
}

#news-box {
  position: absolute;
  left: 120px;
  top: 105px;
  width: 400px;
  height: 265px;
  background: linear-gradient(180deg, rgba(24, 18, 13, .93), rgba(10, 8, 6, .95));
  border: 1px solid #9c7a38;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #000, 0 10px 28px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 220, 140, .16);
  display: flex;
  flex-direction: column;
  padding: 10px 12px
}

#news-box .title {
  color: #f0d694;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px #000
}

#news-text {
  flex: 1;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  color: #e8e0c8
}

#slots {
  position: absolute;
  left: 0;
  top: 8px;
  width: 640px;
  height: 285px;
  display: flex;
  justify-content: space-around
}

.slot {
  position: relative;
  width: 132px;
  height: 285px;
  cursor: pointer
}

.slot .art {
  width: 132px;
  height: 277px;
  background-repeat: no-repeat
}

.slot .gifwrap {
  width: 132px;
  height: 277px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(ellipse 40px 120px at 50% 40%, rgba(200, 200, 200, .18), transparent 70%), #000
}

.slot .gifwrap img {
  margin-bottom: 40px;
  image-rendering: auto;
  transform: scale(1.3);
  transform-origin: bottom center
}

.slot.sel .gifwrap {
  box-shadow: inset 0 -24px 24px -10px rgba(255, 140, 0, .55)
}

.slot .nm {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  text-align: center;
  font-size: 12px;
  color: #f3e7c4;
  text-shadow: 0 0 3px #000
}

.slot.sel .nm {
  color: #ffd24a
}

#page-nav {
  position: absolute;
  right: 6px;
  top: 2px;
  font-size: 12px
}

#page-nav button {
  background: #222;
  color: #ddd;
  border: 1px solid #555;
  font-size: 11px
}

#charinfo {
  position: absolute;
  left: 4px;
  top: 292px;
  width: 440px;
  height: 185px
}

#charinfo img {
  position: absolute;
  left: 0;
  top: 0
}

#charinfo .f {
  position: absolute;
  height: 14px;
  line-height: 14px;
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden
}

#charinfo .f.r {
  width: 70px
}

#ci-align img {
  vertical-align: middle;
  height: 14px
}

#select-btns {
  position: absolute;
  left: 470px;
  top: 310px;
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px
}

#select-status {
  position: absolute;
  left: 450px;
  top: 440px;
  width: 185px
}

#debug {
  position: fixed;
  left: 6px;
  bottom: 6px;
  max-width: 420px;
  font-size: 11px;
  color: #888;
  background: rgba(0, 0, 0, .6)
}

#debug pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 4px
}

#world {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #000
}

/* 聊天色（對齊電腦版）：系統米金、公告亮黃、頻道各色 */
.c-normal {
  color: #fff
}

.c-shout {
  color: #ff9a5a
}

.c-global {
  color: #ffd24a
}

.c-clan {
  color: #8af08a
}

.c-party {
  color: #9ad0ff
}

.c-whisper {
  color: #ff8ae0
}

.c-sys {
  color: #cdb98a
}

.c-announce {
  color: #ffff4a
}

.c-npc {
  color: #c8f0c8
}

.c-trade,
.c-union,
.c-other {
  color: #ddd
}

.npc-a {
  color: #9ad0ff;
  text-decoration: none
}

.npc-a:hover {
  color: #fff;
  text-decoration: underline
}

.npc-note {
  color: #cdb98a;
  margin-bottom: 4px
}

.npc-shop {
  width: 100%;
  border-collapse: collapse
}

.npc-shop td {
  padding: 1px 2px;
  border-bottom: 1px solid #2a2418
}

.npc-shop .pr {
  text-align: right;
  color: #ffe08a;
  white-space: nowrap
}

.npc-btn {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid #9c7a3c;
  border-radius: 3px;
  background: linear-gradient(#3b2c16, #1f170b);
  color: #f6e6b8;
  text-decoration: none;
  margin: 2px 3px
}

.npc-btn:hover {
  border-color: #d4aa57;
  background: linear-gradient(#4d3a1e, #2b2010);
  color: #fff;
  text-decoration: none
}

.npc-btn.npc-bracket-btn {
  min-width: 88px;
  padding: 3px 10px;
  margin: 3px 4px;
  text-align: center
}

/* 狀態提示（C.toast）：頂端置中、約半尺寸；與確認框 .yn-box 分開 */
#toast {
  position: fixed;
  left: 50%;
  top: 10px;
  transform: translateX(-50%) scale(0.5);
  transform-origin: top center;
  min-width: 260px;
  max-width: 60vw;
  padding: 12px 18px;
  background: linear-gradient(#1b160e, #0b0905);
  border: 1px solid #b8924a;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .7);
  color: #f6e6b8;
  text-align: center;
  font-size: 15px;
  z-index: 100;
  pointer-events: none
}

#debug {
  z-index: 90
}

/* ====== 遊戲中介面 ====== */
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
  color: #eee4c8
}

#ui-in {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 720px;
  transform-origin: 0 0;
  overflow: visible
}

#ui-in>* {
  pointer-events: auto
}

#ui button {
  font-family: inherit;
  cursor: pointer
}

.ui-panel,
#u-char .u-info,
#u-tr #u-mmap,
#u-target,
.win {
  background: linear-gradient(180deg, rgba(26, 22, 16, .86), rgba(10, 9, 7, .86));
  border: 1px solid rgba(201, 162, 84, .55);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(0, 0, 0, .6)
}

/* 左上 */
#u-char {
  position: absolute;
  left: 14px;
  top: 12px;
  display: flex;
  align-items: center
}

#u-portrait {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #1b1610 no-repeat;
  background-size: 1584px auto;
  background-position: -24px -36px;
  border: 3px solid #c9a254;
  box-shadow: 0 0 0 2px #000, 0 0 14px rgba(255, 200, 90, .35)
}

#u-lv {
  position: absolute;
  right: -6px;
  bottom: -4px;
  min-width: 26px;
  height: 26px;
  padding: 0 3px;
  box-sizing: border-box;
  border-radius: 13px;
  background: radial-gradient(circle at 40% 35%, #ffe38a, #b07a1c);
  color: #2a1a04;
  font-weight: bold;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  border: 2px solid #2a1a04
}

#u-char .u-info {
  margin-left: -22px;
  padding: 6px 12px 6px 30px;
  width: 250px;
  border-radius: 0 10px 10px 0
}

.u-nm {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px
}

#u-name {
  font-size: 17px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 4px #000
}

#u-lvcls {
  font-size: 12px;
  color: #e8c878
}

.ubar {
  position: relative;
  height: 16px;
  margin: 3px 0;
  border-radius: 8px;
  background: #0c0a08;
  border: 1px solid #000;
  box-shadow: inset 0 1px 3px #000;
  overflow: hidden
}

.ubar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 8px;
  transition: width .25s
}

.ubar.hp i {
  background: linear-gradient(#ff6a54, #b3170c 55%, #7c0d06)
}

.ubar.mp i {
  background: linear-gradient(#73b6ff, #1d5fd6 55%, #0e3a8f)
}

.ubar.wt i {
  background: linear-gradient(#e8d49a, #9a7a2c 55%, #5a4514)
}

.ubar.wt.wt-warn i {
  background: linear-gradient(#ffb347, #e67e00 55%, #994d00)
}

.ubar.wt.wt-crit i {
  background: linear-gradient(#ff6a54, #c81b10 55%, #7c0d06)
}

.ubar.food i {
  background: linear-gradient(#7be06b, #2fa830 55%, #19681a)
}

.ubar span {
  position: relative;
  display: block;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000
}

.u-stat {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: #cdb98a;
  margin-top: 2px
}

.u-stat b {
  color: #fff;
  font-weight: normal
}

#u-buffs {
  position: absolute;
  left: 100px;
  top: 104px;
  display: flex;
  gap: 5px
}

.bf {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, #111);
  border: 1px solid #000;
  box-shadow: 0 0 0 1px rgba(255, 220, 140, .4)
}

.bf b {
  display: block;
  text-align: center;
  line-height: 26px;
  font-size: 14px;
  color: #111;
  text-shadow: 0 0 2px #fff
}

.bf span {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -12px;
  text-align: center;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 0 2px #000
}

/* 左側 */
#u-quest {
  position: absolute;
  left: 14px;
  top: 156px;
  width: 230px;
  border-radius: 8px;
  background: rgba(10, 9, 7, .55);
  border: 1px solid rgba(201, 162, 84, .3);
  font-size: 12.5px
}

#u-quest-h {
  padding: 5px 10px;
  color: #ffd77a;
  cursor: pointer;
  border-bottom: 1px solid rgba(201, 162, 84, .25)
}

#u-quest-h span {
  float: right
}

#u-quest .qb {
  padding: 6px 10px
}

#u-quest .q {
  margin: 2px 0
}

#u-quest .q b {
  color: #9fe0ff;
  margin-right: 6px
}

#u-quest .dim {
  color: #8a8070
}

#u-quest.fold .qb {
  display: none
}

#u-leftbot {
  position: absolute;
  left: 14px;
  bottom: 72px;
  width: 380px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  pointer-events: none
}

#u-leftbot>* {
  pointer-events: auto
}

/* 組隊窗：絕對定位（可拖）；Client 2×4 半透明 */
#u-party {
  position: absolute;
  left: 14px;
  bottom: 240px;
  z-index: 4;
  width: 268px;
  border: 1px solid rgba(160, 140, 100, .55);
  border-radius: 4px;
  background: rgba(12, 10, 8, .55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  backdrop-filter: blur(2px);
  overflow: hidden
}

#u-party.sm {
  width: 196px;
  transform-origin: left bottom
}

#u-party.sm #u-party-grid {
  gap: 2px;
  padding: 3px
}

#u-party.sm .ps {
  min-height: 28px;
  padding: 2px 4px
}

#u-party.sm .ps .n {
  font-size: 11px
}

#u-party.sm .ps .hb {
  height: 5px;
  margin-top: 2px
}

#u-party.fold #u-party-grid {
  display: none
}

#u-party-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, .35);
  border-bottom: 1px solid rgba(160, 140, 100, .35);
  font-size: 12px;
  color: #e8d49a;
  user-select: none
}

#u-party-t {
  flex: 1
}

#u-party-bar button {
  width: 22px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(160, 140, 100, .45);
  border-radius: 3px;
  background: rgba(40, 32, 18, .55);
  color: #cdb98a;
  font-size: 11px;
  line-height: 16px;
  cursor: pointer
}

#u-party-bar button:hover {
  color: #ffe08a;
  border-color: #c9a254
}

#u-party-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px
}

.ps {
  min-height: 36px;
  padding: 3px 5px;
  border: 1px solid rgba(90, 80, 60, .55);
  border-radius: 2px;
  background: rgba(0, 0, 0, .35);
  box-sizing: border-box
}

.ps.on {
  border-color: rgba(180, 150, 80, .7);
  background: rgba(20, 16, 10, .5);
  cursor: pointer
}

#u-party.cast-aim .ps.on {
  border-color: rgba(242, 210, 118, .92);
  box-shadow: inset 0 0 6px rgba(242, 210, 118, .28);
  cursor: crosshair
}

#u-party.cast-aim .ps.on:hover {
  border-color: #ffe999;
  background: rgba(95, 74, 24, .58)
}

.ps .n {
  display: block;
  font-size: 12px;
  line-height: 14px;
  color: #ffd24a;
  text-shadow: 0 0 2px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.ps .n.lead {
  color: #ffe08a
}

.ps .ph {
  display: block;
  font-size: 11px;
  line-height: 34px;
  text-align: center;
  color: rgba(140, 130, 110, .55);
  letter-spacing: .5px
}

.ps .hb {
  margin-top: 3px;
  height: 7px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .65);
  border: 1px solid #000;
  overflow: hidden
}

.ps .hb i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(#ff6a54, #c01810 55%, #7a0c08);
  box-shadow: inset 0 1px 0 rgba(255, 200, 160, .35)
}

.ps.acts {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 2px;
  padding: 2px
}

.ps.acts button {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(160, 140, 100, .45);
  border-radius: 3px;
  background: rgba(40, 32, 18, .55);
  color: #e8d49a;
  font-size: 14px;
  line-height: 26px;
  cursor: pointer
}

.ps.acts button:hover {
  color: #ffe08a;
  border-color: #c9a254;
  background: rgba(60, 48, 24, .7)
}

.ps.acts button:disabled {
  opacity: .35;
  cursor: default;
  color: #8a8070
}

#chat {
  position: relative;
  left: auto;
  bottom: auto;
  width: 100%;
  font-size: 13px
}

#chat-grip {
  height: 14px;
  margin-bottom: 2px;
  border-radius: 6px 6px 0 0;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(201, 162, 84, .35);
  border-bottom: 0;
  color: #cdb98a;
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 2px;
  text-align: center;
  cursor: ns-resize;
  user-select: none;
  opacity: .75
}

#chat-grip:hover {
  opacity: 1;
  background: rgba(40, 32, 18, .7);
  color: #ffe08a
}

#chat-log {
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6b5a33 transparent;
  padding: 5px 8px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25));
  color: #eee;
  line-height: 18px;
  word-break: break-all;
  text-shadow: 0 0 2px #000
}

#chat-log:empty {
  display: none
}

#chat-in {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  border: 1px solid #8a6d35;
  border-radius: 14px;
  font-size: 13px;
  padding: 5px 12px;
  font-family: inherit;
  outline: none
}

#chat-in:not(:focus) {
  opacity: 0;
  pointer-events: none
}

#u-chatbtn {
  position: absolute;
  left: 14px;
  bottom: 28px;
  width: 34px;
  height: 30px !important;
  font-size: 15px !important;
  z-index: 3
}

/* 上方中間 目標 */
#u-target {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 300px;
  padding: 6px 12px 8px;
  border-radius: 10px;
  text-align: center
}

#u-tg-n {
  font-size: 15px;
  font-weight: bold;
  color: #ffcf8a;
  margin-bottom: 4px;
  text-shadow: 0 0 3px #000
}

.tbar {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: #0c0a08;
  border: 1px solid #000;
  overflow: hidden
}

.tbar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(#ff6a54, #9c140a);
  transition: width .25s
}

.tbar span {
  position: relative;
  font-size: 11px;
  line-height: 14px;
  text-shadow: 0 0 2px #000
}

/* 右上 */
#u-tr {
  position: absolute;
  right: 14px;
  top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px
}

#u-cur {
  display: flex;
  gap: 8px
}

.cur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .6);
  border: 1px solid rgba(201, 162, 84, .45);
  font-size: 13px
}

.cur i {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-style: normal;
  font-size: 12px
}

.cur.c1 i {
  background: radial-gradient(circle at 35% 30%, #e8f8ff, #3aa8ff 60%, #0a3a8a);
  color: #fff
}

.cur.c2 i {
  background: radial-gradient(circle at 35% 30%, #fff3b0, #e0a020 60%, #7a4a06);
  color: #5a3500
}

.cur b {
  font-weight: normal;
  color: #fff
}

#u-btns {
  display: flex;
  gap: 6px
}

.ib {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 84, .6);
  background: radial-gradient(circle at 50% 30%, #3a3022, #15110b);
  color: #ffe3a0;
  font-size: 22px;
  line-height: 28px;
  padding: 2px 0 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6)
}

.ib s {
  display: block;
  text-decoration: none;
  font-size: 11px;
  line-height: 13px;
  color: #e8d49a
}

.ib:hover {
  border-color: #ffd77a;
  filter: brightness(1.2)
}

#u-mmap {
  position: relative;
  width: 190px;
  border-radius: 10px;
  padding: 6px;
  box-sizing: border-box
}

#u-mm {
  display: block;
  width: 176px;
  height: 126px;
  border-radius: 6px;
  background: radial-gradient(circle, rgba(60, 50, 30, .6), rgba(8, 7, 5, .9))
}

.mmi {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  margin-top: 4px
}

.mmi b {
  color: #ffe08a;
  font-weight: normal
}

#u-mm-zone.safe {
  color: #7fd0ff
}

#u-mm-zone.pvp {
  color: #ff8a6a
}

/* 快捷欄 */
#u-hot {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 18px
}

.hg {
  text-align: center
}

.hl {
  font-size: 11px;
  color: #cdb98a;
  margin-bottom: 2px;
  letter-spacing: 2px
}

.hs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(201, 162, 84, .4)
}

.hk {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #8a6d35;
  background: radial-gradient(circle at 50% 30%, #2f271b, #0e0c08);
  padding: 0;
  overflow: hidden
}

.hk.empty {
  opacity: .65
}

.hk.gone .ic {
  filter: grayscale(1) brightness(.5)
}

.hk:hover {
  border-color: #ffd77a
}

.hk .k {
  position: absolute;
  left: 3px;
  top: 1px;
  font-size: 10px;
  color: #ffe08a;
  text-shadow: 0 0 2px #000;
  z-index: 2
}

.hk .n {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000;
  z-index: 2
}

.hk .ic {
  position: absolute;
  left: 10px;
  top: 10px
}

.ic {
  width: 32px;
  height: 32px;
  background: no-repeat center;
  image-rendering: pixelated
}

.spi {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 3px #000;
  background: radial-gradient(circle at 35% 30%, hsl(var(--h) 80% 75%), hsl(var(--h) 70% 38%) 60%, hsl(var(--h) 60% 12%));
  border: 1px solid rgba(255, 230, 160, .5);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .6)
}

.spi.sm {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 40px;
  height: 40px;
  font-size: 18px
}

/* 技能冷卻：灰層由上往下消退（剩餘蓋在下方）＋秒數 */
.sk-cd {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: rgba(12, 10, 14, .62);
  pointer-events: none;
  z-index: 3;
  transition: none
}

.sk-cd-t {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font: bold 13px/1 Tahoma, sans-serif;
  color: #fff;
  text-shadow: 0 0 3px #000, 0 1px 2px #000;
  pointer-events: none;
  z-index: 4
}

.skc .sk-cd {
  border-radius: 6px 6px 0 0
}

.skc .skn {
  position: relative;
  z-index: 1
}

/* 右下 */
#u-act {
  position: absolute;
  right: 20px;
  bottom: 22px;
  width: 230px;
  height: 200px
}

#u-atk {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  font-size: 46px;
  color: #fff3c8;
  border: 3px solid #c9a254;
  background: radial-gradient(circle at 40% 30%, #8a3a20, #3a1208 60%, #120402);
  box-shadow: 0 0 0 3px #000, 0 0 22px rgba(255, 120, 40, .45);
  text-shadow: 0 0 8px #ff9a40
}

#u-atk:active {
  transform: scale(.95)
}

.rb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #8a6d35;
  background: radial-gradient(circle at 40% 30%, #3a3022, #100d08);
  color: #ffe3a0;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 0 0 2px #000
}

.rb.on {
  border-color: #7fd0ff;
  color: #7fd0ff;
  box-shadow: 0 0 0 2px #000, 0 0 12px #3aa8ff
}

#u-auto {
  position: absolute;
  right: 6px;
  bottom: 10px
}

/* 經驗條 */
#u-exp {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: rgba(0, 0, 0, .75);
  border-top: 1px solid rgba(201, 162, 84, .45);
  z-index: 2
}

#u-exp i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(#ffe38a, #c08a1c);
  transition: width .4s
}

#u-exp span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  font-size: 12px;
  color: #ffe08a;
  text-shadow: 0 0 3px #000, 0 0 2px #000;
  pointer-events: none
}

#world-btns {
  position: absolute;
  left: 250px;
  top: 156px;
  display: flex;
  gap: 4px;
  opacity: .75
}

#world-btns button {
  background: rgba(20, 16, 8, .85);
  color: #e8d49a;
  border: 1px solid #6b5a33;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 7px
}

#unk {
  position: absolute;
  left: 250px;
  top: 180px;
  width: 240px;
  max-height: 200px;
  overflow: auto;
  margin: 0;
  padding: 5px;
  background: rgba(0, 0, 0, .85);
  border: 1px solid #555;
  font-size: 11px;
  color: #ccc
}

/* 視窗 */
.win {
  position: absolute;
  right: 220px;
  top: 80px;
  width: 560px;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  z-index: 5
}

.win.wide {
  width: 720px
}

.win.side {
  right: 0;
  top: 0;
  bottom: 0;
  width: 440px;
  max-height: none;
  border-radius: 12px 0 0 12px
}

#win-skill.win {
  max-height: 420px
}

/* 原 560 少約 1/4，方便拖魔法到快捷欄 */
.wh {
  position: relative;
  z-index: 8;
  padding: 9px 14px;
  font-size: 17px;
  font-weight: bold;
  color: #ffd77a;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(201, 162, 84, .4);
  background: linear-gradient(90deg, rgba(120, 90, 40, .35), transparent);
  cursor: move;
  user-select: none;
  touch-action: none
}

.wh button,
.wh .wx,
.wh .wx2 {
  cursor: pointer
}

#npc-head,
#u-party-bar {
  position: relative;
  z-index: 8;
  cursor: move;
  user-select: none;
  touch-action: none
}

#npc-head button,
#u-party-bar button {
  cursor: pointer
}

.win.dragging,
#npc.dragging,
#u-party.dragging,
#u-petctl.dragging {
  z-index: 20;
  opacity: .96
}

#u-petctl.dragged {
  left: auto;
  right: auto;
  bottom: auto;
  transform: none !important
}

.wx,
.wx2 {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #8a3a2a;
  background: radial-gradient(#c8402a, #6a140a);
  color: #fff;
  font-size: 14px
}

.wb {
  padding: 10px 12px;
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #6b5a33 transparent
}

.wb.inv,
.wb.sk {
  display: flex;
  gap: 10px
}

.il {
  flex: 1;
  min-width: 0
}

.det {
  width: 200px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(201, 162, 84, .25);
  font-size: 12.5px
}

.det .dh {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px
}

.det .dn {
  font-size: 14px;
  color: #ffe08a;
  font-weight: bold
}

.det .dl {
  color: #cdb98a;
  margin-bottom: 8px
}

.dbtn {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center
}

.dbtn button,
.tabs button,
.vtabs button,
.dbox button {
  border: 1px solid #8a6d35;
  background: linear-gradient(#3a3022, #18130c);
  color: #f0e0b0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px
}

.dbtn button.gold,
.dbox button.gold,
button.big {
  background: linear-gradient(#ffd77a, #b07a1c);
  color: #2a1a04;
  border-color: #ffe3a0;
  font-weight: bold
}

.dbtn button.red {
  background: linear-gradient(#c8402a, #6a140a);
  border-color: #ff8a6a;
  color: #fff
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px
}

.tabs button.on,
.vtabs button.on {
  background: linear-gradient(#ffd77a, #b07a1c);
  color: #2a1a04
}

.tabs .r {
  margin-left: auto
}

#inv-grid {
  display: grid;
  grid-template-columns: repeat(5, 56px);
  gap: 6px;
  max-height: 330px;
  overflow: auto;
  scrollbar-width: thin
}

.is {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 35%, #2a2318, #0c0a07);
  border: 1px solid #4a3d24;
  cursor: pointer
}

/* 背包格圖示對齊 Client：幾乎填滿 56px 格（勿再 32px＋12px 邊距） */
.is .ic {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat
}

.is .n {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000;
  z-index: 1
}

.is .e {
  position: absolute;
  left: 3px;
  top: 1px;
  font-size: 10px;
  color: #2a1a04;
  background: #ffd77a;
  border-radius: 3px;
  padding: 0 3px
}

.is .bnd-tag {
  position: absolute;
  right: 2px;
  top: 1px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  color: #ffe8c2;
  background: rgba(168, 36, 36, .92);
  border: 1px solid rgba(255, 198, 120, .55);
  border-radius: 3px;
  padding: 0 2.5px;
  pointer-events: none;
  z-index: 2
}

#inv-detail .bnd-bar {
  font-size: 11.5px;
  line-height: 1.35;
  color: #ffd8be;
  background: rgba(145, 34, 34, .34);
  border: 1px solid rgba(224, 98, 82, .55);
  border-radius: 4px;
  padding: 4px 7px;
  margin: 0 0 8px
}

.shop .shop-bnd-pill {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 700;
  color: #ffe8c2;
  background: rgba(168, 36, 36, .88);
  border: 1px solid rgba(255, 198, 120, .5);
  border-radius: 3px;
  vertical-align: middle
}

.is.eq {
  border-color: #ffd77a;
  box-shadow: inset 0 0 10px rgba(255, 200, 90, .45)
}

.is.sel {
  outline: 2px solid #7fd0ff
}

.is.bl {
  background: radial-gradient(circle at 50% 35%, #3a3010, #0c0a07)
}

.is.cu {
  background: radial-gradient(circle at 50% 35%, #3a1010, #0c0a07)
}

.is.none {
  cursor: default;
  opacity: .45
}

.inv-ft {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
  font-size: 12.5px
}

.inv-ft b {
  font-weight: normal;
  color: #fff
}

.wtb {
  display: inline-block;
  width: 60px;
  height: 6px;
  margin-left: 6px;
  border-radius: 3px;
  background: #222;
  vertical-align: middle;
  overflow: hidden
}

.wtb i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7fd07f, #ffd77a, #ff6a54)
}

.hint {
  color: #9a8f78;
  font-size: 12.5px;
  padding: 6px
}

.hint.big {
  padding: 30px;
  text-align: center;
  font-size: 14px
}

.skrow {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .25)
}

.skrow .lv {
  width: 36px;
  color: #ffd77a;
  font-size: 12px;
  text-align: center
}

.skc {
  position: relative;
  overflow: hidden;
  width: 52px;
  text-align: center;
  cursor: pointer;
  padding: 3px 0;
  border-radius: 6px
}

.skc .spi {
  margin: 0 auto
}

.skn {
  font-size: 10.5px;
  color: #eee;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.skc.dark {
  filter: grayscale(.9) brightness(.45)
}

.skc.sel {
  background: rgba(127, 208, 255, .18);
  outline: 1px solid #7fd0ff
}

.tags {
  display: flex;
  gap: 4px;
  margin-top: 3px
}

.tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #3a3022;
  color: #ffe08a
}

.tag.a {
  background: #1d3a5a;
  color: #9fe0ff
}

table.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px
}

table.kv td {
  padding: 3px 4px;
  border-bottom: 1px solid rgba(201, 162, 84, .15)
}

table.kv td:first-child {
  color: #cdb98a;
  white-space: nowrap
}

table.kv.two td.v {
  color: #fff
}

/* 角色窗：左數值＋右人體紙娃娃（格位貼身體，不超出 Client 比例） */
#win-char {
  width: 546px;
  max-height: 495px
}

#win-char .wb {
  padding: 8px 10px;
  overflow: hidden
}

.ch-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch
}

.ch-left {
  flex: 0 0 166px;
  font-size: 12px;
  line-height: 1.42;
  color: #e8e0c8;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ch-box {
  padding: 4px 8px;
  border: 1px solid rgba(201, 162, 84, .28);
  border-radius: 4px;
  background: rgba(0, 0, 0, .28);
}

.ch-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  padding: 1px 0
}

.ch-k {
  color: #cdb98a;
  white-space: nowrap;
  flex: 0 0 auto
}

.ch-v {
  color: #fff;
  text-align: right;
  min-height: 1em;
  flex: 1;
  font-variant-numeric: tabular-nums
}

.ch-v.ch-earth { color: #c7a66b }
.ch-v.ch-water { color: #7ac8ff }
.ch-v.ch-fire { color: #ff8c78 }
.ch-v.ch-wind { color: #9effb8 }

.ch-v.ch-hp {
  color: #ff9ab8
}

.ch-v.ch-mp {
  color: #8ec8ff
}

.ch-v.ch-ac {
  color: #7dffa0
}

.ch-lv-r {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex: 1
}

.ch-v.ch-exp {
  color: #ffe08a;
  font-size: 10.5px
}

.ch-gap {
  height: 5px
}

.ch-attr {
  margin-top: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(201, 162, 84, .35);
  border-radius: 3px;
  background: rgba(0, 0, 0, .25)
}

.ch-attr-h {
  color: #ffe08a;
  font-weight: bold;
  margin-bottom: 2px;
  text-align: center;
  letter-spacing: .1em;
  font-size: 11px
}

.ch-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

.ch-doll {
  position: relative;
  width: 100%;
  min-height: 416px;
  flex: 1;
  box-sizing: border-box;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(28, 24, 30, .75), rgba(10, 9, 12, .88));
  border: 1px solid rgba(201, 162, 84, .22);
  overflow: hidden
}

.ch-body-img {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 245px;
  height: auto;
  transform: translateX(-50%);
  opacity: .9;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  image-rendering: auto;
  filter: drop-shadow(0 0 14px rgba(90, 70, 120, .38))
}

.ch-slot {
  position: absolute;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  margin-top: -21px;
  box-sizing: border-box;
  border: 1px solid rgba(160, 140, 100, .5);
  border-radius: 2px;
  background: rgba(0, 0, 0, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2
}

.ch-slot.on {
  border-color: rgba(255, 210, 120, .9);
  background: rgba(28, 22, 14, .8);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55)
}

.ch-slot.on:hover {
  border-color: #ffe08a
}

/* fix14：角色裝備欄祝福金光／詛咒紅光（對齊背包與 Client 視覺） */
.ch-slot.on.bl {
  border-color: #ffe388;
  background: radial-gradient(circle at 50% 38%, rgba(120, 90, 24, .62), rgba(20, 15, 8, .9));
  box-shadow: 0 0 8px rgba(255, 214, 90, .65), 0 0 15px rgba(255, 190, 60, .32), inset 0 0 8px rgba(255, 226, 128, .35)
}

.ch-slot.on.bl:hover {
  border-color: #fff2b2;
  box-shadow: 0 0 10px rgba(255, 224, 110, .85), 0 0 18px rgba(255, 196, 68, .45), inset 0 0 10px rgba(255, 234, 145, .45)
}

.ch-slot.on.cu {
  border-color: #ff6b6b;
  background: radial-gradient(circle at 50% 38%, rgba(110, 24, 24, .6), rgba(20, 10, 10, .9));
  box-shadow: 0 0 8px rgba(255, 70, 70, .6), inset 0 0 8px rgba(255, 85, 85, .3)
}

.ch-slot img,
.ch-slot .ic {
  width: 36px;
  height: 36px;
  image-rendering: pixelated
}

/* ms16：角色裝備格數量角標，對齊背包 .is .n */
.ch-slot .n {
  position: absolute;
  right: 1px;
  bottom: 0;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000;
  z-index: 1;
  pointer-events: none
}

.ch-foot {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none
}

.ch-lawbox {
  text-align: center;
  min-width: 78px;
  padding: 4px 10px;
  border: 1px solid rgba(201, 162, 84, .28);
  border-radius: 4px;
  background: rgba(10, 9, 12, .72);
}

.ch-lawbox .ch-k {
  display: block;
  color: #6ec8ff;
  font-size: 11.5px;
  line-height: 1.3;
}

.ch-lawbox .ch-v {
  display: block;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
}

.ch-ev {
  font-size: 12px;
  line-height: 1.38;
  min-width: 108px;
  padding: 4px 10px;
  border: 1px solid rgba(201, 162, 84, .28);
  border-radius: 4px;
  background: rgba(10, 9, 12, .72);
}

.ch-ev .ch-row {
  gap: 8px
}

.desc {
  margin-top: 8px;
  color: #9a8f78;
  font-size: 12px
}

#menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px
}

.mi {
  height: 76px;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 84, .45);
  background: radial-gradient(circle at 50% 30%, #3a3022, #120e09);
  color: #f0e0b0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px
}

.mi .g {
  font-size: 26px
}

.mi .t {
  font-size: 12px
}

.mi.off {
  opacity: .5
}

.mi:hover {
  border-color: #ffd77a;
  filter: brightness(1.2)
}

.wb.au {
  display: flex;
  gap: 12px
}

.vtabs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 110px
}

.vtabs button {
  text-align: left;
  padding: 7px 10px
}

.aur {
  flex: 1;
  display: flex;
  flex-direction: column
}

#au-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start
}

.card {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(201, 162, 84, .3);
  font-size: 13px
}

.card.on {
  border-color: #7fd0ff;
  box-shadow: inset 0 0 12px rgba(58, 168, 255, .2)
}

.card .ch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #ffe08a;
  font-weight: bold
}

.card select {
  width: 100%;
  background: #111;
  color: #f0e0b0;
  border: 1px solid #6b5a33;
  border-radius: 5px;
  padding: 3px;
  font-family: inherit
}

.card .rng {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  font-size: 12px;
  color: #cdb98a
}

.card .rng input {
  width: 100%;
  accent-color: #ffb84a
}

.card .note {
  margin-top: 6px;
  font-size: 11px;
  color: #9a8f78
}

.au-st {
  grid-column: 1/3;
  font-size: 12px;
  color: #9fe0ff
}

button.big {
  margin-top: 10px;
  padding: 10px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid
}

.tog {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px
}

.tog input {
  opacity: 0;
  width: 0;
  height: 0
}

.tog i {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: #333;
  border: 1px solid #555;
  transition: .2s
}

.tog i:before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ccc;
  transition: .2s
}

.tog input:checked+i {
  background: linear-gradient(#5ab8ff, #1d5fd6);
  border-color: #7fd0ff
}

.tog input:checked+i:before {
  left: 22px;
  background: #fff
}

.setrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(201, 162, 84, .15);
  font-size: 13px
}

.setvol {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.setvol input[type=range] {
  width: 110px;
  accent-color: #c9a254;
  cursor: pointer;
}

.setvol b {
  width: 36px;
  text-align: right;
  font-size: 12px;
  color: #e8d8a8;
  font-weight: normal;
}

pre.unk {
  font-size: 11px;
  color: #aaa;
  white-space: pre-wrap;
  margin-top: 10px
}

#map-big {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  background: radial-gradient(circle, rgba(60, 50, 30, .6), rgba(8, 7, 5, .95))
}

table.shop {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px
}

table.shop td {
  padding: 3px 4px;
  border-bottom: 1px solid rgba(201, 162, 84, .15)
}

table.shop .pr {
  text-align: right;
  color: #ffe08a;
  white-space: nowrap
}

table.shop input {
  width: 60px;
  background: #111;
  color: #fff;
  border: 1px solid #6b5a33;
  border-radius: 4px;
  padding: 2px
}

.tot {
  margin-right: auto;
  color: #ffe08a
}

.ret-head {
  color: #cdb98a;
  font-size: 13px;
  margin: 0 0 6px;
  padding: 0 2px
}

table.shop.ret td.qty {
  width: 72px;
  text-align: right
}

table.shop.ret td.qty input {
  width: 56px;
  text-align: right
}

table.shop.ret tr.pick, table.shop tr {
  cursor: pointer
}

table.shop.ret tr.pick:hover, table.shop tr:hover {
  background: rgba(201, 162, 84, .12)
}

table.shop tr.sel, table.shop.ret tr.pick.sel {
  background: rgba(201, 162, 84, .24);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 138, .48)
}

.ret-foot {
  margin-top: 8px;
  align-items: center
}

#u-dead,
#u-confirm,
#u-captcha {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  z-index: 20
}

#u-captcha {
  z-index: 30
}

.capbox #u-cap-img {
  display: block;
  margin: 10px auto 12px;
  image-rendering: pixelated;
  border: 1px solid #8a6d35;
  background: #000
}

.capbox #u-cap-in {
  width: 160px;
  margin: 0 auto 12px;
  display: block;
  text-align: center;
  font-size: 18px;
  letter-spacing: 4px;
  padding: 6px 8px;
  border: 1px solid #8a6d35;
  background: #120e08;
  color: #ffe3a0;
  border-radius: 6px
}

#u-dead {
  background: radial-gradient(circle, rgba(80, 0, 0, .35), rgba(0, 0, 0, .75))
}

.dbox {
  min-width: 320px;
  padding: 20px 26px;
  border-radius: 12px;
  text-align: center;
  background: linear-gradient(#1f1a12, #0a0806);
  border: 1px solid #c9a254;
  box-shadow: 0 6px 30px #000
}

.dbox .dt {
  font-size: 28px;
  color: #ff6a54;
  font-weight: bold;
  letter-spacing: 6px
}

.dbox .dd {
  color: #cdb98a;
  margin: 8px 0 6px
}

#u-confirm-t {
  font-size: 15px;
  margin-bottom: 6px
}

.dbox .dbtn {
  justify-content: center
}

#npc {
  position: absolute;
  left: 50%;
  top: 90px;
  transform: translateX(-50%);
  width: 420px;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(26, 22, 16, .95), rgba(10, 9, 7, .95));
  border: 1px solid rgba(201, 162, 84, .6);
  box-shadow: 0 4px 20px #000;
  font-size: 14px;
  color: #eee4c8;
  z-index: 6
}

#npc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #ffd77a;
  font-weight: bold;
  border-bottom: 1px solid rgba(201, 162, 84, .4)
}

#npc-x {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #8a3a2a;
  background: radial-gradient(#c8402a, #6a140a);
  color: #fff
}

#npc-body {
  padding: 10px 14px;
  overflow-y: auto;
  line-height: 22px;
  scrollbar-width: thin
}

/* 視窗不透明一點，避免後面的名字透出來 */
.win {
  background: linear-gradient(180deg, rgba(30, 25, 18, .97), rgba(12, 10, 8, .97))
}

#inv-grid {
  grid-template-columns: repeat(5, 58px);
  padding-right: 6px;
  overflow-x: hidden
}

.wb.inv .il,
.wb.sk .il {
  flex: 0 0 auto;
  min-width: 340px
}

/* 快捷欄（通用格）：上排 1～5（小），下排 F5～F12 */
#u-hot {
  flex-direction: column;
  align-items: center;
  gap: 4px
}

#u-hot .hg.hn .hs {
  padding: 3px;
  gap: 4px
}

#u-hot .hg.hn .hk {
  width: 40px;
  height: 40px
}

#u-hot .hg.hn .hk .ic {
  left: 4px;
  top: 4px
}

#u-hot .hg.hn .hl {
  display: none
}

#u-hot .hg.hn {
  display: flex;
  align-items: center;
  gap: 6px
}

#u-hot .hg.hn::before {
  content: '1～5';
  font-size: 11px;
  color: #cdb98a;
  letter-spacing: 1px
}

#u-hot .hk {
  width: 50px;
  height: 50px
}

#u-hot .hk .ic {
  left: 9px;
  top: 9px
}

.hk.over {
  border-color: #fff2a0;
  box-shadow: 0 0 10px #ffd77a
}

.hk[draggable=true] {
  cursor: grab
}

#u-hot-cur {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  box-sizing: border-box;
  border: 2px solid #ffe08a;
  box-shadow: 0 0 0 1px #000;
  border-radius: 2px
}

#u-hot-cur.hidden {
  display: none
}

.is[draggable=true],
.skc[draggable=true] {
  cursor: grab
}

#chat {
  width: 340px
}

#u-ctx {
  position: absolute;
  z-index: 60;
  width: 220px;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(34, 28, 20, .98), rgba(12, 10, 8, .98));
  border: 1px solid #c9a254;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .7)
}

#u-ctx .ct {
  font-size: 12px;
  color: #ffe08a;
  margin-bottom: 6px
}

#u-ctx .cg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px
}

#u-ctx button,
.hkpick button {
  font-size: 12px;
  padding: 4px 0;
  border-radius: 6px;
  border: 1px solid #6d5630;
  background: #1d1812;
  color: #f3e3bf;
  cursor: pointer
}

#u-ctx button:hover,
.hkpick button:hover {
  border-color: #ffd77a;
  background: #2c2418
}

#u-ctx button.used,
.hkpick button.used {
  color: #b9a983
}

.hkpick {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 8px
}

.hkpick button {
  min-width: 34px;
  padding: 3px 4px
}

.hkpick .hl2 {
  font-size: 12px;
  color: #cdb98a;
  margin-right: 4px
}

/* NPC 對話（Client HTML） */
.npc-h {
  white-space: normal;
  word-break: break-word;
  line-height: 1.6
}

.npc-h table.npc-t {
  border-collapse: collapse;
  width: auto;
  margin: 2px 0
}

.npc-h td,
.npc-h th {
  padding: 1px 6px;
  vertical-align: top
}

/* ---- 這一輪：沒有頭像的左上面板、Client 按鈕圖、只留 AUTO、公告 ---- */
#u-char .u-info {
  margin-left: 0;
  padding: 7px 12px 7px;
  width: 236px;
  border-radius: 10px
}

#u-lv {
  position: static;
  display: inline-block;
  min-width: 24px;
  height: 22px;
  line-height: 22px;
  margin-right: 6px;
  border-radius: 11px;
  text-align: center;
  font-size: 13px;
  padding: 0 4px;
  box-sizing: border-box
}

.u-nm {
  justify-content: flex-start;
  gap: 0
}

.u-nm #u-lvcls {
  margin-left: auto
}

#u-buffs {
  left: 14px;
  top: 96px;
  flex-wrap: wrap;
  max-width: 300px
}

.bf {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #000 center/cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 220, 140, .45)
}

.spi {
  background: #000 center/cover no-repeat;
  color: transparent;
  text-shadow: none;
  border: 1px solid #000;
  box-shadow: 0 0 0 1px rgba(201, 162, 84, .5)
}

#u-cur {
  justify-content: flex-end
}

.cur img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated
}

.cur img:not([src]) {
  display: none
}

.cbar {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center
}

.cbar .cb {
  width: 38px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent center/contain no-repeat;
  image-rendering: pixelated;
  cursor: pointer
}

.cbar .cb:hover {
  filter: brightness(1.25) drop-shadow(0 0 4px #ffd77a)
}

.cbar .cb.txt {
  width: auto;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 84, .6);
  background: linear-gradient(#3a3022, #15110b);
  color: #ffe3a0;
  font-size: 13px
}

#u-act {
  width: auto;
  height: auto
}

.rb.big {
  width: 74px;
  height: 74px;
  font-size: 16px;
  letter-spacing: 1px
}

#u-chatbtn {
  font-size: 12px
}

.tbar {
  height: 17px;
  border-radius: 8px
}

.tbar span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: block;
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap;
  overflow: visible;
  text-align: center
}

.mi img {
  max-width: 40px;
  max-height: 40px;
  image-rendering: pixelated;
  margin-bottom: 4px
}

.mi.noimg .t {
  font-size: 14px
}

#u-bc {
  position: absolute;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  width: 820px;
  max-width: 80%;
  pointer-events: none;
  text-align: center;
  z-index: 30
}

#u-bc .bcl {
  font-size: 17px;
  font-weight: bold;
  margin: 2px 0;
  color: #ffe76a;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px #000;
  transition: opacity 1.2s;
  opacity: 1
}

#u-bc .bcl.fade {
  opacity: 0
}

#u-mm-zone.norm {
  color: #e8dcb8
}

#win-map {
  width: auto;
  max-height: none;
  top: 40px
}

#win-map .wb {
  padding: 8px
}

#map-big {
  display: block;
  width: 530px;
  height: 561px;
  border-radius: 6px;
  background: #0b0a08
}

/* 右上 Client 按鈕：統一外框（深色圓角框＋細金邊），裡面放 Client 圖 2 倍，下方字 */
.cbar {
  gap: 6px
}

.cbar .cb,
.cbar .cb.txt {
  width: 46px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  filter: none
}

.cbar .cb i {
  display: block;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border-radius: 9px;
  border: 1px solid rgba(214, 174, 92, .75);
  background: #14100b center/38px 42px no-repeat;
  image-rendering: pixelated;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(0, 0, 0, .8);
  overflow: hidden;
  transition: box-shadow .12s, transform .08s
}

.cbar .cb.menu i {
  background: radial-gradient(circle at 50% 35%, #3a3022, #120e09);
  position: relative
}

.cbar .cb.menu i::before {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  top: 13px;
  height: 3px;
  background: #e8c878;
  box-shadow: 0 7px 0 #e8c878, 0 14px 0 #e8c878;
  border-radius: 2px
}

.cbar .cb s {
  text-decoration: none;
  font-size: 12px;
  line-height: 12px;
  color: #f0dca8;
  text-shadow: 0 0 3px #000, 0 0 2px #000
}

.cbar .cb:hover i {
  box-shadow: 0 0 10px rgba(255, 215, 122, .75), inset 0 0 0 1px rgba(0, 0, 0, .8);
  border-color: #ffd77a
}

.cbar .cb:active i {
  transform: translateY(1px) scale(.96);
  filter: brightness(.85)
}

.cbar .cb:hover {
  filter: none
}

/* 左上：沒有等級圓章，右邊等級／職業字放大 */
.u-nm {
  align-items: center
}

#u-name {
  font-size: 17px
}

.u-nm #u-lvcls {
  font-size: 15px;
  font-weight: bold;
  color: #ffd77a;
  text-shadow: 0 0 4px #000
}

/* 右下：鍛金立體圓形徽章按鈕（PVP / AUTO） */
#u-act {
  position: absolute;
  right: 14px;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  user-select: none;
  z-index: 25
}

#u-act .rb.rnd,
#u-act .g-btn {
  position: relative;
  width: 60px;
  height: 60px;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  padding: 0;
  border: none !important;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 26%, #2c3756 0%, #161d33 48%, #0a0e1b 82%, #05070e 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .82), 0 2px 6px rgba(0, 0, 0, .9), inset 0 2px 6px rgba(255, 235, 180, .24), inset 0 -8px 16px rgba(0, 0, 0, .75);
  color: #f7dfa0;
  font-family: "Times New Roman", "Microsoft JhengHei", serif;
  transition: transform .12s ease, box-shadow .22s ease, filter .2s ease
}

#u-act .g-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(155deg, rgba(255, 244, 210, .16) 0%, rgba(255, 255, 255, .02) 42%, transparent 55%);
  pointer-events: none
}

#u-act .g-btn:hover {
  filter: brightness(1.12)
}

#u-act .g-btn:active {
  transform: scale(.94)
}

#u-act .g-btn .g-orn {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .7))
}

#u-act .g-btn .auto-crest {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  pointer-events: none
}

#u-act .rb.rnd.big,
#u-act .g-btn.auto {
  width: 104px;
  height: 104px
}

#u-act .g-btn.auto .lbl {
  position: relative;
  z-index: 2;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff8dc 0%, #f5d382 48%, #b9852c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .95))
}

#u-act .g-btn.auto.on {
  background: radial-gradient(circle at 38% 30%, #74511a 0%, #3b2609 52%, #191005 88%);
  box-shadow: 0 0 28px rgba(255, 196, 74, .68), 0 0 56px rgba(255, 156, 36, .34), 0 10px 26px rgba(0, 0, 0, .82), inset 0 0 22px rgba(255, 212, 110, .42)
}

#u-act .g-btn.auto.on .g-orn {
  animation: spinSlow 14s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 215, 115, .85))
}

@keyframes spinSlow {
  from { transform: rotate(0deg) }
  to { transform: rotate(360deg) }
}

#u-act .g-btn.pvp .btn-ico {
  position: relative;
  z-index: 2;
  width: 19px;
  height: 19px;
  color: #e8c77b;
  margin-bottom: -1px;
  filter: drop-shadow(0 1px 2px #000)
}

#u-act .g-btn.pvp .lbl {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #f6dca0;
  text-shadow: 0 1px 3px #000
}

#u-act .g-btn.pvp.on,
#u-pvp.on {
  background: radial-gradient(circle at 35% 30%, #8e1c27 0%, #4d0c14 58%, #220408 92%) !important;
  box-shadow: 0 0 24px rgba(255, 58, 72, .85), 0 0 44px rgba(220, 20, 40, .45), 0 8px 20px rgba(0, 0, 0, .85), inset 0 0 18px rgba(255, 110, 110, .48) !important
}

#u-act .g-btn.pvp.on .btn-ico,
#u-act .g-btn.pvp.on .lbl {
  color: #ffd8d8 !important;
  filter: drop-shadow(0 0 4px rgba(255, 80, 90, .85))
}

#u-act .g-btn.pvp.on .g-orn {
  animation: spinSlow 14s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 80, 88, .9))
}

#world-btns {
  display: none !important
}

.npc-imgbtn,
.npc-img {
  display: inline-block;
  vertical-align: middle;
  margin: 2px 4px
}

.npc-imgbtn img,
.npc-img img {
  display: block;
  image-rendering: pixelated
}

.npc-imgbtn:hover img {
  filter: brightness(1.15)
}

/* 狀態圖示：位置維持左上橫排；圖用 Client 狀態 .tbt（自帶四角框，不再疊金框） */
#u-buffs {
  position: absolute;
  left: 14px;
  top: 100px;
  display: grid;
  grid-template-columns: repeat(8, 32px);
  grid-auto-rows: 46px;
  gap: 0 6px;
  width: 298px;
  max-width: 298px;
  overflow: visible;
  z-index: 40
}

#u-buffs .bf {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: transparent center/contain no-repeat;
  border: 0;
  box-shadow: none;
  image-rendering: pixelated
}

#u-buffs .bf span {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 29px;
  bottom: auto;
  text-align: center;
  font-size: 10px;
  line-height: 11px;
  color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000;
  white-space: nowrap
}

#pet-list .pr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent
}

#pet-list .pr:hover {
  border-color: rgba(214, 174, 92, .6);
  background: rgba(255, 220, 140, .06)
}

#pet-list .pr.on {
  border-color: rgba(255, 215, 120, .85);
  background: rgba(255, 200, 90, .14)
}

#pet-list .pr .ord {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  text-align: center;
  font-size: 11px;
  line-height: 18px;
  color: #2a1a04;
  background: transparent
}

#pet-list .pr.on .ord {
  background: #ffd77a;
  font-weight: bold
}

#pet-list .dbtn {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
  padding: 0 4px
}

#u-chatbtn {
  width: 56px !important;
  height: 26px !important;
  border-radius: 13px !important;
  font-size: 12.5px !important;
  padding: 0;
  letter-spacing: 1px;
  border: 1px solid rgba(214, 174, 92, .8);
  background: linear-gradient(rgba(40, 32, 22, .75), rgba(10, 8, 6, .75));
  color: #f2dca0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6)
}

/* 視窗置中，不蓋住右上按鈕與小地圖 */
.win {
  left: 50%;
  right: auto;
  top: 92px;
  transform: translateX(-50%)
}

#win-map {
  top: 24px
}

#win-menu {
  left: auto;
  right: 0;
  transform: none
}

#u-bc {
  z-index: 4
}

.imgbtn2 {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer
}

.imgbtn2 img {
  display: block;
  image-rendering: pixelated
}

#win-menu {
  top: 0
}

.mi img {
  width: 38px;
  height: 42px;
  max-width: none;
  max-height: none;
  border-radius: 6px;
  border: 1px solid rgba(214, 174, 92, .6)
}

.mi img.wide {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0
}

#u-exp span {
  left: 50%;
  transform: translateX(-50%)
}

.win.side {
  left: auto;
  right: 0;
  top: 0;
  transform: none
}

.mi img.wide {
  width: auto !important;
  height: auto !important;
  border: 0 !important
}

.card .note.warn,
.note.warn {
  color: #ffb070;
  margin-bottom: 8px
}

.au-range {
  font-size: 15px;
  color: #fff2c0;
  margin: 2px 0 8px
}

.au-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

.au-btns button,
.card button.sm {
  border: 1px solid #8a6d35;
  background: linear-gradient(#3a3022, #18130c);
  color: #f0e0b0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12.5px
}

.au-btns button:disabled {
  opacity: .5
}

/* 內掛設定（AutoBot） */
#win-auto {
  width: 880px;
  max-height: 600px
}

#win-auto .vtabs {
  width: 118px
}

#win-auto .vtabs button {
  font-size: 13.5px;
  padding: 8px 10px
}

.au-state {
  margin-top: 10px;
  font-size: 12px;
  color: #a89f88;
  text-align: center
}

.au-state.run {
  color: #7fe08a;
  text-shadow: 0 0 6px rgba(80, 220, 120, .5)
}

.au-hang {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .3)
}

.au-hang i {
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center
}

.au-hang.ok {
  color: #ffe08a
}

.au-hang.no {
  color: #ff8a6a
}

#au-body .card.wide,
#au-body .wide {
  grid-column: 1/3
}

#au-body .card {
  display: flex;
  flex-direction: column;
  gap: 6px
}

#au-body .card .ch {
  margin-bottom: 2px
}

.arow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #d8c9a0
}

.arow>label {
  min-width: 64px;
  color: #cdb98a
}

.arow .pk {
  flex: 1
}

.nb {
  display: inline-flex;
  align-items: center;
  gap: 3px
}

.nb input {
  width: 56px;
  background: #0c0b09;
  color: #ffe9b0;
  border: 1px solid #6b5a33;
  border-radius: 5px;
  padding: 3px 5px;
  font-family: inherit;
  text-align: right
}

.nb span {
  color: #9a8f78;
  font-size: 12px
}

.pk {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  background: linear-gradient(#1c1812, #0e0c09);
  border: 1px solid #6b5a33;
  border-radius: 6px;
  color: #f0e0b0;
  padding: 3px 8px;
  height: 32px;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left
}

.pk:hover {
  border-color: #c9a254
}

.pk i {
  flex: none;
  width: 26px;
  height: 26px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center
}

.pk span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.pk span.no {
  color: #9a8f78
}

.pk b {
  color: #c9a254;
  font-weight: normal
}

.pkl {
  position: fixed;
  z-index: 50;
  background: linear-gradient(180deg, rgba(30, 25, 18, .99), rgba(12, 10, 8, .99));
  border: 1px solid #c9a254;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .8);
  display: flex;
  flex-direction: column;
  padding: 4px;
  max-width: 340px
}

.pkq {
  margin: 2px 2px 4px;
  background: #0c0b09;
  color: #ffe9b0;
  border: 1px solid #6b5a33;
  border-radius: 5px;
  padding: 4px 6px;
  font-family: inherit
}

.pkls {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #6b5a33 transparent
}

.pki {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  color: #f0e0b0;
  min-height: 30px
}

.pki:hover {
  background: rgba(201, 162, 84, .22)
}

.pki.on {
  background: rgba(90, 184, 255, .2)
}

.pki.dim {
  opacity: .55
}

.pki i {
  flex: none;
  width: 28px;
  height: 28px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center
}

.pki span {
  flex: 1
}

.pki span.no {
  color: #9a8f78
}

.pki em {
  font-style: normal;
  font-size: 11px;
  color: #9a8f78
}

.seg {
  display: flex;
  gap: 4px;
  flex-wrap: wrap
}

.seg.wide {
  grid-column: 1/3
}

.seg button {
  flex: 1;
  border: 1px solid #8a6d35;
  background: linear-gradient(#3a3022, #18130c);
  color: #f0e0b0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12.5px;
  font-family: inherit
}

.seg button.on {
  background: linear-gradient(#ffd77a, #b07a1c);
  color: #2a1a04
}

.seg button:disabled {
  opacity: .5
}

.hrow {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid transparent
}

.hrow.on {
  border-color: rgba(127, 208, 255, .5)
}

.hrow>b {
  color: #c9a254;
  width: 12px;
  text-align: center
}

.hrow .pk {
  flex: 1
}

.hrow select {
  background: #0c0b09;
  color: #f0e0b0;
  border: 1px solid #6b5a33;
  border-radius: 5px;
  padding: 4px;
  font-family: inherit;
  width: auto
}

.bgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 5px
}

.bsk {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #5a4a2a;
  background: rgba(0, 0, 0, .3);
  color: #f0e0b0;
  border-radius: 6px;
  padding: 3px 6px;
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer
}

.bsk .bck {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #e0283c;
  cursor: pointer
}

.bsk i {
  flex: none;
  width: 28px;
  height: 28px;
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 4px
}

.bsk span {
  flex: 1
}

.bsk em {
  font-style: normal;
  font-size: 10.5px;
  color: #9a8f78
}

.bsk.on {
  border-color: #7fd0ff;
  background: rgba(58, 168, 255, .18);
  box-shadow: inset 0 0 8px rgba(58, 168, 255, .25)
}

.bsk.dim {
  opacity: .5
}

.dlist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow: auto
}

.drow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, .25);
  border-radius: 6px
}

.drow i {
  width: 28px;
  height: 28px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center
}

.drow span {
  flex: 1
}

#au-start.dis {
  opacity: .55;
  filter: grayscale(.6)
}

#win-auto .wb.au {
  overflow: hidden;
  min-height: 0
}

#win-auto .aur {
  min-height: 0;
  gap: 8px
}

#win-auto #au-body {
  overflow: auto;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #6b5a33 transparent
}

#win-auto #au-start {
  flex: none
}

#u-petctl {
  position: absolute;
  left: 50%;
  bottom: 152px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 5px 8px 5px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 30, 36, .92), rgba(10, 11, 14, .92));
  border: 1px solid rgba(201, 162, 84, .6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 230, 170, .12);
  z-index: 4;
  pointer-events: auto
}

#u-petctl .pt {
  color: #ffe08a;
  font-size: 12px;
  margin-right: 6px;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  padding: 4px 2px
}

#u-petctl .pt:active {
  cursor: grabbing
}

#u-petctl button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center
}

#u-petctl button img {
  width: 32px;
  height: 32px;
  display: block;
  image-rendering: auto
}

#u-petctl button:hover {
  border-color: rgba(255, 215, 120, .55)
}

#u-petctl button.on {
  border-color: #ffd77a;
  box-shadow: 0 0 6px rgba(255, 200, 90, .8)
}

#u-petctl button.warn {
  margin-left: 6px
}

#inv-detail .dst {
  font-size: 12.5px;
  color: #e8dcc0;
  line-height: 1.55
}

#inv-detail .dst.big {
  color: #fff2c0;
  font-weight: bold
}

#inv-detail .dst.gold {
  color: #ffd77a
}

#inv-detail .dst.red {
  color: #ff8a6a
}

#inv-detail .dst.cls {
  color: #9fe0ff
}

#inv-detail .dst.dim {
  color: #9a8f78
}

#inv-detail .dst.txt {
  color: #c8f0a0
}

#inv-detail .dst.sep {
  height: 4px;
  border-bottom: 1px dashed rgba(201, 162, 84, .3);
  margin-bottom: 3px
}

.hint.sm {
  font-size: 11px;
  margin-top: 6px
}

/* 快捷欄不放文字標題（Client 沒有；格子左上角已有 1～5／F5～F12） */
#u-hot .hl {
  display: none
}

#u-hot .hg.hn::before {
  content: none
}

/* 選單：沒有專用小圖示的項目也用 Client 的圖（地圖＝亞丁全圖縮圖、內掛＝掛機符道具圖） */
.mi .mic {
  display: block;
  width: 38px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(214, 174, 92, .6);
  margin-bottom: 4px;
  background-repeat: no-repeat;
  background-color: #120e09
}

.mi .mic.aden {
  background-size: 130px auto;
  background-position: 52% 38%
}

.mi .mic.hang {
  background-size: 32px 32px;
  background-position: center
}

.mi .mic.hang.none {
  background-size: 28px 28px;
  opacity: .85
}

/* 設定：走路模式二選一、開發者資訊收合 */
.setrow .seg {
  display: inline-flex;
  border: 1px solid rgba(201, 162, 84, .55);
  border-radius: 7px;
  overflow: hidden
}

.setrow .seg button {
  border: 0;
  background: linear-gradient(#2c241a, #15110c);
  color: #e8d8a8;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer
}

.setrow .seg button+button {
  border-left: 1px solid rgba(201, 162, 84, .4)
}

.setrow .seg button.on {
  background: linear-gradient(#ffd77a, #b07a1c);
  color: #2a1a04;
  font-weight: bold
}

#world-loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 7, 12, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
#world-loading.hidden { display: none; }
.wl-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 36px;
  border: 1px solid rgba(201, 162, 84, .45);
  border-radius: 8px;
  background: rgba(14, 12, 10, .92);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .85);
}
.wl-spin {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(201, 162, 84, .22);
  border-top-color: #e3c987;
  border-radius: 50%;
  animation: wlspin .8s linear infinite;
}
@keyframes wlspin { to { transform: rotate(360deg); } }
.wl-txt {
  color: #f2d58a;
  font-size: 14px;
  letter-spacing: 1px;
}

details.setsec {
  margin-bottom: 8px;
  border: 1px solid rgba(201, 162, 84, .35);
  border-radius: 6px;
  background: rgba(12, 10, 8, .55);
  padding: 2px 10px;
}

details.setsec > summary {
  cursor: pointer;
  padding: 8px 2px;
  font-size: 13.5px;
  font-weight: bold;
  color: #f2d58a;
  user-select: none;
  list-style: none;
}

details.setsec > summary::before {
  content: '▸ ';
  color: #c9a254;
}

details.setsec[open] > summary::before {
  content: '▾ ';
}

details.devinfo {
  margin-top: 10px;
  border-top: 1px solid rgba(201, 162, 84, .25);
  padding-top: 6px;
  color: #a89870;
  font-size: 12px
}

details.devinfo summary {
  cursor: pointer;
  color: #8a7a58;
  list-style: none
}

details.devinfo summary::before {
  content: '▸ '
}

details.devinfo[open] summary::before {
  content: '▾ '
}

#set-body .seg button {
  height: auto !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 5px 12px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  line-height: 1.4 !important
}

#set-body .seg button {
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  min-height: 0 !important
}

/* 2026-11-19 阿瑋：選單按鈕拿掉大圓角金邊框，只留 Client 圖示＋文字；滑過輕微發亮 */
.mi {
  border: 0 !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important
}

.mi img,
.mi .mic {
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important
}

.mi:hover {
  border: 0 !important;
  filter: brightness(1.3) drop-shadow(0 0 6px rgba(255, 215, 122, .6))
}

/* 快捷欄：格子裡的圖示／文字不吃拖放事件，拖到已有東西的格子一定落在格子上（取代） */
.hk>* {
  pointer-events: none
}

/* 伺服器是／否問答框 */
.yn-box {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 9000;
  min-width: 260px;
  max-width: 420px;
  padding: 14px 18px;
  background: rgba(20, 16, 10, .95);
  border: 1px solid #8a6d3b;
  color: #f3e6c4;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .6)
}

.yn-t {
  margin-bottom: 12px;
  line-height: 1.5
}

.yn-r button {
  margin: 0 8px;
  padding: 4px 16px;
  background: #3a2c18;
  color: #f3e6c4;
  border: 1px solid #8a6d3b;
  cursor: pointer
}

.yn-r button:hover {
  filter: brightness(1.3)
}

.yn-in {
  width: 180px;
  margin: 0 auto 12px;
  display: block;
  padding: 4px 6px;
  background: #120e08;
  color: #f3e6c4;
  border: 1px solid #8a6d3b;
  text-align: center;
  font-size: 15px
}

.poly-box {
  min-width: 300px;
  max-width: 440px
}

.poly-hint {
  font-size: 12px;
  color: #b8a88a;
  margin: -4px 0 10px
}

.poly-list {
  max-height: 220px;
  overflow: auto;
  text-align: left;
  margin: 0 0 12px;
  border: 1px solid #5a4a2a;
  background: #0c0a06
}

.poly-row {
  padding: 5px 10px;
  cursor: pointer;
  border-bottom: 1px solid #2a2214;
  color: #e8dcc0;
  font-size: 13px
}

.poly-row:hover {
  background: rgba(138, 109, 59, .35)
}

.poly-row.low {
  opacity: .45;
  color: #9a8a70
}

.poly-empty {
  padding: 12px;
  color: #8a7a60;
  text-align: center;
  font-size: 12px
}

/* Client 風變身卷軸窗（Web 自繪中文，不改 Text HTML） */
.poly-client {
  min-width: 340px;
  max-width: 420px;
  padding: 14px 16px 16px;
  text-align: left
}

.poly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px
}

.poly-title {
  flex: 1;
  text-align: center;
  color: #7fd4d0;
  font-size: 15px;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px #000
}

.poly-release {
  flex: 0 0 auto;
  padding: 4px 14px;
  background: #1a2228;
  color: #7fd4d0;
  border: 1px solid #3a8a88;
  cursor: pointer;
  font-size: 13px
}

.poly-release:hover {
  filter: brightness(1.25)
}

.poly-body {
  min-height: 200px
}

.poly-body-all {
  max-height: 420px;
  overflow: auto;
  padding-right: 2px
}

/* 等級捷徑列：捲動時永遠貼在清單頂 */
.poly-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 0 10px;
  padding: 6px 2px 8px;
  background: #141a20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .55);
  border-bottom: 1px solid #2a3840
}

.poly-jump-i {
  padding: 3px 8px;
  background: #2a3038;
  color: #d8e0e8;
  border: 1px solid #4a5560;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px
}

.poly-jump-i:hover {
  border-color: #7fd4d0;
  color: #fff
}

.poly-jump-i.locked {
  opacity: .45
}

.poly-sec {
  margin: 0 0 14px;
  scroll-margin-top: 72px
}

.poly-sec-h {
  margin: 0 0 6px;
  padding: 4px 8px;
  background: #1e2830;
  border-left: 3px solid #7fd4d0;
  color: #9ad0c8;
  font-size: 13px
}

.poly-sec-h.locked {
  border-left-color: #8a5050;
  color: #b09090
}

.poly-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px
}

.poly-tab {
  padding: 10px 8px;
  background: #2a3038;
  color: #d8e0e8;
  border: 1px solid #4a5560;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px
}

.poly-tab:hover {
  background: #3a4550;
  border-color: #7fd4d0;
  color: #fff
}

.poly-back {
  display: block;
  margin: 0 0 8px;
  padding: 2px 8px;
  background: transparent;
  border: 0;
  color: #9ad0c8;
  cursor: pointer;
  font-size: 12px
}

.poly-back:hover {
  color: #fff
}

.poly-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 2px 8px
}

.poly-body-all .poly-grid {
  max-height: none;
  overflow: visible
}

.poly-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 128px;
  padding: 8px 4px 4px;
  background: #1a1e24;
  border: 1px solid #3a4550;
  cursor: pointer;
  position: relative
}

.poly-cell:hover {
  border-color: #7fd4d0;
  box-shadow: inset 0 0 0 1px rgba(127, 212, 208, .35)
}

.poly-cell.low {
  opacity: .4;
  filter: grayscale(.4)
}

.poly-spr {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges
}

.poly-name {
  margin-top: 4px;
  font-size: 12px;
  color: #f0a0a0;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.poly-lv {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 14px;
  color: #c8e8e4;
  background: rgba(0, 0, 0, .65);
  border: 1px solid #3a5560;
  border-radius: 2px
}

.poly-lv.need {
  color: #ffb0a0;
  border-color: #8a4040
}

.poly-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #9ab0b0
}

.poly-recent-h {
  margin: 0 0 6px;
  font-size: 12px;
  color: #8a9aa0
}

.poly-recent {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px
}

.poly-recent-i {
  padding: 3px 8px;
  background: #222830;
  border: 1px solid #4a5560;
  color: #c8d0d8;
  font-size: 12px;
  cursor: pointer
}

.poly-recent-i:hover {
  border-color: #7fd4d0;
  color: #fff
}

.poly-recent-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 96px;
  min-height: 96px;
  padding: 4px 2px 2px;
  background: #1a1e24;
  border: 1px solid #3a4550;
  cursor: pointer;
  position: relative
}

.poly-recent-cell:hover {
  border-color: #7fd4d0
}

.poly-recent-cell.low {
  opacity: .4;
  filter: grayscale(.4)
}

.poly-spr-sm {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges
}

.poly-recent-cell .poly-name {
  margin-top: 2px;
  font-size: 11px;
  color: #f0a0a0;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center
}

/* NPC 對話圖片按鈕：Client 原圖 2 倍最近鄰放大、置中、滑過發亮；文字模式（localStorage wpNpcImg=text）用金色文字鈕 */
.npc-imgbtn {
  padding: 2px;
  border-radius: 3px;
  cursor: pointer
}

.npc-imgbtn img {
  image-rendering: pixelated;
  image-rendering: crisp-edges
}

.npc-imgbtn:hover {
  background: rgba(255, 215, 122, .12)
}

.npc-imgbtn:hover img {
  filter: brightness(1.3) drop-shadow(0 0 4px rgba(255, 215, 122, .6))
}

.npc-btn-big {
  min-width: 72px;
  text-align: center;
  padding: 4px 14px;
  font-size: 15px;
  color: #f3d98b;
  border: 1px solid #8a6d3b;
  background: linear-gradient(#4a3a1c, #2a2010);
  border-radius: 3px;
  text-decoration: none
}

.npc-btn-big:hover {
  filter: brightness(1.3);
  box-shadow: 0 0 6px rgba(255, 215, 122, .5)
}

/* 全站：不能反白、不能拖曳文字、不出現文字游標；只有真正要打字的欄位例外 */
html,
body,
body * {
  -webkit-user-select: none;
  user-select: none;
  caret-color: transparent;
  -webkit-user-drag: none
}

body {
  cursor: default
}

a,
button,
.npc-a {
  cursor: pointer
}

/* 進遊戲後預設手形；劍／施法準心由 JS 改 --play-cur */
body.play-hand {
  cursor: var(--play-cur, pointer)
}

body.play-hand *:not(input):not(textarea):not(select) {
  cursor: var(--play-cur, pointer) !important
}

input,
textarea,
select {
  -webkit-user-select: text;
  user-select: text;
  caret-color: auto;
  cursor: text
}

input[type=checkbox],
input[type=radio],
input[type=range],
input[type=button],
input[type=submit] {
  cursor: pointer;
  caret-color: transparent
}

[draggable=true] {
  -webkit-user-drag: element
}

a:focus,
button:focus,
div:focus,
span:focus {
  outline: none
}

::selection {
  background: transparent
}

input::selection,
textarea::selection {
  background: rgba(255, 215, 122, .35)
}

/* 全站捲軸：細金色（不用系統預設） */
* {
  scrollbar-width: auto !important;
  scrollbar-color: auto !important
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .35);
  border-left: 1px solid rgba(107, 90, 51, .35)
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #8a6d3b, #c9a45c 50%, #8a6d3b);
  border: 1px solid #3a2c18;
  border-radius: 4px;
  min-height: 24px
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #a8854a, #f0cf7a 50%, #a8854a)
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0
}

::-webkit-scrollbar-corner {
  background: transparent
}

/* 數字框：隱藏系統上下箭頭，用金色 －／＋ */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0
}

.num-w {
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
  gap: 0
}

.num-w input[type=number] {
  border-radius: 0;
  text-align: center;
  min-width: 0
}

.num-b {
  width: 20px;
  min-width: 20px;
  padding: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1;
  color: #f3d98b;
  background: linear-gradient(#4a3a1c, #2a2010);
  border: 1px solid #8a6d3b;
  cursor: pointer;
  user-select: none;
  touch-action: none
}

.num-b.num-m {
  border-radius: 3px 0 0 3px;
  border-right: 0
}

.num-b.num-p {
  border-radius: 0 3px 3px 0;
  border-left: 0
}

.num-b:hover {
  filter: brightness(1.35)
}

.num-b:active {
  background: linear-gradient(#2a2010, #4a3a1c)
}

/* 勾選框：金色方框 */
input[type=checkbox] {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0 4px;
  vertical-align: middle;
  border: 1px solid #8a6d3b;
  background: #120e08;
  border-radius: 2px;
  position: relative;
  cursor: pointer
}

input[type=checkbox]:checked {
  background: linear-gradient(#c9a45c, #8a6d3b)
}

input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  width: 4px;
  height: 9px;
  border: solid #1a1206;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg)
}

input[type=checkbox]:hover {
  box-shadow: 0 0 4px rgba(255, 215, 122, .5)
}

input[type=radio] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #8a6d3b;
  border-radius: 50%;
  background: #120e08;
  vertical-align: middle;
  cursor: pointer
}

input[type=radio]:checked {
  background: radial-gradient(#f0cf7a 35%, #120e08 40%)
}

/* 下拉選單：金色外觀＋自訂箭頭 */
select {
  -webkit-appearance: none;
  appearance: none;
  background: #120e08 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23c9a45c'/%3E%3C/svg%3E") no-repeat right 6px center;
  color: #f3e6c4;
  border: 1px solid #8a6d3b;
  border-radius: 3px;
  padding: 2px 22px 2px 6px;
  cursor: pointer;
  user-select: none
}

select:hover {
  filter: brightness(1.2)
}

select option {
  background: #1a140a;
  color: #f3e6c4
}

.ps-sign {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 4px 6px;
  background: #120e08;
  color: #f3e6c4;
  border: 1px solid #8a6d3b
}

.ps-t {
  margin: 6px 0 10px;
  color: #ffe08a
}

.tog input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  border: 0;
  box-shadow: none
}

.tog {
  vertical-align: middle;
  flex: 0 0 auto
}

/* 祝福／詛咒道具：圖示外圍一層光（沿著道具圖形外框發光，跟 Client 一樣） */
.is.bl .ic,.ic.bl,.hk.bl .ic,.pk i.bl,.pki i.bl,.ch-slot.bl .ic {
  filter: drop-shadow(0 0 1px #fff2b0) drop-shadow(0 0 3px rgba(255, 214, 90, .95)) drop-shadow(0 0 5px rgba(255, 190, 60, .6))
}

.is.cu .ic,.ch-slot.cu .ic {
  filter: drop-shadow(0 0 1px #ffb0b0) drop-shadow(0 0 3px rgba(255, 60, 60, .9)) drop-shadow(0 0 5px rgba(200, 30, 30, .6))
}

/* 勾選框：全站一律小方形（約跟文字同高），表格／欄位的寬度設定不能把它拉長 */
input[type=checkbox] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  flex: 0 0 14px !important;
  padding: 0 !important;
  box-sizing: border-box
}

.tog input[type=checkbox] {
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0 !important
}

table.shop td:first-child {
  width: 22px;
  text-align: center
}

table.shop.clan-tb {
  table-layout: fixed;
  width: 100%;
}

table.shop.clan-tb td:first-child {
  width: auto;
  text-align: left;
}

table.shop.clan-tb td.clan-nm {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}

button.clan-kick {
  padding: 2px 8px;
  font-size: 12px;
  color: #ffb8b8;
  background: rgba(140, 28, 28, .65);
  border: 1px solid #9e4444;
  border-radius: 3px;
  cursor: pointer;
}

button.clan-kick:hover {
  background: rgba(180, 38, 38, .85);
}

#chat-in-row {
  display: flex;
  gap: 4px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
}

#chat-in-row #chat-in {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 28px;
  margin-top: 0;
  box-sizing: border-box;
}

#u-leftbot.open #chat-in-row #chat-in {
  opacity: 1;
  pointer-events: auto;
}

#chat-to {
  width: 78px;
  height: 28px;
  flex: 0 0 78px;
  box-sizing: border-box;
  background: rgba(11, 13, 25, .92);
  color: #f3dfb0;
  border: 1px solid #8c6d2c;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
  outline: none;
}

#chat-ch {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}

#chat-ch button {
  padding: 2px 7px;
  font-size: 11px;
  background: rgba(16, 20, 36, .88);
  color: #cdb98a;
  border: 1px solid #5c4518;
  border-radius: 3px;
  cursor: pointer;
}

#chat-ch button.on {
  background: linear-gradient(180deg, #caa85c, #8c6d2c);
  color: #111;
  font-weight: 700;
  border-color: #f2d58a;
}

#u-shopclose {
  position: absolute;
  left: 50%;
  top: 64px;
  transform: translateX(-50%);
  z-index: 30;
  padding: 6px 22px;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(#c0392b, #7d1f16);
  border: 1px solid #ffb0a0;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 80, 60, .6);
  cursor: pointer
}

#u-shopclose:hover {
  filter: brightness(1.15)
}

#u-shopclose.hidden {
  display: none
}

/* 新版選單圖示（銅框） */
.cbar .cb.ni i {
  border: 0 !important;
  border-radius: 4px;
  background-size: 42px 42px !important;
  background-color: transparent !important;
  image-rendering: auto
}

.mi img.nmi {
  width: 56px !important;
  height: 56px !important;
  border: 0 !important;
  border-radius: 4px !important;
  image-rendering: auto;
  margin-bottom: 4px
}

.mi {
  height: auto !important;
  padding: 6px 0
}

/* 狀態圖示說明小框 */
#u-buffs .bf {
  cursor: pointer
}

#u-buffs .bf .bt {
  display: block;
  text-align: center;
  line-height: 28px;
  font-size: 14px;
  font-weight: bold;
  color: #ffe3a0;
  background: #120e09;
  border-radius: 0
}

.bfpop {
  position: absolute;
  z-index: 40;
  min-width: 150px;
  max-width: 240px;
  padding: 7px 10px;
  border: 1px solid #c9a254;
  border-radius: 6px;
  background: linear-gradient(#2a2216, #120e09);
  box-shadow: 0 0 0 1px #000, 0 4px 14px rgba(0, 0, 0, .7);
  color: #f0e0b0;
  font-size: 12px;
  line-height: 17px;
  pointer-events: auto
}

.bfpop.hidden {
  display: none
}

.bfpop .bp-n {
  font-size: 13px;
  font-weight: bold;
  color: #ffd77a;
  margin-bottom: 2px
}

.bfpop .bp-t {
  color: #cfe8ff;
  margin-top: 3px
}

/* 操作列固定在視窗底部（合計＋購買／販賣／擺攤／確定）：清單自己捲動，不用捲到最下面才能結帳 */
.wb>.dbtn:last-child {
  position: sticky;
  bottom: -10px;
  z-index: 3;
  margin: 8px -12px -10px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(34, 28, 19, .98), rgba(14, 11, 8, .99));
  border-top: 1px solid rgba(201, 162, 84, .45);
  box-shadow: 0 -6px 10px rgba(0, 0, 0, .45)
}

#drag-hint {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(214, 184, 116, .8);
  background: rgba(12, 10, 8, .92);
  color: #f3dfb0;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .75);
  white-space: nowrap
}

#drag-hint.give {
  border-color: #7dff8c;
  color: #b8ffbe;
  box-shadow: 0 0 10px rgba(100, 255, 120, .45), 0 4px 12px rgba(0, 0, 0, .75)
}

#drag-hint.hidden {
  display: none !important
}

/* 錄影／宣傳：F2 切換 cinema（藏聊天、廣播、快捷、選單、開發鈕；保留血條與世界） */
body.cinema #u-leftbot,
body.cinema #u-chatbtn,
body.cinema #u-bc,
body.cinema #toast,
body.cinema #u-tr,
body.cinema #u-hot,
body.cinema #u-act,
body.cinema #u-exp,
body.cinema #u-hunting,
body.cinema #world-btns,
body.cinema #unk,
body.cinema #debug,
body.cinema .win,
body.cinema #npc,
body.cinema #win-menu {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* lp1：登入頁改為 logo + 登入框 flex 垂直排版，依視窗高度縮小，底部版權列固定不重疊 */
@property --login-scale {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}
body:has(#scr-login:not(.hidden)) { overflow: hidden; }
body:has(#scr-login:not(.hidden)) #stage {
  width: 100% !important;
  height: 100% !important;
  transform: translate(-50%, -50%) !important;
  background: #0b0d19;
  overflow: hidden
}
#scr-login.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  --login-scale: clamp(0.85, 40vmin / 190px, 2.26)
}
#scr-login .bg {
  display: none
}
#login-stack {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.8vh, 48px);
  width: 100%;
  min-height: 0;
  padding: clamp(6px, 3vh, 40px) 16px 0;
  box-sizing: border-box
}
#login-logo {
  display: block;
  width: min(70vw, calc(210px * var(--login-scale)), 36vh, calc(100vh - 260px));
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex: 0 1 auto
}
#login-box {
  position: relative;
  left: auto;
  top: auto;
  width: calc(250px * var(--login-scale));
  padding: calc(14px * var(--login-scale)) calc(16px * var(--login-scale));
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  flex: 0 0 auto
}
#login-box .row { margin: calc(5px * var(--login-scale)) 0 }
#login-box label {
  width: calc(42px * var(--login-scale));
  font-size: calc(13px * var(--login-scale))
}
#login-box input {
  height: calc(24px * var(--login-scale));
  font-size: calc(13px * var(--login-scale));
  padding: 1px calc(8px * var(--login-scale));
  border-radius: calc(3px * var(--login-scale))
}
#scr-login #login-box .btns {
  gap: calc(12px * var(--login-scale));
  margin-top: calc(10px * var(--login-scale))
}
#scr-login #login-box .db-btn {
  min-width: calc(84px * var(--login-scale));
  height: calc(27px * var(--login-scale));
  padding: 0 calc(14px * var(--login-scale));
  border-radius: calc(4px * var(--login-scale));
  font: bold calc(13px * var(--login-scale))/calc(25px * var(--login-scale)) "Microsoft JhengHei", sans-serif;
  letter-spacing: calc(1.5px * var(--login-scale))
}
#scr-login #login-box .login-site-row {
  margin-top: calc(10px * var(--login-scale));
  padding-top: calc(9px * var(--login-scale));
  border-top: 1px solid rgba(223, 192, 125, .24);
  display: flex;
  justify-content: center;
}
#scr-login #login-box.og-locked > .login-site-row {
  visibility: hidden !important;
  pointer-events: none !important;
}
#login-site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(7px * var(--login-scale));
  width: 100%;
  height: calc(30px * var(--login-scale));
  padding: 0 calc(12px * var(--login-scale));
  box-sizing: border-box;
  border-radius: calc(5px * var(--login-scale));
  border: 1px solid rgba(223, 192, 125, .44);
  background: linear-gradient(180deg, rgba(28, 35, 56, .88), rgba(14, 18, 32, .94));
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(253, 222, 157, .14);
  color: #f3dca0;
  font: 700 calc(12.5px * var(--login-scale))/1 "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  letter-spacing: calc(1.2px * var(--login-scale));
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
  transition: border-color .16s ease, filter .16s ease, color .16s ease, box-shadow .16s ease;
}
#login-site-link:hover,
#login-site-link:focus-visible {
  border-color: #fdde9d;
  color: #fff6dc;
  filter: brightness(1.12);
  box-shadow: 0 0 12px rgba(223, 192, 125, .28), inset 0 1px 0 rgba(253, 222, 157, .24);
  outline: none;
}
#login-site-link .site-ic {
  width: calc(20px * var(--login-scale));
  height: calc(20px * var(--login-scale));
  border-radius: calc(3px * var(--login-scale));
  border: 1px solid rgba(223, 192, 125, .58);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
#login-site-link .site-ext {
  font-size: calc(11px * var(--login-scale));
  color: #dfc07d;
  opacity: .88;
  margin-left: calc(-2px * var(--login-scale));
}
/* fix16 方案 A：登入狀態移至登入框外正下方，採 Quiet Luxury 懸浮細膠囊（空值隱藏、單行不捲軸、不推擠登入框） */
#login-box .status,
#login-status {
  position: absolute;
  top: calc(100% + 12px * var(--login-scale));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92vw, calc(420px * var(--login-scale)));
  margin: 0;
  padding: calc(5px * var(--login-scale)) calc(14px * var(--login-scale));
  border-radius: 999px;
  border: 1px solid rgba(223, 192, 125, .42);
  background: rgba(11, 13, 25, .92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .68), inset 0 1px 0 rgba(255, 240, 200, .08);
  color: #e9d9b4;
  font-size: calc(11.5px * var(--login-scale));
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 6
}
#login-status:empty {
  display: none
}
#login-status.err {
  border-color: rgba(232, 112, 112, .55);
  background: rgba(28, 12, 16, .92);
  color: #ffd0c8
}
#scr-login #open-gate {
  left: calc(-28px * var(--login-scale));
  right: calc(-28px * var(--login-scale));
  bottom: calc(100% + 12px * var(--login-scale));
  padding: calc(10px * var(--login-scale)) calc(12px * var(--login-scale)) calc(9px * var(--login-scale));
  border-radius: calc(6px * var(--login-scale))
}
#scr-login #open-gate .og-title { font-size: calc(14px * var(--login-scale)); letter-spacing: calc(6px * var(--login-scale)) }
#scr-login #open-gate .og-time {
  margin-top: calc(3px * var(--login-scale));
  font-size: calc(30px * var(--login-scale));
  line-height: calc(38px * var(--login-scale))
}
#scr-login #open-gate .og-time i { font-size: calc(14px * var(--login-scale)); margin: 0 calc(5px * var(--login-scale)) 0 calc(3px * var(--login-scale)) }
#scr-login #open-gate .og-sub { margin-top: calc(2px * var(--login-scale)); font-size: calc(11px * var(--login-scale)) }
#login-footer {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
  padding: 12px 12px 10px;
  text-align: center;
  font-size: clamp(12px, 2.5vmin, 24px);
  line-height: 1.4;
  color: rgba(245, 239, 226, .88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 8px rgba(0, 0, 0, .85);
  pointer-events: auto;
  user-select: none;
  box-sizing: border-box;
  z-index: 4
}
@media (max-height: 560px) {
  #scr-login.screen { --login-scale: clamp(0.8, 32vmin / 190px, 1.15) }
  #login-stack { gap: clamp(6px, 1.8vh, 16px); padding-top: clamp(4px, 1.8vh, 12px) }
  #login-logo { width: min(70vw, calc(210px * var(--login-scale)), 30vh, calc(100vh - 230px)) }
}
@media (max-height: 430px) {
  #scr-login.screen { --login-scale: clamp(0.72, 26vmin / 190px, 1) }
  #login-stack { gap: 6px; padding-top: 4px; justify-content: flex-start }
  #login-logo { width: min(70vw, calc(210px * var(--login-scale)), 24vh, calc(100vh - 200px)) }
}
.bm-box { min-width: 340px; max-width: 440px }
.bm-list { max-height: 240px }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.bm-main { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px }
.bm-name { color: #f3e6c4; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.bm-loc { color: #a8997c; font-size: 12px; white-space: nowrap }
.bm-del { flex: 0 0 auto; background: none; border: 1px solid #5a4a2a; color: #b89a70; padding: 1px 6px; font-size: 11px; cursor: pointer }
.bm-del:hover { color: #ff8a7a; border-color: #a8483a }
.bm-add { display: flex; gap: 6px; margin-bottom: 10px }
.bm-in { flex: 1; margin: 0; text-align: left; font-size: 13px; padding: 5px 8px }
.bm-btn { flex: 0 0 auto; padding: 4px 12px; background: #263428; color: #b9e5b9; border: 1px solid #4e7a52; cursor: pointer; font-size: 12px }
.bm-btn:hover { filter: brightness(1.2) }
.bm-foot { text-align: center }
