/* ==========================================================================
   Lanvian 1.28.3 — giao diện mới: màn Tạo nhân vật (ảnh chính diện, vòng phép, tàn lửa),
   cùng các chỉnh sửa giao diện của bản này (đặt cuối cùng để ghi đè).
   ========================================================================== */

/* =================== Tạo nhân vật =================== */
#screen-job { --jc: #4f9be0; background: #07050a; }
#screen-job .js-wrap {
  position: relative; isolation: isolate;
  background:
    radial-gradient(ellipse 38% 55% at 44% 62%, color-mix(in srgb, var(--jc) 34%, transparent), transparent 72%),
    radial-gradient(ellipse 80% 50% at 50% 110%, color-mix(in srgb, var(--jc) 22%, transparent), transparent 70%),
    linear-gradient(180deg, #08060c 0%, #120a0a 55%, #07050a 100%);
  transition: background .6s ease;
}
/* sương trôi + ánh cực quang phía sau */
#screen-job .js-wrap::before, #screen-job .js-wrap::after { content: ''; position: absolute; inset: -10%; z-index: -1; pointer-events: none; }
#screen-job .js-wrap::before {
  background:
    radial-gradient(ellipse 30% 20% at 20% 30%, color-mix(in srgb, var(--jc) 22%, transparent), transparent 70%),
    radial-gradient(ellipse 26% 18% at 80% 22%, rgba(255, 200, 120, .10), transparent 70%),
    radial-gradient(ellipse 35% 22% at 65% 80%, color-mix(in srgb, var(--jc) 16%, transparent), transparent 70%);
  filter: blur(6px); animation: jsAurora 18s ease-in-out infinite alternate;
}
#screen-job .js-wrap::after {
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 55%, rgba(0, 0, 0, .75) 100%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 7px);
}
@keyframes jsAurora { from { transform: translate3d(-3%, 0, 0) scale(1); } to { transform: translate3d(3%, -2%, 0) scale(1.08); } }

#screen-job .js-title h1 { color: #fff3d6; text-shadow: 0 0 22px color-mix(in srgb, var(--jc) 60%, transparent), 0 3px 0 #2a1206; letter-spacing: .5px; }
#screen-job .js-kicker { color: color-mix(in srgb, var(--jc) 45%, #ffe2a0); }
#screen-job .js-back { border-image: none; border-radius: 10px; background: rgba(10, 6, 10, .65); border: 1px solid rgba(255, 220, 160, .25); }

#screen-job .js-body { grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); max-width: 1240px; }

/* ---- Thẻ nhân vật bên trái ---- */
#screen-job .js-tabs { gap: 10px; align-items: stretch; }
#screen-job .js-tabs button {
  --cc: #e8b765; position: relative; display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 7px 10px 7px 7px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(100deg, rgba(30, 20, 18, .92), rgba(16, 10, 12, .85));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .14), 0 6px 16px rgba(0, 0, 0, .45);
  transition: transform .25s cubic-bezier(.2, 1.3, .4, 1), box-shadow .25s, background .25s;
}
#screen-job .js-tabs button::before { /* vệt sáng lướt qua khi rê chuột */
  content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s;
}
#screen-job .js-tabs button:hover::before { transform: translateX(120%); }
#screen-job .js-tabs button:hover { transform: translateX(4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 60%, transparent), 0 8px 20px rgba(0, 0, 0, .5); }
#screen-job .js-tabs button .face { grid-row: 1 / span 2; width: 58px; height: 58px; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255, 220, 160, .2); }
#screen-job .js-tabs button .face.pf {
  background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--cc) 55%, #000), #120a08 75%);
  background-repeat: no-repeat; background-size: 175% auto; background-position: 50% 4%;
}
#screen-job .js-tabs button b { font-size: 14.5px; color: #f3e2c0; line-height: 1.15; }
#screen-job .js-tabs button small { font-size: 11.5px; font-weight: 600; color: #a8957a; line-height: 1.2; }
#screen-job .js-tabs button.on {
  transform: translateX(8px);
  background: linear-gradient(100deg, color-mix(in srgb, var(--cc) 38%, #1a100c), rgba(20, 12, 12, .9) 75%);
  box-shadow: inset 0 0 0 2px var(--cc), 0 0 24px color-mix(in srgb, var(--cc) 55%, transparent), 0 8px 22px rgba(0, 0, 0, .55);
}
#screen-job .js-tabs button.on b { color: #fff6dc; }
#screen-job .js-tabs button.on small { color: color-mix(in srgb, var(--cc) 40%, #ffe6b0); }
#screen-job .js-tabs button.on .face { box-shadow: inset 0 0 0 2px var(--cc), 0 0 14px color-mix(in srgb, var(--cc) 70%, transparent); }
#screen-job .js-tabs button.on::after { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 4px; border-radius: 0 4px 4px 0; background: var(--cc); box-shadow: 0 0 10px var(--cc); }

/* ---- Sân khấu giữa ---- */
#screen-job .js-stage { overflow: visible; }
#screen-job .js-ring {
  bottom: 1%; width: min(74%, 46vh); aspect-ratio: 3.2 / 1; border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--jc) 70%, #fff) 0%, color-mix(in srgb, var(--jc) 55%, transparent) 30%, transparent 68%);
  box-shadow: none; filter: blur(2px); animation: jsGlow 2.6s ease-in-out infinite;
}
@keyframes jsGlow { 50% { opacity: .65; transform: translateX(-50%) scale(1.06); } }
.js-pillar {
  position: absolute; left: 50%; bottom: 4%; width: min(46%, 30vh); height: 96%; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(0deg, color-mix(in srgb, var(--jc) 55%, transparent), color-mix(in srgb, var(--jc) 14%, transparent) 55%, transparent);
  -webkit-mask: radial-gradient(ellipse 50% 100% at 50% 100%, #000 40%, transparent 72%); mask: radial-gradient(ellipse 50% 100% at 50% 100%, #000 40%, transparent 72%);
  animation: jsPillar 3.4s ease-in-out infinite; mix-blend-mode: screen;
}
@keyframes jsPillar { 50% { opacity: .55; } }
.js-runes { position: absolute; left: 50%; bottom: -1%; width: min(86%, 56vh); aspect-ratio: 1; transform: translateX(-50%) perspective(600px) rotateX(74deg); pointer-events: none; }
.js-runes i { position: absolute; inset: 0; border-radius: 50%; }
.js-runes i:nth-child(1) {
  border: 2px solid color-mix(in srgb, var(--jc) 80%, #fff);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--jc) 70%, #fff) 0 2deg, transparent 2deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 70%, transparent 71%, transparent 86%, #000 87%, #000 100%);
  mask: radial-gradient(circle, transparent 60%, #000 61%, #000 70%, transparent 71%, transparent 86%, #000 87%, #000 100%);
  box-shadow: 0 0 28px color-mix(in srgb, var(--jc) 70%, transparent), inset 0 0 28px color-mix(in srgb, var(--jc) 60%, transparent);
  animation: jsSpin 22s linear infinite; opacity: .9;
}
.js-runes i:nth-child(2) {
  inset: 16%; border: 2px dashed color-mix(in srgb, var(--jc) 60%, #ffe6b0);
  background: conic-gradient(from 0deg, transparent 0 20%, color-mix(in srgb, var(--jc) 45%, transparent) 25%, transparent 30% 70%, color-mix(in srgb, var(--jc) 45%, transparent) 75%, transparent 80%);
  animation: jsSpin 14s linear infinite reverse; opacity: .8;
}
.js-runes i:nth-child(3) {
  inset: 30%; background: radial-gradient(circle, color-mix(in srgb, var(--jc) 55%, transparent), transparent 70%);
  animation: jsPulse 2.4s ease-in-out infinite;
}
@keyframes jsSpin { to { transform: rotate(360deg); } }
@keyframes jsPulse { 50% { transform: scale(1.18); opacity: .6; } }
#job-embers { position: absolute; inset: -6% -10% 0; width: 120%; height: 106%; pointer-events: none; z-index: 0; }
.js-burst { position: absolute; left: 50%; bottom: 6%; width: 40%; aspect-ratio: 1; transform: translate(-50%, 50%) scale(0); border-radius: 50%; pointer-events: none; z-index: 3; opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .9), color-mix(in srgb, var(--jc) 80%, transparent) 30%, transparent 65%); }
.js-burst.go { animation: jsBurst .7s ease-out; }
@keyframes jsBurst { 0% { opacity: .95; transform: translate(-50%, 50%) scale(.2); } 100% { opacity: 0; transform: translate(-50%, 50%) scale(2.4); } }
#screen-job #job-art {
  z-index: 1; height: 82%; max-height: 560px; margin-bottom: 3%; transform-origin: 50% 100%;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--jc) 45%, transparent)) drop-shadow(0 14px 18px rgba(0, 0, 0, .65));
  animation: jsBreath 3.2s ease-in-out infinite;
}
#screen-job #job-art.pop { animation: jsDrop .6s cubic-bezier(.2, 1.4, .35, 1), jsBreath 3.2s ease-in-out .6s infinite; }
@keyframes jsBreath { 50% { transform: translateY(-1.2%) scaleY(1.012); } }
@keyframes jsDrop { 0% { opacity: 0; transform: translateY(-14%) scale(.9); filter: brightness(3) drop-shadow(0 0 30px #fff); } 60% { opacity: 1; } 100% { transform: none; } }

/* ---- Bảng thông tin bên phải ---- */
#screen-job .js-info {
  position: relative; padding: 22px 26px 22px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 16, 14, .88), rgba(12, 8, 10, .9));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .16), inset 0 0 0 5px rgba(0, 0, 0, .35), inset 0 0 0 6px color-mix(in srgb, var(--jc) 35%, transparent), 0 20px 50px rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
}
#screen-job .js-info::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--jc), transparent); box-shadow: 0 0 12px var(--jc); }
#screen-job .js-role { background: color-mix(in srgb, var(--jc) 30%, #1a0f0a); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jc) 70%, transparent); color: #fff0d0; }
#screen-job .js-name {
  margin-top: 10px; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05;
  background: linear-gradient(100deg, #fff4d6 0%, #ffd27a 40%, #fff8e6 50%, #ffd27a 60%, color-mix(in srgb, var(--jc) 50%, #ffcf70) 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 0 #2a1206) drop-shadow(0 0 16px color-mix(in srgb, var(--jc) 45%, transparent));
}
#screen-job .js-name.shine { animation: jsShine 1.4s ease-out; }
@keyframes jsShine { from { background-position: 100% 0; opacity: 0; transform: translateX(-12px); } 30% { opacity: 1; transform: none; } to { background-position: 0 0; } }
.js-sub { margin-top: 4px; font-size: 13px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: color-mix(in srgb, var(--jc) 45%, #ffe2a8); }
#screen-job .js-lore { color: #e6d6ba; font-size: 15px; }
#screen-job .nm-field input { background: rgba(0, 0, 0, .45); }
#screen-job .js-go {
  position: relative; overflow: hidden; align-self: stretch; padding: 16px 30px; border-radius: 14px; font-size: 18px; letter-spacing: 1px;
  border: 2px solid #6a3a0a; color: #3a1a04;
  background: linear-gradient(180deg, #fff3c4 0%, #f6c96a 45%, #c9862a 100%);
  box-shadow: 0 0 0 2px rgba(255, 220, 143, .35), 0 10px 30px rgba(232, 160, 60, .45), inset 0 2px 0 rgba(255, 255, 255, .8);
  border-image: none;
}
#screen-job .js-go::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); animation: jsSweep 2.8s ease-in-out infinite; }
@keyframes jsSweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }

@media (max-height: 560px), (max-width: 900px) {
  #screen-job .js-body { grid-template-columns: 150px minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px; }
  #screen-job .js-tabs { gap: 5px; }
  #screen-job .js-tabs button { grid-template-columns: 38px 1fr; column-gap: 7px; padding: 4px 7px 4px 4px; border-radius: 10px; }
  #screen-job .js-tabs button .face { width: 38px; height: 38px; border-radius: 8px; }
  #screen-job .js-tabs button b { font-size: 11.5px; }
  #screen-job .js-tabs button small { font-size: 9.5px; }
  #screen-job .js-info { padding: 10px 14px; border-radius: 12px; }
  #screen-job .js-name { font-size: 26px; margin-top: 4px; }
  .js-sub { font-size: 10px; letter-spacing: 2px; }
  #screen-job .js-go { padding: 10px 20px; font-size: 14px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  #screen-job .js-body { grid-template-columns: 1fr; }
  #screen-job .js-tabs { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  #screen-job .js-tabs button { grid-template-columns: 1fr; grid-template-rows: auto; justify-items: center; text-align: center; width: calc(25% - 6px); padding: 5px; }
  #screen-job .js-tabs button .face { grid-row: auto; }
  #screen-job .js-tabs button small { display: none; }
  #screen-job .js-tabs button.on, #screen-job .js-tabs button:hover { transform: translateY(-3px); }
}

/* =================== Cửa hàng Ngọc: biểu tượng thay chữ, giảm giá =================== */
#win-shop .shop-have .cur em { display: none; }
#win-shop .shop-have .cur { gap: 6px; }
#win-shop .shop-have .cur .icon-gold { width: 22px; height: 22px; }
#win-shop .shop-row .price { display: inline-flex; align-items: center; gap: 4px; }
#win-shop .shop-row .price .cur-ic { width: 16px; height: 16px; flex: 0 0 16px; background-size: contain; background-repeat: no-repeat; background-position: center; }
#win-shop .shop-row { position: relative; }
#win-shop .shop-row .old, #sp-old { color: #9a8a74; text-decoration: line-through; font-weight: 600; font-size: .88em; margin-right: 2px; }
#win-shop .shop-row.on-sale { box-shadow: inset 0 0 0 1px rgba(255, 120, 60, .55); }
#win-shop .shop-row .sale-tag {
  position: absolute; top: 4px; right: 4px; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 900; line-height: 1.2; color: #fff;
  background: linear-gradient(180deg, #ff6a3a, #c8261a); box-shadow: 0 2px 6px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: saleTag 1.6s ease-in-out infinite;
}
@keyframes saleTag { 50% { transform: scale(1.08); } }
.sp-off { display: block; margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 800; color: #ff8a5a; }
.sp-off[hidden], #sp-old[hidden] { display: none !important; }

/* =================== Nhân vật: EXP chuyển sang thẻ Thông tin =================== */
#win-character .cw-exp-info { display: grid; grid-template-columns: 1fr !important; margin: 0 0 8px; padding: 8px 10px 8px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(240, 200, 120, .18); }
#win-character .cw-exp-info .cw-xprow { display: flex; justify-content: space-between; gap: 10px; }
#win-character .cw-exp-info .xpline { height: 8px; }

/* =================== Kỹ năng: 2 hàng trên cố định, chỉ cuộn phần thông tin =================== */
#win-character .skv { overflow: hidden !important; }
#win-character .skv > .skv-info { flex: 1 1 auto !important; flex-shrink: 1 !important; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; scrollbar-width: thin; }
#win-character .skv-info > * { flex-shrink: 0; }
#win-character .skv-info .skv-desc { flex: 0 0 auto; min-height: 0; overflow: visible; }
#win-character .skv-acts { position: static !important; background: none !important; padding: 2px 0 0 !important; }

/* =================== Ô vật phẩm / trang bị / tiềm năng: ảnh nằm gọn trong khung, khung bám sát mép ảnh =================== */
#screen-game #win-bag { --Wd: 500; }
#screen-game #win-storage > .dk-r { --Wd: 500; }
#screen-game #win-storage > .dk-l { --Wd: 560; }
@media (max-height: 560px), (max-width: 900px) {
  #screen-game #win-bag { --Wd: 330; }
  #screen-game #win-storage > .dk-r { --Wd: 330; }
}
.inv-slot, .fg-slot, .eq.has { background-size: 80%, 100% !important; }
#win-character .sk-cell { background-size: 80% !important; background-position: center !important; background-repeat: no-repeat !important; }
#win-bag .inv-grid, #win-storage .inv-grid { gap: 6px !important; }

/* =================== Thẻ bên trái: chỉ đổi màu sáng / tối như thẻ Hành trang, bỏ hiệu ứng =================== */
#screen-game .window .side-tabs button, #screen-game .window .dk-side button, #screen-game .help-topics button, #screen-game .shop-cats button, #screen-game .shop-tabs button, #screen-game .cp-tabs button {
  filter: brightness(.7) saturate(.85) !important; transform: none !important; color: #e9d9b8 !important; text-shadow: 0 1px 2px #000 !important;
}
#screen-game .window .side-tabs button:hover, #screen-game .window .dk-side button:hover, #screen-game .help-topics button:hover, #screen-game .shop-cats button:hover { filter: brightness(.88) !important; }
#screen-game .window .side-tabs button.active, #screen-game .window .dk-side button.active, #screen-game .help-topics button.on, #screen-game .shop-cats button.active, #screen-game .shop-tabs button.active, #screen-game .cp-tabs button.on {
  filter: none !important; color: #fff !important; text-shadow: 0 1px 2px #000, 0 0 3px #000 !important;
}
/* bỏ vạch kem nối vào giấy, chấm cam, lấn ra ngoài của thẻ đang chọn */
#screen-game .window.parch-win .parch > .side-tabs button.active { margin-right: 0 !important; width: 100% !important; padding-right: 10px !important; box-shadow: none !important; z-index: auto; }
#screen-game .window.parch-win .parch > .side-tabs button.active::before, #screen-game .window.parch-win .parch > .side-tabs button.active::after,
#screen-game .window .side-tabs button::before, #screen-game .window .side-tabs button::after { display: none !important; content: none !important; }

/* =================== Cài đặt: bỏ khung viền vàng sau 2 nút EN / VI =================== */
.lang-sw { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; gap: 6px !important; }
#screen-game .lang-sw button { filter: brightness(.7) saturate(.85); }
#screen-game .lang-sw button.on { filter: none; color: #fff !important; }

/* =================== Tên cửa sổ: chữ nhỏ lại, đồng đều mọi cửa sổ =================== */
#screen-game .dk-wrap > .dk > .dk-title, #screen-game .parch > .parch-title { font-size: 14px !important; letter-spacing: .3px; }
#screen-game .dk-wrap > .dk > .dk-title *, #screen-game .parch > .parch-title * { font-size: inherit !important; }
@media (max-height: 560px), (max-width: 900px) {
  #screen-game .dk-wrap > .dk > .dk-title, #screen-game .parch > .parch-title { font-size: 12px !important; }
}

/* =================== Bảng thông tin món ở cửa hàng (Ngọc, NPC, Lái buôn): cùng kiểu với bảng vật phẩm trong túi =================== */
#sp-pop.item-pop:not([hidden]) { display: flex !important; flex-direction: column !important; gap: 8px; padding: 12px !important; width: min(430px, 100%) !important; }
#sp-pop.item-pop > * { flex: 0 0 auto; min-width: 0; }
#sp-pop.item-pop .ip-head { margin: 0 !important; }
#sp-pop.item-pop > .ip-body {
  flex: 1 1 auto !important; min-height: 0; overflow-y: auto !important; overflow-x: hidden; overscroll-behavior: contain;
  padding: 8px 10px !important; border-radius: 6px; background: rgba(0, 0, 0, .34); box-shadow: inset 0 0 0 1px rgba(184, 137, 74, .4), inset 0 0 14px rgba(0, 0, 0, .55);
}
#sp-pop.item-pop > .sp-price { margin: 0 !important; flex-wrap: wrap; }
#sp-pop.item-pop > .sp-price .sp-off { flex: 1 0 100%; text-align: right; margin: 0; }
#sp-pop.item-pop > .ip-actions {
  order: 5; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important;
  gap: 6px !important; margin: 0 !important; padding: 8px 0 0 !important; border: 0 !important; border-top: 1px solid rgba(240, 200, 120, .22) !important; min-width: 0 !important;
}
#sp-pop.item-pop > .ip-actions .pbtn { width: auto !important; flex: 1 1 0; min-width: 84px !important; max-width: 140px; height: 34px !important; }
@media (max-height: 560px), (max-width: 900px) {
  #sp-pop.item-pop > .ip-actions .pbtn { min-width: 64px !important; height: 28px !important; font-size: 11px !important; padding: 0 6px !important; }
}

/* =================== Tiềm năng / Kỹ năng: nút kiểu mới (sáng / tối như thẻ Hành trang) =================== */
#win-character .sk2-tabs button { border-radius: 0 !important; background: none !important; box-shadow: none !important; filter: brightness(.7) saturate(.85); color: #e9d9b8 !important; text-shadow: 0 1px 2px #000 !important; }
#win-character .sk2-tabs button.active { filter: none; color: #fff !important; }

/* =================== Nhiệm vụ → Thành tựu: viền xanh mảnh và mờ =================== */
#win-quest .ach-row.ready, #win-quest .ach-row.claimed, #win-quest .qw-drow.ready {
  border-width: 1px !important; border-color: rgba(127, 227, 106, .28) !important; outline: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(127, 227, 106, .22) !important; animation: none !important;
}
#win-quest .ach-row.ready.sel, #win-quest .ach-row.claimed.sel { box-shadow: inset 0 0 0 1px rgba(255, 220, 140, .55) !important; }

/* =================== Đăng nhập / Đăng ký: khung cửa sổ + nút + thẻ theo bộ giao diện mới =================== */
#screen-auth .auth-tabs { background: none !important; box-shadow: none !important; padding: 0 !important; gap: 6px !important; }
#screen-auth .auth-tabs .tab, #screen-auth .forgot-tabs .ftab { height: 40px; color: #e9d9b8 !important; filter: brightness(.7) saturate(.85); text-shadow: 0 1px 2px #000 !important; box-shadow: none !important; }
#screen-auth .auth-tabs .tab.active, #screen-auth .forgot-tabs .ftab.active { filter: none; color: #fff !important; }
#screen-auth .btn-primary { color: #fff3d6 !important; text-shadow: 0 1px 2px #000, 0 0 4px rgba(0,0,0,.5) !important; height: 50px; letter-spacing: .1em; }
#screen-auth .btn-primary:hover { filter: brightness(1.1); }
#screen-auth .auth-side { border-right-color: rgba(255, 220, 160, .14); background: radial-gradient(circle at 50% 38%, rgba(232, 183, 101, .16), transparent 62%), linear-gradient(160deg, rgba(40, 26, 18, .5), rgba(14, 9, 6, .35)); }
#screen-auth .fi { border-radius: 4px; background: rgba(8, 6, 5, .78); box-shadow: inset 0 0 0 1px rgba(150, 120, 90, .45), inset 0 2px 5px rgba(0, 0, 0, .55); }
#screen-auth .auth-forgot { color: #e8c98a; }

/* =================== 1.28.4 =================== */
/* Ô vật phẩm: chỉ một viền khung mới, bỏ viền vàng cũ; độ hiếm vẽ vòng mảnh BÊN TRONG khung (không đè lên khung) */
:is(.inv-slot, .eq, .fg-slot, .sk-cell):not(#_):not(#__) { box-shadow: none !important; border-color: transparent !important; }
:is(.inv-slot, .eq, .fg-slot).rar { outline: none !important; animation: none !important; }
:is(.inv-slot, .eq, .fg-slot).rar::before { content: ''; position: absolute; inset: 6px; border-radius: 3px; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 2px var(--rc), inset 0 0 12px color-mix(in srgb, var(--rc) 45%, transparent); }
:is(.inv-slot, .eq, .fg-slot).rar[data-rar="3"]::before { animation: rarGlowIn 2.2s ease-in-out infinite; }
@keyframes rarGlowIn { 50% { box-shadow: inset 0 0 0 2px var(--rc), inset 0 0 18px color-mix(in srgb, var(--rc) 70%, transparent); } }
/* Bảng menu (phím M / nút ☰): to hơn trên máy tính và điện thoại */
#hud #menu-grid.menu-grid { grid-template-columns: repeat(4, calc(96px * var(--gu))) !important; gap: calc(10px * var(--gu)) 0 !important; --mi: calc(72px * var(--gu)); }
#hud #menu-grid.menu-grid button { font-size: calc(13.5px * var(--gu)) !important; }
@media (max-height: 560px), (max-width: 900px) {
  #hud #menu-grid.menu-grid { grid-template-columns: repeat(4, calc(88px * var(--gu))) !important; gap: calc(6px * var(--gu)) 0 !important; --mi: calc(62px * var(--gu)); }
  #hud #menu-grid.menu-grid button { font-size: calc(13px * var(--gu)) !important; }
}
/* Bảng thông tin trang bị: không tiêu đề phần, cách nhau bằng nét đứt; sao phẩm chất ở dòng loại đồ */
.ii-sec.nohead { margin-top: 0 !important; }
.ii-sec.nohead + .ii-sec, .ii-sec + .ii-sec.nohead { margin-top: 6px !important; padding-top: 6px; border-top: 1px dashed rgba(240, 200, 120, .3); }
.ii-sec.ii-foot .ii-about { margin: 0 0 4px !important; }
.ii-sec.ii-foot .ii-list li { color: #cdbb98 !important; font-weight: 600; }
.ii-sec.ii-foot .ii-list li.bad { color: var(--dk-bad, #ff7b6b) !important; }
.ii-stars { display: inline-flex; margin-left: 8px; letter-spacing: 1px; font-size: 1.05em; vertical-align: -1px; }
.ii-stars b { color: #ffd23a; font-weight: 900; text-shadow: 0 0 4px rgba(255, 200, 40, .6), 0 1px 1px #000; }
.ii-stars i { color: rgba(255, 255, 255, .22); font-style: normal; }
/* 1.28.5: sao sáng & sao mờ liền nhau (cùng cỡ, cùng độ đậm, không khoảng hở) */
.ii-stars:not(#_) { gap: 0; letter-spacing: 0; font-family: 'Segoe UI Symbol', 'DejaVu Sans', sans-serif; }
.ii-stars:not(#_) > b, .ii-stars:not(#_) > i { font-size: inherit; font-weight: 900; margin: 0; padding: 0; letter-spacing: 0; display: inline; }
/* Chợ: khung từng món mảnh lại, cùng kiểu thẻ ở Cửa hàng */
#screen-game #win-market .mk2-card { border-width: 1px !important; border-color: rgba(184, 137, 74, .45) !important; border-radius: 6px !important; box-shadow: none !important; }
#screen-game #win-market .mk2-card:hover { border-color: rgba(240, 200, 120, .7) !important; }
#screen-game #win-market .mk2-card.on { border-color: #e2a94e !important; box-shadow: inset 0 0 0 1px rgba(226, 169, 78, .45) !important; }
#screen-game #win-market .mk2-ic { box-shadow: inset 0 0 0 1px rgba(184, 137, 74, .4) !important; border-radius: 4px !important; }

/* =================== 1.28.4: màn đăng nhập / đăng ký và thanh đang tải hiện NGAY bộ giao diện mới =================== */
/* (vẽ thẳng bằng ảnh dựng sẵn ngay từ khi mở trang; quản trị tải ảnh khác thì phần skin.js đè lên sau) */
.ld-bar { height: auto !important; aspect-ratio: 965 / 73; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important;
  background: url("/builtin/ui_load_bar.png") center / 100% 100% no-repeat !important; }
.ld-bar i { left: 1.87% !important; right: auto !important; top: 19.9% !important; bottom: auto !important; height: 60.3% !important; width: 96.27% !important; border-radius: 0 !important;
  background: url("/builtin/ui_load_fill.png") left center / 100% 100% no-repeat !important; box-shadow: none !important; clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); transition: clip-path .25s ease !important; }
.ld-bar i::after { display: none !important; }
.ld-bar::after { content: ""; position: absolute; left: 1.87%; width: 98.1%; top: 30%; height: 40%; background: url("/builtin/ui_load_over.png") center / 100% 100% no-repeat; pointer-events: none; mix-blend-mode: screen; opacity: .9; }
#screen-auth .auth-panel { border: 13px solid transparent !important; border-radius: 0 !important; border-image: url("/builtin/ui_frame_window.png") 22 fill / 13px stretch !important; background: none !important; box-shadow: 0 24px 70px rgba(0, 0, 0, .65) !important; }
#screen-auth .auth-tabs .tab, #screen-auth .auth-tabs .ftab { border-style: solid !important; border-color: transparent !important; border-width: 0 12px !important; border-radius: 0 !important;
  border-image: url("/builtin/ui_frame_tab.png") 0 22 fill / 0 12px stretch !important; background: none !important; }
#screen-auth .auth-tabs .tab.active, #screen-auth .auth-tabs .ftab.active { border-image: url("/builtin/ui_frame_button_red.png") 0 26 fill / 0 12px stretch !important; }
#screen-auth .btn-primary { border-style: solid !important; border-color: transparent !important; border-width: 0 14px !important; border-radius: 0 !important;
  border-image: url("/builtin/ui_frame_button_gold.png") 0 26 fill / 0 14px stretch !important; background: none !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .45) !important; }
#screen-auth .btn-primary::after { display: none !important; }
/* iPhone dọc (màn thấp): gọn form đăng ký để nút Tạo tài khoản luôn thấy, không bị cắt mép trên khi cuộn */
#screen-auth { justify-content: safe center !important; align-items: safe center !important; }
@media (orientation: portrait) and (max-height: 900px) {
  #screen-auth .auth-side { padding: 10px 14px !important; gap: 4px !important; }
  #screen-auth .logo-text { font-size: 30px !important; }
  #screen-auth .logo .site-logo, #screen-auth .logo img { max-height: 70px; }
  #screen-auth .auth-feats { display: none !important; }
  #screen-auth .auth-main { padding: 12px 16px 12px !important; }
  #screen-auth .auth-tabs { margin-bottom: 8px !important; }
  #screen-auth .fld { margin-bottom: 7px !important; }
  #screen-auth .fl { display: none !important; }
  #screen-auth .fi { height: 40px !important; }
  #screen-auth .hint { font-size: 11px !important; line-height: 1.3; margin: 0 0 4px !important; }
  #screen-auth .btn-primary { height: 46px !important; }
  #screen-auth .auth-foot { margin: 6px 0 !important; }
}

/* =================== Bản đồ thế giới & Khu vực (1.28.4) =================== */
#screen-game .window .parch > .parch-title:not(#_), #screen-game .dk-wrap > .dk > .dk-title:not(#_) { font-size: 14px !important; }
#screen-game .window .parch > .parch-title:not(#_) *, #screen-game .dk-wrap > .dk > .dk-title:not(#_) * { font-size: inherit !important; }
@media (max-height: 560px), (max-width: 900px) { #screen-game .window .parch > .parch-title:not(#_), #screen-game .dk-wrap > .dk > .dk-title:not(#_) { font-size: 12px !important; } }

#screen-game #win-worldmap .wm-stage, #screen-game #win-worldmap .wm-info { background: rgba(0, 0, 0, .28) !important; box-shadow: inset 0 0 0 1px rgba(150, 115, 80, .35), inset 0 0 18px rgba(0, 0, 0, .5) !important; border-radius: 4px !important; }
#screen-game #win-worldmap .wm-list { gap: 6px !important; padding: 6px !important; }
#screen-game #win-worldmap .wm-item:not(#_) {
  border-radius: 4px !important; border: 1px solid rgba(160, 120, 80, .35) !important; padding: 5px 10px 5px 5px !important;
  background: linear-gradient(180deg, rgba(48, 36, 30, .92), rgba(24, 17, 14, .95)) !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .35) !important; transition: transform .15s, border-color .15s;
}
#screen-game #win-worldmap .wm-item:not(#_):hover { border-color: rgba(240, 200, 120, .6) !important; transform: translateX(2px); filter: none; }
#screen-game #win-worldmap .wm-item.sel:not(#_) {
  border-color: #d2482f !important; background: linear-gradient(90deg, rgba(150, 40, 22, .55), rgba(40, 20, 16, .95) 70%) !important;
  box-shadow: inset 3px 0 0 #e2533a, 0 0 14px rgba(210, 72, 47, .35) !important;
}
#screen-game #win-worldmap .wm-item .wm-ith { border-radius: 3px !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), 0 0 0 1px rgba(200, 160, 110, .45) !important; }
#screen-game #win-worldmap .wm-item.me .wm-ith { box-shadow: 0 0 0 2px #59d36e !important; }
#screen-game #win-worldmap .wm-item b { color: #fff0d0 !important; letter-spacing: .2px; }
#screen-game #win-worldmap .wm-item small { color: #c9b48f !important; }
#screen-game #win-worldmap .wm-iright { font-weight: 800; font-size: .9em; }
#screen-game #win-worldmap .wm-iright.here { color: #fff !important; background: linear-gradient(180deg, #4fae4a, #2c7a2a); padding: 2px 8px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
#screen-game #win-worldmap .wm-badge { border-radius: 3px !important; background: rgba(220, 170, 60, .2) !important; color: #ffd36b !important; box-shadow: inset 0 0 0 1px rgba(255, 210, 107, .5); }
#screen-game #win-worldmap .wm-badge.boss { background: rgba(210, 60, 40, .3) !important; color: #ffb08a !important; box-shadow: inset 0 0 0 1px rgba(255, 120, 90, .55); }
#screen-game #win-worldmap .wm-thumb { border-radius: 0 !important; border: 7px solid transparent; border-image: url("/builtin/ui_frame_cell.png") 20 / 7px stretch; box-shadow: 0 6px 16px rgba(0, 0, 0, .45) !important; }
#screen-game #win-worldmap .wm-here { border-radius: 3px !important; background: linear-gradient(180deg, #e2533a, #a8301d) !important; color: #fff !important; }
#screen-game #win-worldmap .wm-head { padding-bottom: 6px; border-bottom: 1px dashed rgba(240, 200, 120, .3); }
#screen-game #win-worldmap .wm-h { font-family: 'Playfair Display', Georgia, serif !important; font-size: 1.3em !important; color: #ffd27a !important; text-shadow: 0 2px 0 #2a1206 !important; }
#screen-game #win-worldmap .wm-tag { border-radius: 3px !important; }
#screen-game #win-worldmap .wm-stats { background: none !important; box-shadow: none !important; padding: 0 !important; }
#screen-game #win-worldmap .wm-stats dt, #screen-game #win-worldmap .wm-stats dd { padding: 4px 0 !important; border-bottom: 1px dashed rgba(240, 200, 120, .15); }
#screen-game #win-worldmap .wm-sub { color: #e8c98a !important; letter-spacing: 2px; }
#screen-game #win-worldmap .wm-links li { border-radius: 3px !important; background: rgba(255, 255, 255, .04) !important; box-shadow: inset 0 0 0 1px rgba(160, 120, 80, .3) !important; }
#screen-game #win-worldmap .wm-act .pbtn { width: 100%; height: 44px !important; font-size: 15px !important; }

/* Khu vực: ô vuông đá, khu đang đứng viền đỏ, thanh đông / vắng */
#screen-game #win-worldmap .zone-card:not(#_) { position: relative; border-radius: 4px !important; border: 1px solid rgba(160, 120, 80, .35) !important;
  background: linear-gradient(180deg, rgba(48, 36, 30, .92), rgba(24, 17, 14, .95)) !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .35) !important; transition: transform .15s, border-color .15s; }
#screen-game #win-worldmap .zone-card:not(#_):hover:not(:disabled) { border-color: rgba(240, 200, 120, .65) !important; transform: translateY(-2px); }
#screen-game #win-worldmap .zone-card.here:not(#_) { border-color: #d2482f !important; background: linear-gradient(180deg, rgba(150, 40, 22, .5), rgba(40, 20, 16, .95)) !important; box-shadow: 0 0 14px rgba(210, 72, 47, .35) !important; }
#screen-game #win-worldmap .zone-card .zc-num { border-radius: 3px !important; background: linear-gradient(180deg, #4a3a30, #2a201a) !important; color: #ffe7a8 !important; box-shadow: inset 0 0 0 1px rgba(240, 200, 120, .45), 0 2px 4px rgba(0, 0, 0, .5) !important; }
#screen-game #win-worldmap .zone-card.here .zc-num { background: linear-gradient(180deg, #e2533a, #a8301d) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 200, 160, .6) !important; }
#screen-game #win-worldmap .zone-card .zc-info { flex: 1 1 auto; color: #e9d9b8 !important; }
.zc-bar { display: block; height: 5px; margin-top: 3px; border-radius: 3px; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(160, 120, 80, .35); overflow: hidden; position: relative; }
.zc-bar::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--f, 0%); background: linear-gradient(90deg, #5fbf4a, #9be06a); }
.zc-bar.mid::before { background: linear-gradient(90deg, #d8a23a, #f2cf6a); }
.zc-bar.hot::before { background: linear-gradient(90deg, #c8452f, #f07a4a); }
.zc-here { position: absolute; top: -8px; right: 6px; padding: 1px 7px; border-radius: 3px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #e2533a, #a8301d); box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
#screen-game #win-worldmap .zone-head { padding: 6px 10px !important; border-radius: 4px !important; background: rgba(0, 0, 0, .3) !important; box-shadow: inset 0 0 0 1px rgba(150, 115, 80, .35) !important; }

/* ===== 1.28.5: thẻ Khu vực gọn, chữ một dòng ===== */
#screen-game #win-worldmap .wm-zone .zone-grid:not(#_) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding-top: 8px; }
#screen-game #win-worldmap .zone-card:not(#_) { display: flex !important; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 10px 12px !important; min-height: 0; text-align: left; white-space: nowrap; }
.zone-card .zc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#screen-game .zone-card .zc-name:not(#_) { font-size: 15px !important; font-weight: 900; color: #ffe7a8 !important; letter-spacing: .3px; }
#screen-game .zone-card.here .zc-name:not(#_) { color: #fff !important; }
.zone-card .zc-pop { font-size: 13px; font-weight: 800; color: #e9d9b8; font-variant-numeric: tabular-nums; }
.zone-card .zc-bar { margin-top: 0; height: 6px; flex: 0 0 6px; min-height: 6px; }
#screen-game #win-worldmap .zone-card .zc-here:not(#_) { left: 50%; right: auto; transform: translateX(-50%); top: -9px; white-space: nowrap; }
.zc-bar.low::before { background: linear-gradient(90deg, #5fbf4a, #9be06a); }
.zc-bar.full::before { background: linear-gradient(90deg, #7a7a7a, #a8a8a8); }
.zone-card .zc-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 700; color: rgba(233, 217, 184, .75); }
.zc-st.low { color: #9be06a; } .zc-st.mid { color: #f2cf6a; } .zc-st.hot { color: #f08a5a; } .zc-st.full { color: #b8b8b8; }
#screen-game #win-worldmap .zone-hint:not(#_) { font-size: 12px !important; opacity: .8; margin-top: 6px; }
@media (max-height: 560px), (max-width: 900px) {
  #screen-game #win-worldmap .wm-zone .zone-grid:not(#_) { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 8px; }
  #screen-game #win-worldmap .zone-card:not(#_) { padding: 8px 9px !important; gap: 5px; }
  #screen-game .zone-card .zc-name:not(#_) { font-size: 13px !important; }
  .zone-card .zc-pop { font-size: 12px; } .zone-card .zc-foot { font-size: 10.5px; }
}

/* ===== 1.28.5: Bộ lạc · Quyên góp (nút nâng cấp ở giữa) & Phúc lợi (quà dàn dọc) ===== */
#win-guild .gd-card > .pbtn.gd-up:not(#_) { align-self: center; min-width: 46%; margin-top: 2px; }
#win-guild .gd-gift:not(#_) { align-items: stretch; }
.gd-giftbox { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 4px 0; }
.gd-giftbox .gd-cur.big { width: 46px; height: 46px; flex: 0 0 46px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.gd-giftrw { display: flex; flex-direction: column; gap: 2px; }
.gd-giftrw b { font-size: 15px; font-weight: 900; color: #ffe7a8; }
.gd-giftrw span { font-size: 12.5px; font-weight: 700; color: #bff0a0; }
#win-guild .gd-card > .pbtn.gd-giftbtn:not(#_) { align-self: center; min-width: 52%; }
.gd-lvperk { flex: 1 1 auto; }
.gd-lvp { margin: 0; font-size: 12.5px; font-weight: 700; color: #e9d9b8; line-height: 1.4; }
.gd-lvp.next { color: #bff0a0; }
@media (max-height: 520px), (max-width: 900px) {
  .gd-giftbox { gap: 10px; padding: 0; } .gd-giftbox .gd-cur.big { width: 36px; height: 36px; flex-basis: 36px; }
  .gd-giftrw b { font-size: 13px; } .gd-giftrw span, .gd-lvp { font-size: 11px; }
}

/* ===== 1.28.5: ô ở Cường hóa / Truyền thừa / Tẩy luyện / Khảm đá / Luyện thú dùng chung khung ô mới như Hành trang ===== */
:is(.bx-slot, .bx-hole):not(#_):not(#__) { border-color: transparent !important; border-radius: 0 !important; box-shadow: none !important;
  background-color: rgba(18, 10, 5, .92) !important; background-size: 80%, 100% !important; background-position: center !important; background-repeat: no-repeat !important; }
.bx-slot.has:not(#_):not(#__), .bx-hole.gem:not(#_):not(#__) { background-color: rgba(34, 22, 12, .95) !important; }
.bx-slot.bad:not(#_):not(#__)::after { filter: hue-rotate(-30deg) saturate(2.2) brightness(.95); }
.bx-hole.shut:not(#_):not(#__) { opacity: .55; }
.bx-hole.sel:not(#_):not(#__)::after { filter: brightness(1.6) drop-shadow(0 0 4px #ffe066); }
.bx-slot .ph, .bx-hole .ph { z-index: 2; }
.bx-slot .q, .bx-slot .pl { z-index: 3; }
.bx-slot.rar { outline: none !important; animation: none !important; }
.bx-slot.rar::before { content: ''; position: absolute; inset: 6px; border-radius: 3px; pointer-events: none; z-index: 2; box-shadow: inset 0 0 0 2px var(--rc), inset 0 0 12px color-mix(in srgb, var(--rc) 45%, transparent); }
/* Hướng dẫn trên cùng của Cường hóa / Truyền thừa / Tẩy luyện / Khảm đá: một dòng ngắn */
#screen-game .bx-info:not(#_) { padding: 6px 10px !important; }
#screen-game .bx-info:not(#_) p { margin: 0 !important; font-size: 12px !important; line-height: 1.35 !important; }

/* ===== 1.28.5: Ngoại trang: nhân vật nửa trên (đứng yên), danh sách ngoại trang nửa dưới (chỉ phần này cuộn) ===== */
#win-character .outfit-pane:not(#_) { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#win-character .outfit-pane:not([hidden]):not(#_) { display: flex; }
#win-character .outfit-pane .of-head:not(#_) { flex: 0 0 auto; }
#win-character .outfit-pane .of-wrap:not(#_) { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: 8px; overflow: hidden; }
#win-character .outfit-pane .of-stage:not(#_) { flex: 0 0 46%; min-height: 110px; max-height: none; width: 100%; height: auto; overflow: hidden; }
#win-character .outfit-pane .of-stage canvas { width: 100%; height: 100%; display: block; }
#win-character .outfit-pane .of-grid:not(#_) { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
#win-character .outfit-pane .of-foot:not(#_) { flex: 0 0 auto; }
@media (max-height: 560px), (max-width: 900px) {
  #win-character .outfit-pane .of-head:not(#_) { display: none; }
  #win-character .outfit-pane .of-stage:not(#_) { flex-basis: 44%; min-height: 90px; }
  #win-character .outfit-pane .of-grid:not(#_) { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
}

/* ===== 1.28.5: bảng menu ☰ / M: biểu tượng to, dễ nhìn dễ bấm, có nền tối phía sau cho chữ rõ ===== */
#hud #menu-grid.menu-grid:not(#_) { grid-template-columns: repeat(4, 104px) !important; gap: 12px 0 !important; --mi: 76px;
  padding: 12px 8px !important; border-radius: 10px !important; background: rgba(14, 9, 5, .82) !important; box-shadow: 0 6px 22px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(226, 169, 78, .35) !important; }
#hud #menu-grid.menu-grid:not(#_) button { font-size: 14px !important; font-weight: 800; color: #fff3d6; text-shadow: 0 1px 2px #000, 0 0 3px #000; gap: 4px !important; }
#hud #menu-grid.menu-grid:not(#_) .mi { background-size: 92% !important; background-position: center !important; background-repeat: no-repeat !important; }
@media (max-height: 560px), (max-width: 900px) {
  #hud #menu-grid.menu-grid:not(#_) { grid-template-columns: repeat(4, 82px) !important; gap: 6px 0 !important; --mi: 54px; padding: 8px 4px !important; }
  #hud #menu-grid.menu-grid:not(#_) button { font-size: 12px !important; gap: 2px !important; }
}
@media (max-height: 400px) { #hud #menu-grid.menu-grid:not(#_) { --mi: 50px; gap: 4px 0 !important; } #hud #menu-grid.menu-grid:not(#_) button { font-size: 11.5px !important; } }

/* =====================================================================
   1.28.5: KHUNG NHÂN VẬT KIỂU MỚI (bộ Warforge): vòng ảnh mặt có sừng, huy hiệu cấp tròn,
   thanh máu / mana vát xiên mọc ra từ sau vòng ảnh mặt; khung thú cưng / người đang chọn dùng vòng tròn nhỏ.
   Ảnh đổi được trong quản trị (Giao diện → Khung nhân vật (kiểu mới)); skin.js đặt các biến --ui-hud-*.
   ===================================================================== */
#hud.hud2 {
  --hf-av: var(--ui-hud-avframe, url("/builtin/ui_hud_avframe.png"));
  --hf-ring: var(--ui-hud-avring, url("/builtin/ui_hud_avring.png"));
  --hf-av2: var(--ui-hud-avframe2, url("/builtin/ui_hud_avframe2.png"));
  --hf-ring2: var(--ui-hud-avring2, url("/builtin/ui_hud_avring2.png"));
  --hf-lv: var(--ui-hud-lvframe, url("/builtin/ui_hud_lvframe.png"));
  --hf-hpbg: var(--ui-hud-hpbg, url("/builtin/ui_hud_hpbg.png"));
  --hf-hp: var(--ui-hud-hpfill, url("/builtin/ui_hud_hpfill.png"));
  --hf-mpbg: var(--ui-hud-mpbg, url("/builtin/ui_hud_mpbg.png"));
  --hf-mp: var(--ui-hud-mpfill, url("/builtin/ui_hud_mpfill.png"));
}
/* ---- khung chung ---- */
#hud.hud2 .hud-plate:not(#_) {
  --k: .40; --hh: 22px; --mh: 15px; --pw: 300px;
  width: var(--pw) !important; height: calc(274px * var(--k)) !important; overflow: visible !important;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; container-type: normal !important;
}
#hud.hud2 .hud-plate:not(#_)::before {
  content: "" !important; display: block !important; position: absolute !important; left: 0; top: 0; z-index: 2; pointer-events: none;
  width: calc(295px * var(--k)); height: calc(274px * var(--k)); background: var(--hf-av) center / 100% 100% no-repeat !important;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .55));
}
#hud.hud2 .hud-plate:not(#_) .avatar {
  left: calc(57px * var(--k)) !important; top: calc(38px * var(--k)) !important; width: calc(200px * var(--k)) !important; height: calc(199px * var(--k)) !important;
  border-radius: 50% !important; overflow: hidden !important; z-index: 3 !important; box-shadow: none !important;
  background: radial-gradient(circle at 50% 35%, #4a3828, #120b06 72%) !important;
}
#hud.hud2 .hud-plate:not(#_) .avatar canvas { width: 100% !important; height: 100% !important; display: block; }
#hud.hud2 .hud-plate:not(#_) .avatar-ring {
  display: block !important; left: calc(57px * var(--k)) !important; top: calc(38px * var(--k)) !important; width: calc(200px * var(--k)) !important; height: calc(199px * var(--k)) !important;
  border: 0 !important; border-radius: 50% !important; box-shadow: none !important; z-index: 4 !important; pointer-events: none;
  background: var(--hf-ring) center / 100% 100% no-repeat !important;
}
#hud.hud2 .hud-plate:not(#_) .lv-badge {
  left: calc(16px * var(--k)) !important; top: calc(186px * var(--k)) !important; bottom: auto !important;
  width: calc(88px * var(--k)) !important; min-width: 0 !important; height: calc(88px * var(--k)) !important; padding: 0 !important; border-radius: 50% !important;
  display: grid !important; place-items: center; z-index: 5 !important; box-shadow: none !important;
  background: var(--hf-lv) center / 100% 100% no-repeat !important;
}
#hud.hud2 .hud-plate:not(#_) .lv-badge b { font-size: calc(36px * var(--k)) !important; font-weight: 900 !important; color: #ffe7a8 !important; text-shadow: 0 1px 2px #000, 0 0 3px #000 !important; }
#hud.hud2 .hud-plate:not(#_) .plate-body {
  left: calc(236px * var(--k)) !important; right: auto !important; top: calc(46px * var(--k)) !important; width: calc(var(--pw) - 236px * var(--k)) !important;
  z-index: 1 !important; gap: 3px !important; display: flex !important; flex-direction: column !important;
}
#hud.hud2 .hud-plate:not(#_) .pname {
  height: auto !important; line-height: 1.15 !important; padding: 0 8px 1px calc(48px * var(--k)) !important; margin: 0 !important;
  font-size: 14px !important; font-weight: 800 !important; color: #fff3d6 !important; border: 0 !important;
  text-shadow: 0 1px 2px #000, 0 0 4px #000, 0 0 2px #000 !important;
  background: linear-gradient(90deg, rgba(12, 7, 4, .78), rgba(12, 7, 4, .5) 70%, rgba(12, 7, 4, 0)) !important;
}
/* thanh vát xiên: nền (::before) kéo dài 2 đầu giữ nguyên; phần màu cắt từ phải sang theo % */
#hud.hud2 .hud-plate:not(#_) .pbar {
  position: relative !important; height: var(--hh) !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; clip-path: none !important; overflow: visible !important; border-image: none !important;
  container-type: inline-size !important; --bg: var(--hf-hpbg); --fill: var(--hf-hp); --ins: calc(var(--hh) * .085); --bh: var(--hh);
}
#hud.hud2 .hud-plate:not(#_) .pbar.mp { --hh: var(--mh); --bg: var(--hf-mpbg); --fill: var(--hf-mp); margin-right: calc(var(--hh) * .6) !important; }
#hud.hud2 .hud-plate:not(#_) .pbar:not(.xp)::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-style: solid; border-color: transparent; border-width: calc(var(--hh) * .08) calc(var(--hh) * .5) calc(var(--hh) * .08) calc(var(--hh) * .08);
  border-image: var(--bg) 8 50 8 8 fill / calc(var(--hh) * .08) calc(var(--hh) * .5) calc(var(--hh) * .08) calc(var(--hh) * .08) stretch;
}
#hud.hud2 .hud-plate:not(#_) .pbar:not(.xp) i {
  position: absolute !important; left: 0 !important; top: 0 !important; bottom: 0 !important; height: auto !important; z-index: 1; border-radius: 0 !important;
  background: var(--fill) no-repeat !important; background-position: var(--ins) var(--ins) !important;
  background-size: calc(100cqw - var(--ins) * 2) calc(100% - var(--ins) * 2) !important; box-shadow: none !important;
}
#hud.hud2 .hud-plate:not(#_) .pbar em {
  position: absolute !important; inset: 0 !important; z-index: 2; display: flex !important; align-items: center; justify-content: center; padding-right: calc(var(--hh) * .4);
  font-size: calc(var(--hh) * .5) !important; line-height: 1 !important; font-weight: 700 !important; color: #fff !important; text-shadow: 0 0 2px #000, 0 1px 1px #000, 0 0 3px #000 !important; letter-spacing: .2px;
}
#hud.hud2 .hud-plate:not(#_) .pbar.mp em { font-size: calc(var(--hh) * .62) !important; }
#hud.hud2 .hud-plate:not(#_) .pbar.xp {
  height: 4px !important; margin: 1px calc(var(--mh) * 1.1) 0 calc(var(--hh) * .1) !important; background: rgba(0, 0, 0, .7) !important; border-radius: 2px !important;
  box-shadow: 0 0 0 1px rgba(150, 110, 70, .5) !important; overflow: hidden !important;
}
#hud.hud2 .hud-plate:not(#_) .pbar.xp i { background: linear-gradient(180deg, #ffe58a, #d99a20) !important; height: 100% !important; border-radius: 0 !important; }
#hud.hud2 .hud-plate:not(#_):hover .avatar { filter: brightness(1.12); }

/* ---- thú cưng · người đang chọn: vòng tròn nhỏ không sừng ---- */
#hud.hud2 .hud-plate.pet-mini:not(#_), #hud.hud2 .hud-plate.tplate:not(#_) { --k: .27; --hh: 15px; --mh: 11px; --pw: 196px; height: calc(228px * var(--k)) !important; }
#hud.hud2 .hud-plate.tplate:not(#_) { --k: .32; --hh: 17px; --mh: 12px; --pw: 230px; }
#hud.hud2 .hud-plate.pet-mini:not(#_)::before, #hud.hud2 .hud-plate.tplate:not(#_)::before { width: calc(228px * var(--k)); height: calc(228px * var(--k)); background-image: var(--hf-av2) !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) :is(.avatar, .avatar-ring) { left: calc(32px * var(--k)) !important; top: calc(32px * var(--k)) !important; width: calc(164px * var(--k)) !important; height: calc(164px * var(--k)) !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .avatar-ring { background-image: var(--hf-ring2) !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .lv-badge { left: calc(4px * var(--k)) !important; top: calc(150px * var(--k)) !important; width: calc(84px * var(--k)) !important; height: calc(84px * var(--k)) !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .lv-badge b { font-size: calc(38px * var(--k)) !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .plate-body { left: calc(190px * var(--k)) !important; top: calc(26px * var(--k)) !important; width: calc(var(--pw) - 190px * var(--k)) !important; gap: 2px !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .pname { font-size: 11.5px !important; padding-left: calc(46px * var(--k)) !important; }
#hud.hud2 .hud-plate.pet-mini:not(#_) .pbar.pp-joy { height: 3px !important; }
#hud.hud2 .hud-plate.pet-mini:not(#_) .pbar.pp-joy i { background: linear-gradient(180deg, #ffe58a, #e3a92b 60%, #b57a12) !important; }   /* 1.28.8: thanh mảnh = kinh nghiệm pet */

/* ---- nút Hòa bình / PK: tấm vát xiên nhỏ, chấm màu trạng thái ---- */
#hud.hud2 .pk-state:not(#_) {
  height: 20px; padding: 0 14px 0 7px; gap: 5px; border: 0 !important; border-radius: 0 !important; color: #dff5d8; font-size: 11px; font-weight: 800;
  background: none !important; box-shadow: none !important; isolation: isolate; text-shadow: 0 1px 2px #000;
  border-style: solid !important; border-color: transparent !important; border-width: 2px 10px 2px 2px !important;
  border-image: var(--hf-mpbg) 8 50 8 8 fill / 2px 10px 2px 2px stretch !important;
}
#hud.hud2 .pk-state:not(#_) i { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #d8ffd8, #3fae4a) !important; box-shadow: 0 0 5px #3fae4a, 0 0 0 1px rgba(0, 0, 0, .5) !important; }
#hud.hud2 .pk-state.on:not(#_) { color: #fff; animation: none; border-image: var(--hf-hpbg) 8 50 8 8 fill / 2px 10px 2px 2px stretch !important; filter: drop-shadow(0 0 5px rgba(230, 70, 40, .8)); }
#hud.hud2 .pk-state.on:not(#_) i { background: radial-gradient(circle at 40% 35%, #ffd8c8, #e0442a) !important; box-shadow: 0 0 6px #ff5a36, 0 0 0 1px rgba(0, 0, 0, .5) !important; }
#hud.hud2 .pk-state.jail:not(#_) { color: #ddd; filter: grayscale(1); }
#hud.hud2 .pk-state.img:not(#_) i { width: 13px; height: 13px; border-radius: 0; box-shadow: none !important; background: var(--pkimg) center / contain no-repeat !important; }

/* ---- đồng đội: ảnh mặt tròn trong vòng nhỏ ---- */
#hud.hud2 .pt-plate .pt-av:not(#_) { border-radius: 50% !important; overflow: visible; box-shadow: none !important; border: 0 !important; background: #120b06 !important; }
#hud.hud2 .pt-plate .pt-av:not(#_) canvas { border-radius: 50%; }
#hud.hud2 .pt-plate .pt-av:not(#_)::after { content: ""; position: absolute; inset: -22%; background: var(--hf-av2) center / 100% 100% no-repeat; pointer-events: none; z-index: 1; }
#hud.hud2 .pt-plate .pt-av:not(#_) .pt-lv, #hud.hud2 .pt-plate .pt-av:not(#_) .pt-crown { z-index: 2; }

@media (max-height: 560px), (max-width: 900px) {
  #hud.hud2 .hud-plate:not(#_) { --k: .29; --hh: 16px; --mh: 11px; --pw: 218px; }
  #hud.hud2 .hud-plate:not(#_) .pname { font-size: 11.5px !important; }
  #hud.hud2 .hud-plate:not(#_) .plate-body { gap: 2px !important; }
  #hud.hud2 .hud-plate:not(#_) .pbar.xp { height: 3px !important; }
  #hud.hud2 .hud-plate.pet-mini:not(#_) { --k: .21; --hh: 12px; --mh: 9px; --pw: 158px; }
  #hud.hud2 .hud-plate.tplate:not(#_) { --k: .25; --hh: 14px; --mh: 10px; --pw: 190px; }
  #hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .pname { font-size: 10px !important; }
  #hud.hud2 .pk-state:not(#_) { height: 17px; font-size: 10px; padding: 0 12px 0 5px; }
  #hud.hud2 .pk-state:not(#_) i { width: 8px; height: 8px; }
}

/* ===== 1.28.6: viền ô trang bị theo SAO (1 trắng · 2 xanh lá · 3 xanh nước biển · 4 tím · 5 vàng); 5 sao phát sáng ===== */
.rar[data-rar="s1"]::before { opacity: .55; }
:is(.inv-slot, .eq, .fg-slot, .bx-slot, .bx-hole).rar[data-rar="s5"]::before { animation: rarGlowIn 2.2s ease-in-out infinite; }
.rar[data-rar="s4"], .rar[data-rar="s5"] { outline-width: 2.5px !important; }
.ii-stars.s1 b { color: #e6e6e6 !important; text-shadow: 0 1px 1px #000 !important; }
.ii-stars.s2 b { color: #5fd25a !important; text-shadow: 0 0 4px rgba(76, 194, 74, .6), 0 1px 1px #000 !important; }
.ii-stars.s3 b { color: #4f9ff0 !important; text-shadow: 0 0 4px rgba(61, 139, 217, .6), 0 1px 1px #000 !important; }
.ii-stars.s4 b { color: #b866ee !important; text-shadow: 0 0 4px rgba(163, 79, 216, .6), 0 1px 1px #000 !important; }
.ii-stars.s5 b { color: #ffc62a !important; text-shadow: 0 0 5px rgba(240, 176, 32, .8), 0 1px 1px #000 !important; }

/* ===== 1.28.6: Cửa hàng Ngọc · xem trước ngoại trang toàn thân ===== */
#sp-pop .sp-prev-box { position: relative; height: 230px; margin: 0 0 8px; border: 1px solid rgba(217, 176, 113, .35);
  background: radial-gradient(ellipse at 50% 85%, rgba(255, 210, 130, .22), transparent 60%), linear-gradient(180deg, #2a1d14, #120b07); }
#sp-pop .sp-prev-box::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: 5%; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .45); filter: blur(3px); }
#sp-pop .sp-prev { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }
@media (max-height: 560px), (max-width: 900px) { #sp-pop .sp-prev-box { height: 150px; } }

/* ===== 1.28.6: thẻ Khu vực rộng rãi hơn (ít cột hơn), chữ không chạm mép, nhãn "Bạn ở đây" không đè chữ ===== */
#screen-game #win-worldmap .wm-zone .zone-grid:not(#_):not(#__) { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 12px; padding: 12px 4px 4px; }
#screen-game #win-worldmap .zone-card:not(#_):not(#__) { padding: 16px 16px 12px !important; gap: 8px; min-height: 92px; overflow: visible; }
#screen-game #win-worldmap .zone-card .zc-head { gap: 12px; }
#screen-game #win-worldmap .zone-card .zc-foot { gap: 12px; }
@media (max-height: 560px), (max-width: 900px) {
  #screen-game #win-worldmap .wm-zone .zone-grid:not(#_):not(#__) { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 10px; padding-top: 10px; }
  #screen-game #win-worldmap .zone-card:not(#_):not(#__) { padding: 13px 12px 9px !important; min-height: 74px; gap: 6px; }
}

/* ===== 1.28.6b: phần màu thanh máu / mana khít với nền vát xiên: dải màu đầy đủ (đầu vát vẽ bằng border-image để giữ
   đúng góc vát, song song với nền) nằm trong ô <i> rộng theo % máu, phần thừa bị cắt ===== */
#hud.hud2 .hud-plate:not(#_):not(#__) .pbar:not(.xp) i {
  left: var(--ins) !important; top: var(--ins) !important; bottom: var(--ins) !important; height: auto !important;
  max-width: calc(100% - var(--ins) - var(--hh) * .26) !important; overflow: hidden !important; background: none !important;
}
#hud.hud2 .hud-plate:not(#_):not(#__) .pbar:not(.xp) i::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(100cqw - var(--ins) - var(--hh) * .26); box-sizing: border-box;
  border-style: solid; border-color: transparent; border-width: 0 calc(var(--hh) * .38) 0 0;
  border-image: var(--fill) 0 40 0 0 fill / 0 calc(var(--hh) * .38) 0 0 stretch;
}
/* 1.28.6b: hàng chọn ô lắp kỹ năng ở đáy bảng (thay hàng nút) */
#win-character .skv-pick:not(#_) { flex: 0 0 auto; margin-top: 4px; padding: 6px; gap: 6px; border-style: solid; background: rgba(40, 70, 30, .35); }
#win-character .skv-pick .skv-slot { width: 40px; height: 40px; }
#win-character .skv-pick .skv-pick-x { margin-left: 6px; padding: 0 12px; height: 34px; }
@media (max-height: 560px), (max-width: 900px) { #win-character .skv-pick .skv-slot { width: 34px; height: 34px; } }
#win-character .skv-pick > span { white-space: nowrap; }
/* 1.28.6b: màn đăng nhập / đăng ký trên iPhone (cả trình duyệt trong Zalo, Facebook): luôn cuộn được, nút dưới cùng không bị khuất */
#screen-auth:not(#_) { overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); touch-action: pan-y; }

/* 1.28.8: ô vật phẩm phần thưởng (Phúc lợi, Quà cấp độ, Nhiệm vụ: Hiện tại / Hoạt động) to và cùng kiểu ô Hành trang */
#win-quest, #win-welfare { --rwc: 56px; }
@media (max-width: 900px), (max-height: 520px) { #win-quest, #win-welfare { --rwc: 46px; } }
#win-quest:not(#_):not(#__) .rw-cell, #win-welfare:not(#_):not(#__) .rw-cell { width: var(--rwc) !important; height: var(--rwc) !important; flex: 0 0 var(--rwc) !important; min-width: 0 !important; background-size: 78% !important; }
#win-quest:not(#_):not(#__) .rw-cell .q, #win-welfare:not(#_):not(#__) .rw-cell .q { font-size: 11px !important; right: 4px !important; bottom: 2px !important; max-width: calc(100% - 4px); overflow: hidden; }
#win-quest:not(#_) .qw-rw, #win-welfare:not(#_) .wf-cells { gap: 6px !important; flex-wrap: wrap; }
#win-welfare:not(#_) .wf-row { min-height: calc(var(--rwc) + 14px); height: auto !important; }
/* Hoạt động: phần thưởng nằm cùng hàng, bên phải thanh tiến độ (không còn nằm dưới) */
@media (min-width: 600px) {
  #win-quest:not(#_) .qw-dtask .so-info { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 6px; align-items: center; }
  #win-quest:not(#_) .qw-dtask .so-info > b, #win-quest:not(#_) .qw-dtask .so-info > .qd-prog { grid-column: 1; }
  #win-quest:not(#_) .qw-dtask .so-info > .qw-drw { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; justify-content: flex-end; }
}
#win-quest:not(#_) .qw-dtask { height: auto !important; min-height: calc(var(--rwc) + 14px); }

/* 1.28.9: số lượng trong ô (Hành trang, Phúc lợi, Nhiệm vụ, Rèn…) đẩy lên trên khung viền, không bị viền che */
:is(.inv-slot, .bx-slot, .fg-slot):not(#_):not(#__) .q { z-index: 3 !important; bottom: 6px !important; right: 7px !important; line-height: 1 !important; }
:is(.inv-slot, .bx-slot, .fg-slot):not(#_):not(#__) .pl { z-index: 3; }

/* 1.28.9: trang Thông tin nhân vật — máy tính 2 cột, điện thoại 1 cột (không bị che); nút Phân phối điểm nằm cùng hàng, bên phải */
#win-character:not(#_) #char-stats.dk-stats { min-width: 0; overflow-x: hidden; }
#win-character:not(#_) #char-stats .ds-cell { min-width: 0; }
#win-character:not(#_) #char-stats .ds-cell b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px), (max-height: 520px) {
  #win-character:not(#_) #char-stats.dk-stats { grid-template-columns: minmax(0, 1fr) !important; }
  #win-character:not(#_) #char-stats .ds-cell { padding: 4px 2px; }
}
#win-character:not(#_) .cw-infofoot { flex-wrap: nowrap !important; flex-direction: row !important; align-items: center !important; }
#win-character:not(#_) .cw-infofoot > span { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
#win-character:not(#_) .cw-infofoot > .pbtn { flex: 0 0 auto; white-space: nowrap; margin: 0 !important; }

/* =====================================================================
   1.28.12 — Giao diện điện thoại: Hành trang ô vuông 5×4, Rương xếp ngang, menu, nút X
   ===================================================================== */
@media (max-height: 560px), (max-width: 900px) {
  /* --- Hành trang: ô VUÔNG, 5 ô mỗi hàng, 4 hàng; ô sát nhau hơn và chừa lề để không bị khung che --- */
  #win-bag .bag-gridbox { height: calc(var(--cell) * 4 + 3px * 3 + 14px) !important; padding: 7px 14px !important; }
  #win-bag .inv-grid { grid-template-columns: repeat(5, var(--cell)) !important; grid-auto-rows: var(--cell) !important; gap: 3px !important; justify-content: center; align-content: start; }
  #win-bag .inv-grid > .inv-slot { width: var(--cell) !important; height: var(--cell) !important; aspect-ratio: 1 / 1 !important; min-height: 0 !important; }

  /* --- Menu ☰ xổ ra: biểu tượng to, cột sát nhau, KHÔNG đè lên nút ☰ (mở xuống dưới nút) --- */
  .menu-grid { --mc: clamp(58px, 9vw, 70px) !important; --mi: clamp(42px, 13vh, 54px) !important; gap: 3px 0 !important; top: calc(var(--ev-top, 140px) + 54px) !important; }
  .menu-grid button { font-size: 11px !important; }
  .menu-grid .mi { background-size: 60% !important; box-shadow: inset 0 0 0 2px #e2a94e, 0 2px 5px rgba(0,0,0,.55) !important; }
  #hud #btn-menu.pad-toggle { z-index: 22 !important; }   /* nút ☰ luôn nổi trên menu, bấm đóng được */
}

/* --- Nút X đóng: to và cân đối ở MỌI popup (máy tính & điện thoại) --- */
#screen-game .dk-x, #screen-game .window.parch-win > .parch > .parch-close, #chat-panel.dk-chat .cp-close {
  width: 48px !important; height: 48px !important; font-size: 22px !important; top: -12px !important; right: -12px !important; border-radius: 9px !important;
}
#screen-game .item-pop .ip-x, #item-pop.item-pop .ip-x, #sp-pop.item-pop .ip-x, #mk-modal .ip-x {
  width: 44px !important; height: 44px !important; font-size: 20px !important; border-radius: 9px !important;
}
@media (max-height: 560px), (max-width: 900px) {
  #screen-game .dk-x, #screen-game .window.parch-win > .parch > .parch-close, #chat-panel.dk-chat .cp-close {
    width: 44px !important; height: 44px !important; font-size: 20px !important; top: -10px !important; right: -10px !important;
  }
  #screen-game .item-pop .ip-x, #item-pop.item-pop .ip-x, #sp-pop.item-pop .ip-x, #mk-modal .ip-x { width: 40px !important; height: 40px !important; font-size: 18px !important; }
}


/* =====================================================================
   1.28.14 — Rương đồ: cửa sổ bên trái (cùng cỡ Nhân vật / Lò rèn), Hành trang thật bên phải.
   Ô vuông cùng cỡ Hành trang, số cột tự vừa khung (không bị che, không thừa).
   ===================================================================== */
#win-storage .stor-body { gap: 8px !important; }
#win-storage .stor-tabs { display: flex !important; flex-direction: row !important; flex: 0 0 auto; width: auto !important; gap: 6px !important; margin: 0 !important; }
#win-storage .stor-tab { width: 46px !important; height: 46px !important; flex: 0 0 46px !important; }
#win-storage .stor-gridbox { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; overflow-x: hidden !important; padding: 10px 12px !important; }
#win-storage .inv-grid.stor-grid {
  display: grid !important; grid-template-columns: repeat(auto-fill, var(--cell)) !important; grid-auto-rows: var(--cell) !important;
  gap: var(--cg) !important; justify-content: center !important; align-content: start !important;
}
#win-storage .inv-grid.stor-grid > .inv-slot { width: var(--cell) !important; height: var(--cell) !important; aspect-ratio: 1 / 1 !important; min-height: 0 !important; }
#win-storage .stor-foot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px !important; }
@media (max-height: 560px), (max-width: 900px) {
  #win-storage .stor-body { gap: 5px !important; padding: 5px 7px 6px !important; }
  #win-storage .stor-tab { width: 32px !important; height: 32px !important; flex-basis: 32px !important; }
  #win-storage .stor-gridbox { padding: 6px 10px !important; }
  #win-storage .inv-grid.stor-grid { gap: 3px !important; }
  #win-storage .dk-hint { display: none !important; }
  #win-storage .stor-foot { gap: 4px !important; }
  #win-storage .stor-cnt { font-size: 11px !important; }
  #win-storage .stor-gold { padding: 2px 6px !important; gap: 5px !important; }
  #win-storage .stor-gold .sg-k { font-size: 11px !important; }
  #win-storage .stor-gold .pbtn, #win-storage .stor-row .pbtn { height: 26px !important; min-width: 0 !important; padding: 0 10px !important; font-size: 11px !important; }
}

/* ===== 1.28.14: Nạp Ngọc (PayPal) ===== */
#win-topup .parch { width: min(640px, calc(100vw - 24px)) !important; height: auto !important; max-height: calc(100dvh - 24px) !important; margin-left: 0 !important; }
#win-topup .tp-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
#win-topup .tp-step[hidden] { display: none !important; }
#win-topup .tp-step { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
#win-topup .tp-lead { margin: 0; font-size: 15px; line-height: 1.45; text-align: center; }
#win-topup .tp-note { margin: 0; font-size: 13px; opacity: .8; text-align: center; line-height: 1.4; }
#win-topup .tp-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#win-topup .tp-pack { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; text-align: left;
  padding: 12px 14px; border-radius: 12px; border: 2px solid #9c6f3a; background: linear-gradient(180deg, rgba(80,48,22,.85), rgba(46,26,12,.9)); color: #f6e3b4; cursor: pointer; font: inherit; transition: transform .08s, border-color .12s; }
#win-topup .tp-pack:hover { border-color: #f0c24f; transform: translateY(-1px); }
#win-topup .tp-pack:disabled { opacity: .6; cursor: wait; }
#win-topup .tp-gem { grid-row: 1 / 3; width: 44px; height: 44px; background: center / contain no-repeat; }
#win-topup .tp-pack b { font-size: 18px; color: #ffe08a; }
#win-topup .tp-pack span { font-size: 15px; font-weight: 700; color: #b9e98f; }
#win-topup .tp-go { align-self: center; text-decoration: none; text-align: center; width: min(360px, 100%) !important; min-width: 0; }
#win-topup .tp-acts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
#win-topup .tp-msg { margin: 0; min-height: 20px; text-align: center; font-size: 14px; color: #b9e98f; }
#win-topup .tp-msg.bad { color: #ff9a85; }
#win-shop .shop-have .tp-open { flex: 0 0 auto; padding: 4px 14px !important; min-height: 0; font-size: 14px; }
#win-shop .shop-have .tp-open[hidden] { display: none !important; }
@media (max-height: 560px), (max-width: 900px) {
  #win-topup .parch { width: min(560px, calc(100vw - 24px)) !important; }
  #win-topup .tp-packs { gap: 6px; }
  #win-topup .tp-pack { padding: 7px 10px; grid-template-columns: 34px 1fr; }
  #win-topup .tp-gem { width: 34px; height: 34px; }
  #win-topup .tp-pack b { font-size: 15px; }
  #win-topup .tp-pack span { font-size: 13px; }
  #win-topup .tp-lead { font-size: 13px; }
  #win-topup .tp-note { font-size: 11px; }
}
/* 1.28.15: vuốt cuộn Rương đồ trên điện thoại — chỉ khung ngoài cuộn (lưới bên trong không tự cuộn / không chặn vuốt) */
#win-storage .inv-grid.stor-grid { overflow: visible !important; overscroll-behavior: auto !important; height: auto !important; flex: 0 0 auto !important; }
#win-storage .stor-gridbox { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y !important; }
#win-storage .stor-gridbox { scrollbar-width: thin; scrollbar-color: #c8913f rgba(0,0,0,.35); scrollbar-gutter: stable; cursor: grab; }
#win-storage .stor-gridbox.drag { cursor: grabbing; user-select: none; }
#win-storage .stor-gridbox::-webkit-scrollbar { width: 8px; display: block !important; }
#win-storage .stor-gridbox::-webkit-scrollbar-track { background: rgba(0,0,0,.35); border-radius: 4px; }
#win-storage .stor-gridbox::-webkit-scrollbar-thumb { background: #c8913f; border-radius: 4px; }

/* ===== 1.28.17: Rương may mắn ===== */
#win-gacha .parch { position: relative; }
#win-gacha .gc-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; padding: 4px 6px 6px; }
#win-gacha .gc-main { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 10px; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 38%, rgba(255,190,90,.22), rgba(0,0,0,0) 62%), linear-gradient(180deg, rgba(40,20,60,.55), rgba(20,10,6,.5)); border: 1px solid rgba(242,195,91,.25); overflow: hidden; }
#win-gacha .gc-stage { position: relative; width: min(100%, 300px); aspect-ratio: 1.15; display: grid; place-items: center; flex: 0 1 auto; min-height: 0; }
#win-gacha .gc-rays { position: absolute; inset: -12%; background: repeating-conic-gradient(from 0deg, rgba(255,215,120,.16) 0 9deg, rgba(255,215,120,0) 9deg 22deg); border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); animation: gc-spin 22s linear infinite; }
@keyframes gc-spin { to { transform: rotate(360deg); } }
#win-gacha .gc-chest { position: relative; width: 82%; height: 82%; background: center / contain no-repeat; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)) drop-shadow(0 0 22px rgba(255,190,80,.45)); animation: gc-float 3.2s ease-in-out infinite; }
#win-gacha .gc-chest.noimg { background: linear-gradient(180deg, #d9a441 0 36%, #5a3410 36% 42%, #9a5a22 42%); border: 4px solid #3a2008; border-radius: 18px 18px 10px 10px; width: 60%; height: 50%; }
#win-gacha .gc-chest.shake { animation: gc-shake .5s ease-in-out; }
@keyframes gc-float { 50% { transform: translateY(-6px); } }
@keyframes gc-shake { 20% { transform: rotate(-6deg) scale(1.04); } 40% { transform: rotate(6deg) scale(1.08); } 60% { transform: rotate(-4deg) scale(1.08); } 80% { transform: rotate(3deg) scale(1.04); } }
#win-gacha .gc-pity { width: min(100%, 360px); text-align: center; font-size: 13px; font-weight: 700; color: #ffe2a0; }
#win-gacha .gc-bar { margin-top: 5px; height: 10px; border-radius: 6px; background: rgba(0,0,0,.5); border: 1px solid rgba(242,195,91,.35); overflow: hidden; }
#win-gacha .gc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb340, #ff6a1a); box-shadow: 0 0 10px #ff9f1a; transition: width .5s; }
#win-gacha .gc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(100%, 380px); }
#win-gacha .gc-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 8px; border-radius: 12px; cursor: pointer; font: inherit; color: #2a1405;
  background: linear-gradient(180deg, #ffe08a, #e2a33a 55%, #b8771f); border: 2px solid #5a3410; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 4px 0 #4a2a0e; transition: transform .08s, filter .15s; }
#win-gacha .gc-btn.x10 { background: linear-gradient(180deg, #e6b3ff, #a45bea 55%, #6e2fb0); color: #fff; border-color: #3a1460; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 #2a0e48; text-shadow: 0 1px 2px #2a0e48; }
#win-gacha .gc-btn:hover:not(:disabled) { filter: brightness(1.08); }
#win-gacha .gc-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #4a2a0e; }
#win-gacha .gc-btn:disabled { opacity: .55; cursor: wait; }
#win-gacha .gc-btn.poor { filter: grayscale(.5) brightness(.85); }
#win-gacha .gc-btn b { font-size: 16px; font-weight: 900; }
#win-gacha .gc-cost { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
#win-gacha .gc-cost em { font-style: normal; font-size: 15px; }
#win-gacha .gc-gem { width: 18px; height: 18px; display: inline-block; background: center / contain no-repeat; }
#win-gacha .gc-btn small { position: absolute; top: -9px; right: -6px; padding: 2px 7px; border-radius: 999px; background: #ff3d5a; color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.4); text-shadow: none; }
#win-gacha .gc-have { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #ffe8bf; font-size: 14px; }
#win-gacha .gc-topup { padding: 3px 12px !important; min-height: 0; font-size: 13px; }
#win-gacha .gc-msg { margin: 0; min-height: 18px; font-size: 13px; color: #b9e98f; text-align: center; }
#win-gacha .gc-msg.bad { color: #ff9a85; }
#win-gacha .gc-side { min-height: 0; display: flex; flex-direction: column; gap: 6px; }
#win-gacha .gc-side-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #ffe2a0; }
#win-gacha .gc-side-h small { color: #c8b089; font-size: 11.5px; }
#win-gacha .gc-pool { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #c8913f transparent; }
#win-gacha .gc-tier { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 5px; padding: 4px 10px; border-radius: 7px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 35%, transparent), transparent); border-left: 3px solid var(--tc); }
#win-gacha .gc-tier:first-child { margin-top: 0; }
#win-gacha .gc-tier b { color: var(--tc); font-size: 14px; }
#win-gacha .gc-tier span { color: #ffe8bf; font-weight: 800; font-size: 13px; }
#win-gacha .gc-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
#win-gacha .gc-item { position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 6px 8px; border-radius: 9px; cursor: pointer; font: inherit;
  background: rgba(0,0,0,.35); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); color: #f6e7c3; }
#win-gacha .t-top .gc-item, #win-gacha .gc-item:hover { box-shadow: 0 0 10px color-mix(in srgb, var(--tc) 45%, transparent); }
#win-gacha .gc-item i { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 7px; background: rgba(0,0,0,.35) center / 80% no-repeat; }
#win-gacha .gc-item b { font-size: 12.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#win-gacha .gc-item small { color: var(--tc); font-weight: 800; font-size: 12px; }
#win-gacha .gc-item em { position: absolute; top: 3px; right: 4px; font-style: normal; font-size: 10px; font-weight: 800; color: #9be36b; }
#win-gacha .gc-item.owned i { filter: grayscale(.4); }
#win-gacha .gc-log { flex: 0 0 auto; max-height: 92px; overflow: hidden; font-size: 12px; color: #c8b089; border-top: 1px dashed rgba(242,195,91,.25); padding-top: 4px; }
#win-gacha .gc-log:empty { display: none; }
#win-gacha .gc-log b { color: #ff9f1a; font-size: 12.5px; }
#win-gacha .gc-log-r { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Kết quả */
#win-gacha .gc-res { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8,4,2,.82); border-radius: inherit; backdrop-filter: blur(2px); }
#win-gacha .gc-res[hidden] { display: none; }
#win-gacha .gc-res-box { width: min(760px, 94%); max-height: 94%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px; overflow: auto; }
#win-gacha .gc-res-t { font: 900 22px/1.1 'Playfair Display', serif; color: #ffd77a; text-shadow: 0 2px 0 #4a2a0e; }
#win-gacha .gc-res[data-best="top"] .gc-res-t { color: #ffb340; text-shadow: 0 0 18px #ff9f1a, 0 2px 0 #4a2a0e; }
#win-gacha .gc-res-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; width: 100%; }
#win-gacha .gc-res-grid.one { grid-template-columns: minmax(0, 220px); justify-content: center; }
#win-gacha .gc-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 28%, #1e1108), #140b05); border: 2px solid var(--tc); box-shadow: 0 0 14px color-mix(in srgb, var(--tc) 40%, transparent);
  animation: gc-pop .45s cubic-bezier(.2,.9,.3,1.3) both; }
#win-gacha .gc-card.t-top { box-shadow: 0 0 24px var(--tc), inset 0 0 20px color-mix(in srgb, var(--tc) 35%, transparent); }
#win-gacha .gc-card.t-top::before { content: ''; position: absolute; inset: -2px; border-radius: inherit; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%) -150% 0 / 250% 100% no-repeat; animation: gc-gleam 1.8s ease-in-out .5s infinite; pointer-events: none; }
@keyframes gc-pop { from { opacity: 0; transform: scale(.4) rotateY(90deg); } }
@keyframes gc-gleam { to { background-position: 150% 0; } }
#win-gacha .gc-card i { width: 56px; height: 56px; background: center / contain no-repeat; }
#win-gacha .gc-card b { font-size: 12.5px; line-height: 1.2; color: #fff; }
#win-gacha .gc-card small { font-size: 11px; font-weight: 800; color: var(--tc); }
#win-gacha .gc-card em { font-style: normal; font-size: 10.5px; color: #c8b089; line-height: 1.2; }
#win-gacha .gc-card em.pity { color: #ffb340; font-weight: 800; }
#win-gacha .gc-res-acts { display: flex; gap: 10px; }
#win-gacha .gc-res-acts .pbtn { min-width: 130px; }
#screen-game #win-shop .shop-have button.pbtn.gc-open:not(#_):not(#__):not(#___):not(#____) { flex: 0 0 auto; padding: 4px 12px !important; min-height: 0; font-size: 14px; background: linear-gradient(180deg, #e6b3ff, #8f45d6) !important; background-image: linear-gradient(180deg, #e6b3ff, #8f45d6) !important; border: 2px solid #3a1460 !important; border-image: none !important; border-radius: 8px !important; color: #fff !important; text-shadow: 0 1px 2px #2a0e48 !important; box-shadow: 0 0 10px rgba(190,120,255,.55) !important; }
#win-shop .shop-have .gc-open[hidden] { display: none !important; }
@media (max-height: 560px), (max-width: 900px) {
  #win-gacha .gc-body { gap: 8px; padding: 2px; }
  #win-gacha .gc-main { gap: 6px; padding: 6px; }
  #win-gacha .gc-stage { width: min(100%, 170px); }
  #win-gacha .gc-pity { font-size: 11px; } #win-gacha .gc-bar { height: 7px; margin-top: 3px; }
  #win-gacha .gc-btn { padding: 6px 4px; } #win-gacha .gc-btn b { font-size: 13px; } #win-gacha .gc-cost em { font-size: 13px; }
  #win-gacha .gc-have { font-size: 12px; } #win-gacha .gc-msg { font-size: 11px; min-height: 14px; }
  #win-gacha .gc-items { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; }
  #win-gacha .gc-item { grid-template-columns: 30px 1fr; padding: 4px 6px; column-gap: 6px; } #win-gacha .gc-item i { width: 30px; height: 30px; }
  #win-gacha .gc-item b { font-size: 11px; } #win-gacha .gc-item small { font-size: 10.5px; }
  #win-gacha .gc-tier { margin: 5px 0 3px; padding: 2px 8px; } #win-gacha .gc-tier b { font-size: 12px; }
  #win-gacha .gc-side-h small { display: none; } #win-gacha .gc-log { display: none; }
  #win-gacha .gc-res-box { gap: 6px; padding: 6px; } #win-gacha .gc-res-t { font-size: 17px; }
  #win-gacha .gc-res-grid { gap: 5px; } #win-gacha .gc-card { padding: 5px 4px; gap: 2px; } #win-gacha .gc-card i { width: 36px; height: 36px; }
  #win-gacha .gc-card b { font-size: 10.5px; } #win-gacha .gc-card em { display: none; } #win-gacha .gc-card em.pity { display: block; }
  #win-gacha .gc-res-acts .pbtn { min-width: 100px; height: 32px; }
}

/* ===== 1.28.17: Nạp Ngọc — x2 lần đầu + quà tích lũy nạp ===== */
#win-topup .parch { width: min(720px, calc(100vw - 24px)) !important; }
#win-topup .tp-pack { position: relative; }
#win-topup .tp-pack.first { border-color: #ff7a3a; box-shadow: 0 0 12px rgba(255,122,58,.35); }
#win-topup .tp-x2 { position: absolute; top: -9px; right: 8px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(180deg, #ff6a4a, #d8261a); color: #fff; font-style: normal; font-size: 11px; font-weight: 900; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
#win-topup .tp-bonus { grid-column: 2; color: #ffb37a; font-weight: 800; font-size: 12px; }
#win-topup .tp-ms { margin-top: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(242,195,91,.28); }
#win-topup .tp-ms[hidden] { display: none; }
#win-topup .tp-ms-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#win-topup .tp-ms-head b { color: #ffd77a; font-size: 15px; }
#win-topup .tp-ms-head span { color: #e8d4a8; font-size: 12.5px; }
#win-topup .tp-ms-bar { margin: 7px 0 8px; height: 8px; border-radius: 5px; background: rgba(0,0,0,.5); overflow: hidden; }
#win-topup .tp-ms-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7fd36a, #ffd45a); transition: width .5s; }
#win-topup .tp-ms-list { display: flex; flex-direction: column; gap: 6px; }
#win-topup .tp-ms-row { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid rgba(242,195,91,.15); }
#win-topup .tp-ms-row.ready { border-color: #7fd36a; box-shadow: 0 0 8px rgba(127,211,106,.3); }
#win-topup .tp-ms-row.got { opacity: .55; }
#win-topup .tp-ms-k { color: #ffe08a; font-size: 14px; }
#win-topup .tp-ms-its { display: flex; gap: 5px; flex-wrap: wrap; }
#win-topup .tp-ms-it { position: relative; width: 38px; height: 38px; border-radius: 7px; border: 1px solid rgba(242,195,91,.3); background: rgba(0,0,0,.35) center / 78% no-repeat; cursor: pointer; padding: 0; }
#win-topup .tp-ms-it span { position: absolute; right: 2px; bottom: 0; font-size: 10.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
#win-topup .tp-ms-btn { min-width: 86px; padding: 4px 10px !important; min-height: 0; height: 32px; font-size: 13px; }
@media (max-height: 560px), (max-width: 900px) {
  #win-topup .tp-ms { padding: 6px 8px; } #win-topup .tp-ms-row { grid-template-columns: 62px 1fr auto; padding: 3px 6px; }
  #win-topup .tp-ms-it { width: 30px; height: 30px; } #win-topup .tp-ms-btn { min-width: 70px; height: 28px; font-size: 12px; }
  #win-topup .tp-ms-k { font-size: 12.5px; }
}

/* ===== 1.28.18: Cửa hàng Ngọc — giao diện riêng ===== */
#win-shop.gemshop .gs-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
#win-shop.gemshop .gs-hero[hidden], #win-shop:not(.gemshop) .gs-hero { display: none !important; }
#win-shop .gs-promo[hidden] { display: none !important; }
#win-shop .gs-promo { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 12px 4px 8px; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; color: #fff;
  border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 14px rgba(0,0,0,.45); transition: transform .12s, filter .15s; }
#win-shop .gs-promo.gacha { background: linear-gradient(110deg, #3a1268 0%, #7b2fc2 55%, #c06bff 100%); }
#win-shop .gs-promo.topup { background: linear-gradient(110deg, #5a2a06 0%, #c7781c 55%, #ffcf5a 100%); }
#win-shop .gs-promo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%) -160% 0 / 220% 100% no-repeat; animation: gs-gleam 3.6s ease-in-out infinite; pointer-events: none; }
#win-shop .gs-promo.topup::after { animation-delay: 1.8s; }
@keyframes gs-gleam { 60%, 100% { background-position: 160% 0; } }
#win-shop .gs-promo:hover { filter: brightness(1.08); transform: translateY(-1px); }
#win-shop .gs-p-ic { flex: 0 0 46px; width: 46px; height: 46px; background: center / contain no-repeat; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
#win-shop .gs-promo > span:not(.gs-cta) { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#win-shop .gs-promo b { font-size: 16px; font-weight: 900; text-shadow: 0 2px 3px rgba(0,0,0,.45); }
#win-shop .gs-promo small { font-size: 12px; font-weight: 600; opacity: .95; text-shadow: 0 1px 2px rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#screen-game #win-shop .gs-promo > .pbtn.gs-cta:not(#_):not(#__) { flex: 0 0 auto; display: inline-flex !important; align-items: center; justify-content: center; height: 34px !important; min-width: 108px !important; padding: 0 16px !important; font-size: 13.5px !important; font-weight: 900; color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.6) !important; pointer-events: none; }

#screen-game #win-shop.dock.gemshop .shop-list:not(#_):not(#__) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 10px !important; padding: 4px 2px !important; }
#screen-game #win-shop.dock.gemshop .shop-row.gs-card:not(#_):not(#__) { position: relative; display: flex !important; flex-direction: column; align-items: center; gap: 3px; min-height: 0; padding: 9px 8px 7px !important; border-radius: 12px !important; text-align: center; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 34%, transparent), transparent 62%), linear-gradient(180deg, #2c1b0f, #150b05) !important;
  border: 1px solid color-mix(in srgb, var(--rc) 60%, #3a2614) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 3px 10px rgba(0,0,0,.4) !important; transition: transform .12s, box-shadow .15s, border-color .15s; }
#screen-game #win-shop.dock.gemshop .shop-row.gs-card[hidden]:not(#_):not(#__) { display: none !important; }
#screen-game #win-shop.dock.gemshop .shop-row.gs-card:not(#_):not(#__):hover { transform: translateY(-2px); border-color: var(--rc) !important; box-shadow: 0 0 0 1px var(--rc), 0 6px 18px color-mix(in srgb, var(--rc) 45%, transparent) !important; }
#screen-game #win-shop.dock.gemshop .shop-row.gs-card.sel:not(#_):not(#__) { border-color: #ffd860 !important; box-shadow: 0 0 0 2px #ffd860, 0 0 16px rgba(255,216,96,.45) !important; }
#screen-game #win-shop.dock.gemshop .shop-row.gs-card.r-thuong:not(#_):not(#__) { --rc: #c8a070; }
#screen-game #win-shop.dock.gemshop .gs-card > i.gs-ic:not(#_) { position: relative; width: 50px !important; height: 50px !important; flex: 0 0 auto; margin: 0; border-radius: 0 !important; background-color: transparent !important; box-shadow: none !important;
  background-size: contain !important; background-position: center !important; filter: drop-shadow(0 4px 8px rgba(0,0,0,.55)) drop-shadow(0 0 10px color-mix(in srgb, var(--rc) 45%, transparent)); transition: transform .2s; }
#screen-game #win-shop.dock.gemshop .gs-card:hover > i.gs-ic:not(#_) { transform: scale(1.08) rotate(-2deg); }
#screen-game #win-shop.dock.gemshop .gs-card b.gs-name:not(#_) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal !important; min-height: 1.2em; font-size: 13.5px !important; line-height: 1.2; color: #fff2d4 !important; font-weight: 800; }
#screen-game #win-shop.dock.gemshop .gs-card small.gs-sub:not(#_) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal !important; min-height: 0; font-size: 11px !important; line-height: 1.25; color: #c8b089 !important; margin-bottom: 3px; }
#win-shop.dock.gemshop .gs-card > .gs-price { margin-top: auto; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 7px; line-height: 1.1; }
#win-shop.gemshop .gs-price s { font-size: 11.5px; color: #a08a6a; text-decoration-color: #ff6a5a; text-decoration-thickness: 2px; }
#win-shop.gemshop .gs-price span { display: inline-flex; align-items: center; gap: 4px; }
#win-shop.gemshop .gs-gem { width: 20px; height: 20px; display: inline-block; background: center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
#win-shop.gemshop .gs-price em { font-style: normal; font-size: 18px; font-weight: 900; color: #ffd860; text-shadow: 0 2px 0 #4a2a0e, 0 0 10px rgba(255,200,80,.35); }
#win-shop.gemshop .gs-card.on-sale .gs-price em { color: #ffe36e; }
#win-shop.gemshop .gs-card.poor .gs-price em { color: #ff9a8a; }
#win-shop.gemshop .gs-rib { position: absolute; top: 9px; left: -26px; z-index: 2; width: 92px; padding: 2px 0; transform: rotate(-38deg); text-align: center; font-size: 12px; font-weight: 900; color: #fff; letter-spacing: .3px;
  background: linear-gradient(180deg, #ff5a4a, #c81e14); box-shadow: 0 2px 6px rgba(0,0,0,.45); text-shadow: 0 1px 1px rgba(0,0,0,.4); }
#win-shop.gemshop .gs-badge { position: absolute; top: 7px; right: 7px; z-index: 2; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: #2a1405; background: #ffd860; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
#win-shop.gemshop .gs-badge.ok { background: #7fd36a; color: #10300a; }
#win-shop.gemshop .gs-card.done { filter: saturate(.75); }
#win-shop.gemshop .gs-card.done .gs-price { opacity: .55; }
#win-shop.gemshop .gs-end { font-size: 10.5px; font-weight: 800; color: #ff8a6a; }
/* chân cửa hàng: biểu tượng Ngọc không có khung nền */
#screen-game #win-shop.dock.gemshop .shop-have .icon-gold:not(#_) { background-color: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; width: 20px !important; height: 20px !important; }
#win-shop.gemshop .shop-row i .pl { display: none; }
@media (max-height: 560px), (max-width: 900px) {
  #win-shop.gemshop .gs-hero { gap: 5px; margin-bottom: 5px; }
  #win-shop .gs-promo { min-height: 40px; padding: 3px 8px 3px 5px; gap: 6px; border-radius: 9px; }
  #win-shop .gs-p-ic { flex-basis: 34px; width: 34px; height: 34px; }
  #win-shop .gs-promo b { font-size: 13px; } #win-shop .gs-promo small { font-size: 10.5px; }
  #screen-game #win-shop .gs-promo > .pbtn.gs-cta:not(#_):not(#__) { height: 26px !important; min-width: 78px !important; padding: 0 10px !important; font-size: 11px !important; }
  #screen-game #win-shop.dock.gemshop .shop-list:not(#_):not(#__) { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important; gap: 6px !important; }
  #screen-game #win-shop.dock.gemshop .shop-row.gs-card:not(#_):not(#__) { padding: 8px 5px 6px !important; gap: 2px; border-radius: 10px !important; }
  #screen-game #win-shop.dock.gemshop .gs-card > i.gs-ic:not(#_) { width: 40px !important; height: 40px !important; margin: 0; }
  #screen-game #win-shop.dock.gemshop .gs-card b.gs-name:not(#_) { font-size: 11.5px !important; }
  #screen-game #win-shop.dock.gemshop .gs-card small.gs-sub:not(#_) { display: none !important; }
  #win-shop.gemshop .gs-price em { font-size: 14.5px; } #win-shop.gemshop .gs-gem { width: 15px; height: 15px; } #win-shop.gemshop .gs-price s { font-size: 10px; }
  #win-shop.gemshop .gs-rib { top: 6px; left: -28px; width: 84px; font-size: 10px; }
  #win-shop.gemshop .gs-badge { top: 4px; right: 4px; font-size: 9px; padding: 1px 5px; }
}
@media (max-height: 420px) { #win-shop .gs-promo small { display: none; } }
#screen-game #win-shop.gemshop .shop-have :is(.gc-open, .tp-open):not(#_):not(#__):not(#___):not(#____):not(#_____) { display: none !important; }   /* đã có ở dải quảng cáo trên đầu */
@media (max-height: 560px), (max-width: 900px) {
  #screen-game #win-shop.dock.gemshop .shop-cats:not([hidden]):not(#_):not(#__) { display: flex !important; gap: 5px; flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  #screen-game #win-shop.dock.gemshop .shop-cats:not(#_):not(#__)::-webkit-scrollbar { display: none; }
  #screen-game #win-shop.dock.gemshop .shop-cats > button:not(#_):not(#__) { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; padding: 0 12px !important; white-space: nowrap; }
}
#screen-game #win-shop.gemshop #sp-modal :is(#sp-gicon, .icon-gold):not(#_):not(#__) { background-color: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; }

/* ===== 1.28.19: thông báo sự kiện / Giờ vàng — khung nhỏ ngay trên khung chat (dùng ảnh khung nút chung) ===== */
#hud > #ev-chip.ev-chip { top: auto !important; bottom: calc(14px + var(--sb, 0px) + 48px * var(--um, 1) + 6px) !important; left: 50% !important; transform: translateX(-50%) !important;
  height: 26px; max-width: min(460px, 60vw); padding: 0 16px !important; gap: 8px !important; border-radius: 13px; font-size: 12px; white-space: nowrap; overflow: hidden;
  background: rgba(14, 9, 5, .82); border: 1px solid rgba(232, 183, 101, .55); box-shadow: 0 2px 8px rgba(0,0,0,.45); animation: none; z-index: 7; }
#hud > #ev-chip.ev-chip b { color: #ffd860; font-weight: 800; }
#hud > #ev-chip.ev-chip span { color: #fff3d6; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#hud > #ev-chip.ev-chip em { color: #ffe9b0; font-weight: 800; }
body.kb-open #hud > #ev-chip.ev-chip { visibility: hidden; }
@media (max-height: 560px), (max-width: 900px) { #hud > #ev-chip.ev-chip { height: 20px; font-size: 10.5px; padding: 0 10px !important; gap: 5px !important; max-width: 56vw; } }

/* 1.28.22: Cài đặt → Nhập mã quà: nút lấy mã tại Fanpage */
#win-settings .code-fb { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 6px; padding: 6px 14px 6px 6px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 13.5px; color: #fff;
  background: linear-gradient(180deg, #3b8cff, #1658d6); border: 1px solid #0d3fa8; box-shadow: 0 3px 10px rgba(20, 90, 220, .4); }
#win-settings .code-fb[hidden] { display: none; }
#win-settings .code-fb i { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #1658d6; display: grid; place-items: center; font: 900 15px/1 Arial, sans-serif; font-style: normal; padding-top: 3px; box-sizing: border-box; }

/* 1.28.26: bỏ chữ AUTO dưới nút Tự động */

/* 1.28.24: nút mở Rương may mắn màu xanh (đồng bộ nút đồng ý của game) */
#win-gacha .gc-btn, #win-gacha .gc-btn.x10 { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); background: linear-gradient(180deg, #8fe06a, #4caa2c 55%, #2f7a1c); border-color: #1d5a14; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 #17470f; }
#win-gacha .gc-btn.x10 { background: linear-gradient(180deg, #a6f07a, #5cc236 55%, #33861e); }
#win-gacha .gc-btn:active:not(:disabled) { box-shadow: 0 1px 0 #17470f; }

/* 1.28.24 — Ổ khóa trên đồ khóa: vẽ bằng SVG (vàng kim, có lỗ khóa) thay biểu tượng chữ */
.inv-slot.bnd::after, .eq.bnd::after { content: "" !important; font-size: 0 !important; filter: none; inset: 0; }
#ip-icon.bnd::after { content: none !important; }
.bnd-lk {
  position: absolute; z-index: 3; left: 5px; top: 5px; width: 9px; height: 10px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff1b8'/%3E%3Cstop offset='.45' stop-color='%23f1c24a'/%3E%3Cstop offset='1' stop-color='%23a8680e'/%3E%3C/linearGradient%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f4f4f4'/%3E%3Cstop offset='1' stop-color='%238a8f99'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7 13V9a6 6 0 0 1 12 0v4' fill='none' stroke='%233a2208' stroke-width='5.4'/%3E%3Cpath d='M7 13V9a6 6 0 0 1 12 0v4' fill='none' stroke='url(%23s)' stroke-width='3'/%3E%3Crect x='2' y='12' width='22' height='16' rx='3.5' fill='url(%23g)' stroke='%233a2208' stroke-width='1.8'/%3E%3Crect x='4' y='14' width='18' height='2' rx='1' fill='%23fff8d8' opacity='.7'/%3E%3Ccircle cx='13' cy='19.5' r='2.4' fill='%233a2208'/%3E%3Cpath d='M12 20.5h2l.6 4.2h-3.2z' fill='%233a2208'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.8));
}
#ip-icon .bnd-lk { width: 12px; height: 14px; left: 4px; top: 4px; }
.bnd-lk { display: block; font-style: normal; }
/* Số lượng trên ô đồ: chữ thường, không in đậm */
.inv-slot .q { font-weight: 500 !important; }
#win-worldmap .wm-iright:empty { display: none !important; }
/* 1.28.26: viền màu theo sao + vệt sáng cường hóa nằm sát ngay trên viền khung ô (không thụt vào trong / lòi ra ngoài) */
:is(.inv-slot, .eq, .fg-slot, .bx-slot).rar::before { inset: 2px !important; border-radius: 2px !important; }
:is(.inv-slot, .eq, .fg-slot, .bx-slot, .shop-row i)[data-glow] > .eglow { inset: 1px !important; border-radius: 2px !important; }
:is(.inv-slot, .eq)[data-glow="3"], :is(.inv-slot, .eq)[data-glow="4"] { box-shadow: none !important; }
:is(.inv-slot, .eq) > .pl { z-index: 4; }
/* 1.28.26: ô trang bị trên người to hết cỡ theo chiều cao khung (đặc biệt trên điện thoại) — 5 ô mỗi cột lấp kín cột */
#win-character .cw-eq, #win-pinfo .cw-eq { container-type: size; grid-template-columns: auto minmax(0, 1fr) auto !important; }
#win-character .cw-eq .eq-col, #win-pinfo .cw-eq .eq-col { justify-content: space-between !important; gap: 4px !important; }
#win-character .cw-eq .eq-col .eq, #win-pinfo .cw-eq .eq-col .eq { --eqz: min(calc((100cqh - 20px) / 5), 24cqw, 84px); flex: 0 0 var(--eqz) !important; width: var(--eqz) !important; height: var(--eqz) !important; }

/* 1.28.26: thẻ Bán ở cửa hàng NPC — lưới ô đồ giống Hành trang, bấm để tích chọn */
#win-shop .shop-list.sell-mode { align-content: start; }
#win-shop .shop-list .sell-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; padding: 2px; align-content: start; }
#win-shop .shop-list .sell-grid .sell-cell { position: relative; width: auto !important; height: auto !important; aspect-ratio: 1; min-width: 0; padding: 0; cursor: pointer; }
#win-shop .shop-list .sell-grid .sell-cell .sell-ck { position: absolute; z-index: 5; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; display: none; pointer-events: none;
  background: #36b24a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; box-shadow: 0 0 0 1.5px #0d4a18, 0 1px 3px rgba(0,0,0,.6); }
#win-shop .shop-list .sell-grid .sell-cell.picked .sell-ck { display: block; }
#win-shop .shop-list .sell-grid .sell-cell.picked { outline: 2px solid #ffd76a; outline-offset: -2px; filter: brightness(1.12); }
@media (max-height: 560px), (max-width: 900px) { #win-shop .shop-list .sell-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; } #win-shop .shop-list .sell-grid .sell-cell .sell-ck { width: 13px; height: 13px; } }
/* 1.28.26: hàng chọn ô kỹ năng — bỏ chữ "Chọn ô", 5 ô to dễ bấm (không bị bóp nhỏ), nút × để đóng */
#win-character .skv-pick:not(#_) { flex-wrap: nowrap; justify-content: center; gap: 8px; }
#win-character .skv-pick .skv-slot, #win-character .skv-pick .skv-slot:not(#_) { flex: 0 0 auto !important; width: 46px !important; height: 46px !important; min-width: 46px !important; }
#win-character .skv-pick .skv-pick-x:not(#_) { flex: 0 0 auto; width: 36px; min-width: 36px; height: 36px; padding: 0 !important; margin-left: 4px; font-size: 22px; line-height: 1; font-weight: 700; }
@media (max-height: 560px), (max-width: 900px) {
  #win-character .skv-pick .skv-slot, #win-character .skv-pick .skv-slot:not(#_) { width: 38px !important; height: 38px !important; min-width: 38px !important; }
  #win-character .skv-pick:not(#_) { gap: 4px; padding: 4px; }
  #win-character .skv-pick .skv-pick-x:not(#_) { width: 30px; min-width: 30px; height: 30px; font-size: 20px; margin-left: 2px; }
}
/* 1.28.27: điện thoại — mỗi bên 5 ô (1 cột), ô to hết chiều cao khung, khe giữa các ô hẹp lại */
@media (max-height: 560px), (max-width: 900px) {
  #win-character .cw-eq:not(#_), #win-pinfo .cw-eq:not(#_) { gap: 4px 10px !important; padding: 5px 8px !important; }
  #win-character .cw-eq .eq-col:not(#_), #win-pinfo .cw-eq .eq-col:not(#_) { gap: 2px !important; justify-content: space-between !important; }
  #win-character .cw-eq .eq-col .eq:not(#_), #win-pinfo .cw-eq .eq-col .eq:not(#_) { --eqz: min(calc((100cqh - 18px) / 5), 30cqw, 72px); }
  .dk .eq.has { background-size: 84%, 100% !important; }
}
/* 1.28.28: Hành trang 5 ô mỗi hàng, ô to bằng ô trang bị đang mặc; khung vừa khít lưới */
#screen-game { --cbWb: 520; }
#screen-game #win-bag { --cell: 85px; }
@media (max-height: 560px), (max-width: 900px) { #screen-game { --cbWb: 330; } #screen-game #win-bag { --cell: 50px; } }
#win-bag .inv-grid:not(#_) { grid-template-columns: repeat(5, var(--cell)) !important; justify-content: center; }
#win-bag .bag-gridbox:not(#_) { padding: 7px 6px !important; }
/* 1.28.27: thanh Máu · Mana · EXP sát vào nhau (nhân vật và thú cưng) */
#hud.hud2 .hud-plate:not(#_) .plate-body { gap: 0 !important; }
#hud.hud2 .hud-plate:not(#_) .pbar.mp, #hud.hud2 .hud-plate:not(#_) .pbar.xp { margin-top: -1px !important; }
#hud.hud2 .hud-plate:not(#_) .pname { margin-bottom: 1px !important; }
/* 1.28.27: thẻ Bán ở NPC — một khung duy nhất: lưới ô đồ + hàng chọn / tổng tiền / nút Bán */
#win-shop.sell-tab .shop-side { display: none !important; }
#win-shop.sell-tab .shop-listbox { flex: 1 1 auto !important; }
#win-shop .shop-list .sell-bar:not(#_) { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
#win-shop .shop-list .sell-bar .sell-tot { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; font-weight: 800; color: #ffe7ac; white-space: nowrap; }
#win-shop .shop-list .sell-bar .sell-tot b { display: inline-flex; align-items: center; gap: 4px; }
#win-shop .shop-list .sell-bar .sell-tot .cur-ic { width: 18px; height: 18px; background-size: contain; background-repeat: no-repeat; background-position: center; }
#win-shop .shop-list .sell-bar .sell-go { min-width: 110px; }
@media (max-height: 560px), (max-width: 900px) { #win-shop .shop-list .sell-bar .sell-go { min-width: 84px; padding: 3px 10px; } #win-shop .shop-list .sell-bar:not(#_) { gap: 4px; margin-bottom: 4px; } }
/* 1.28.28: thú cưng / người đang chọn — thanh Máu · Mana · EXP sát nhau như khung nhân vật */
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .plate-body { gap: 0 !important; }
#hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .pbar.mp, #hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .pbar.xp { margin-top: -1px !important; }
#win-shop .shop-search { display: none !important; }
#win-shop .shop-have .cur.goldb[hidden] { display: none !important; }

/* 1.28.28: biểu tượng Vàng khóa khi chưa có ảnh riêng: ảnh Vàng + ổ khóa nhỏ */
.icon-gold.gk { position: relative; overflow: visible; }
.icon-gold.gk::after { content: ''; position: absolute; right: -3px; bottom: -2px; width: 9px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff1b8'/%3E%3Cstop offset='.45' stop-color='%23f1c24a'/%3E%3Cstop offset='1' stop-color='%23a8680e'/%3E%3C/linearGradient%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f4f4f4'/%3E%3Cstop offset='1' stop-color='%238a8f99'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7 13V9a6 6 0 0 1 12 0v4' fill='none' stroke='%233a2208' stroke-width='5.4'/%3E%3Cpath d='M7 13V9a6 6 0 0 1 12 0v4' fill='none' stroke='url(%23s)' stroke-width='3'/%3E%3Crect x='2' y='12' width='22' height='16' rx='3.5' fill='url(%23g)' stroke='%233a2208' stroke-width='1.8'/%3E%3Crect x='4' y='14' width='18' height='2' rx='1' fill='%23fff8d8' opacity='.7'/%3E%3Ccircle cx='13' cy='19.5' r='2.4' fill='%233a2208'/%3E%3Cpath d='M12 20.5h2l.6 4.2h-3.2z' fill='%233a2208'/%3E%3C/svg%3E") center/contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); pointer-events: none; }
/* 1.28.29: khung thú cưng — thanh Máu / Mana luồn sát vào sau vòng tròn ảnh (không hở khe) */
#hud.hud2 .hud-plate.pet-mini:not(#_) .plate-body { left: calc(150px * var(--k)) !important; width: calc(var(--pw) - 150px * var(--k)) !important; }
#hud.hud2 .hud-plate.pet-mini:not(#_) .pname { padding-left: calc(86px * var(--k)) !important; }
#hud.hud2 .hud-plate.pet-mini:not(#_) .pbar:not(.xp) em { padding-left: calc(40px * var(--k)); }
#hud.hud2 .hud-plate.pet-mini:not(#_) .pbar.xp { margin-left: calc(40px * var(--k)) !important; }
#hud.hud2 .hud-plate.pet-mini:not(#_) :is(.avatar, .avatar-ring, .lv-badge) { z-index: 3 !important; }
#hud.hud2 .hud-plate.pet-mini:not(#_)::before { z-index: 2 !important; }
/* 1.28.30: thanh tên sát vào thanh Máu (nhân vật, thú cưng, người đang chọn) */
#hud.hud2 .hud-plate:not(#_) .pname, #hud.hud2 .hud-plate:is(.pet-mini, .tplate):not(#_) .pname { margin-bottom: -1px !important; padding-bottom: 0 !important; line-height: 1.1 !important; }
/* 1.28.33: máy tính — khung chat ở góc dưới bên trái, to hơn, chữ to (điện thoại giữ nguyên) */
@media (min-width: 901px) and (min-height: 561px) {
  #hud > #chat-mini.chat-mini:not(#_) {
    left: 12px !important; bottom: calc(24px + var(--sb, 0px)) !important; transform: none !important;
    width: min(460px, 34vw) !important; height: 200px !important; padding: 8px 12px !important; gap: 2px;
    background: rgba(10, 7, 4, .6) !important;
  }
  #hud > #chat-mini.chat-mini:not(#_) .cm-line { font-size: 14px !important; line-height: 1.35 !important; }
  #hud > #chat-mini.chat-mini:not(#_) .cm-empty { font-size: 14px !important; }
  #hud > #ev-chip.ev-chip:not(#_) { left: 12px !important; transform: none !important; bottom: calc(24px + var(--sb, 0px) + 206px) !important; }
}
@media (min-width: 901px) and (min-height: 561px) {
  #touch #btn-auto.auto-btn:not(#_) { left: calc(12px + min(460px, 34vw) + 10px) !important; bottom: calc(24px + var(--sb, 0px)) !important; }
}
/* 1.28.33: Bộ lạc · Quyên góp gọn: thanh quỹ cấp hiện tại + 2 ô Vàng / Ngọc bằng nhau + nút Quyên góp */
.gd-card.gd-donate { max-width: 520px; margin: 4px auto 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px !important; }
.gd-donate .gd-lvtop { display: flex; align-items: center; gap: 10px; }
.gd-donate .gd-lvtop .gd-lv { flex: 0 0 auto; font-size: 18px; color: #ffe7ac; }
.gd-donate .gd-lvtop .gd-bar { flex: 1 1 auto; margin: 0 !important; }
.gd-donate .gd-row:not(#_) { display: grid !important; grid-template-columns: 28px minmax(0, 1fr) 76px; align-items: center; gap: 8px; }
.gd-donate .gd-row .gd-inp { width: 100% !important; min-width: 0; box-sizing: border-box; }
.gd-donate .gd-row .gd-max { width: 76px; padding-left: 0 !important; padding-right: 0 !important; }
.gd-donate .gd-row.full { opacity: .5; }
.gd-donate .gd-go { align-self: center; min-width: 160px; }
/* Phúc lợi cấp hiện tại: mỗi dòng một phúc lợi */
.gd-lvperk .gd-pline { display: flex; justify-content: space-between; padding: 4px 2px; border-bottom: 1px dashed rgba(232, 183, 101, .25); font-weight: 700; }
.gd-lvperk .gd-pline b { color: #9be36a; }
.gd-giftrw b + b { display: block; margin-top: 2px; }
@media (max-height: 560px), (max-width: 900px) { .gd-card.gd-donate { gap: 7px; padding: 10px 12px !important; } .gd-donate .gd-lvtop .gd-lv { font-size: 15px; } }
/* 1.28.34: máy tính — khung chat đầy đủ (kênh, nội dung, ô nhập) luôn mở ở góc dưới trái; dải chat nhỏ ẩn */
body.chat-dock #hud > #chat-mini.chat-mini { display: none !important; }
body.chat-dock #chat-panel.dk-chat:not(#_) {
  position: fixed !important; left: 12px !important; right: auto !important; top: auto !important; bottom: calc(24px + var(--sb, 0px)) !important; transform: none !important;
  width: min(500px, 36vw) !important; height: 300px !important; z-index: 6 !important; display: flex !important; flex-direction: column !important;
  padding: 0 !important; border-radius: 10px !important; background: rgba(12, 8, 5, .72) !important; box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .35), 0 6px 18px rgba(0, 0, 0, .45) !important;
  border: 0 !important; border-image: none !important;
}
body.chat-dock #chat-panel.dk-chat[hidden] { display: none !important; }
body.chat-dock #chat-panel.dk-chat::before, body.chat-dock #chat-panel.dk-chat::after { display: none !important; }
body.chat-dock #chat-panel.dk-chat .cp-head:not(#_) { flex: 0 0 auto; padding: 6px 8px 4px !important; border: 0 !important; border-bottom: 1px solid rgba(232, 183, 101, .25) !important; background: none !important; }
body.chat-dock #chat-panel.dk-chat .cp-tabs:not(#_) { width: auto !important; display: flex !important; flex-direction: row !important; flex-wrap: nowrap; gap: 4px; }
body.chat-dock #chat-panel.dk-chat .cp-tabs button:not(#_) { flex: 1 1 auto; min-width: 0; height: 26px; padding: 0 6px !important; font-size: 12px !important; white-space: nowrap; }
body.chat-dock #chat-panel.dk-chat .cp-main:not(#_) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 4px 8px 8px !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body.chat-dock #chat-panel.dk-chat .cp-title { display: none !important; }
body.chat-dock #chat-panel #chat-log:not(#_) { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: none !important; border: 0 !important; padding: 2px 0 !important; }
body.chat-dock #chat-panel #chat-log:not(#_), body.chat-dock #chat-panel #chat-log:not(#_) * { font-size: 14px !important; line-height: 1.4 !important; }
body.chat-dock #chat-panel .cp-form:not(#_) { flex: 0 0 auto; display: flex; gap: 6px; margin-top: 6px; }
body.chat-dock #chat-panel .cp-form:not(#_) input, body.chat-dock #chat-panel .cp-form:not(#_) select { font-size: 13px !important; height: 30px; }
body.chat-dock #chat-panel .cp-form:not(#_) input { flex: 1 1 auto; min-width: 0; }
body.chat-dock #hud > #ev-chip.ev-chip:not(#_) { bottom: calc(24px + var(--sb, 0px) + 306px) !important; }
body.chat-dock #touch #btn-auto.auto-btn:not(#_) { left: calc(12px + min(500px, 36vw) + 10px) !important; }
/* 1.28.34: máy tính — Hành trang hiện 4 hàng (khung Ngọc / Vàng không bị đẩy ra ngoài), cuộn để xem tiếp */
@media (min-width: 901px) and (min-height: 561px) { #win-bag .bag-gridbox:not(#_) { height: calc(var(--cell) * 4 + 6px * 3 + 14px) !important; } }
/* 1.28.34: Bộ lạc · Phúc lợi — hàng quà mỗi ngày ở trên, Tộc khố chiếm phần dưới */
.gw-wrap { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.gw-gift { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 8px; background: linear-gradient(90deg, rgba(232, 183, 101, .14), rgba(232, 183, 101, .04)); box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .3); }
.gw-gift .gw-h { margin: 0 auto 0 0 !important; color: #ffe7ac; font-size: 15px; }
.gw-amt { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: #fff3d6; }
.gw-amt .gw-ic { width: 26px; height: 26px; background: center / contain no-repeat; }
.gw-btn { min-width: 130px; }
.gw-wrap .gd-shop { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.gw-wrap .gd-shop .gd-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; align-content: start; }
@media (max-height: 560px), (max-width: 900px) {
  .gw-gift { gap: 8px; padding: 6px 8px; } .gw-gift .gw-h { font-size: 12px; } .gw-amt { font-size: 12.5px; } .gw-amt .gw-ic { width: 18px; height: 18px; } .gw-btn { min-width: 90px; }
  .gw-wrap .gd-shop .gd-items { grid-template-columns: minmax(0, 1fr); }
}
/* 1.28.34: Quyên góp — gọn, không lồng nhiều khung */
.gd-card.gd-donate:not(#_) { background: none !important; box-shadow: none !important; border: 0 !important; max-width: 560px; padding: 18px 8px !important; gap: 14px; }
.gd-donate .gd-lvtop .gd-bar:not(#_) { height: 22px; border-radius: 11px; }
.gd-donate .gd-lvtop .gd-bar span { font-size: 13px; font-weight: 800; }
.gd-donate .gd-row:not(#_) { grid-template-columns: 30px minmax(0, 1fr) 84px; padding: 0 !important; background: none !important; border: 0 !important; }
.gd-donate .gd-row .gd-cur { width: 26px; height: 26px; }
.gd-donate .gd-row .gd-inp:not(#_) { height: 38px; border-radius: 8px; border: 1px solid rgba(232, 183, 101, .35) !important; background: rgba(0, 0, 0, .35) !important; color: #fff3d6; font-size: 15px; padding: 0 12px; box-shadow: none !important; }
.gd-donate .gd-row .gd-max:not(#_) { width: 84px; height: 38px; }
.gd-donate .gd-go:not(#_) { min-width: 220px; height: 42px; font-size: 16px; margin-top: 4px; }
@media (max-height: 560px), (max-width: 900px) { .gd-card.gd-donate:not(#_) { padding: 8px 4px !important; gap: 8px; } .gd-donate .gd-row .gd-inp:not(#_), .gd-donate .gd-row .gd-max:not(#_) { height: 30px; font-size: 12.5px; } .gd-donate .gd-go:not(#_) { height: 34px; min-width: 160px; font-size: 13px; } }
#screen-game .parch-win #win-guild .gd-card.gd-donate, #screen-game #win-guild.parch-win .gd-card.gd-donate:not(#_) { background: none !important; box-shadow: none !important; border: 0 !important; border-image: none !important; }
/* 1.28.35: Danh hiệu — khung thông tin gọn: Yêu cầu · Hiệu ứng · Thời hạn cùng một cỡ chữ */
.tq-info.ti-info { display: flex; flex-direction: column; gap: 0; padding: 4px 12px; border-radius: 8px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .3); }
.tq-info.ti-info .tq-line:not(#_) { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(232, 183, 101, .15); font-size: 13px; line-height: 1.45; font-weight: 600; }
.tq-info.ti-info .tq-line:last-child { border-bottom: 0; }
.tq-info.ti-info .tq-line .k { color: #e9c27a; font-weight: 700; }
.tq-info.ti-info .tq-line .v { color: #f3e6cc; font-weight: 600; }
.tq-info.ti-info .tq-line.good .v { color: #9be36a; }
#win-quest .dk-h[hidden], .dk-h[hidden] { display: none !important; }
@media (max-height: 560px), (max-width: 900px) { .tq-info.ti-info .tq-line:not(#_) { font-size: 11px; grid-template-columns: 64px minmax(0, 1fr); padding: 5px 0; gap: 6px; } }
/* =====================================================================
   1.28.35 — Nhiệm vụ · Hoạt động: bố cục gọn, thẳng hàng
   ===================================================================== */
#win-quest .qd-top.qd2:not(#_) { display: flex !important; flex-direction: column; gap: 8px; padding: 10px 14px !important; border-radius: 8px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .28); }
#win-quest .qd2 .qd-hrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#win-quest .qd2 .qd-dil-h:not(#_), #win-quest .qd2 .qd-done:not(#_) { font-size: 13px !important; font-weight: 700; color: #f3e6cc !important; display: block; }
#win-quest .qd2 .qd-dil-h b, #win-quest .qd2 .qd-done b { font-size: 15px !important; color: #ffd860 !important; }
#win-quest .qd2 .qd-week, #win-quest .qd2 .qd-time { font-size: 12px !important; color: #b89d76 !important; font-weight: 600; }
#win-quest .qd2 .qd-ms:not(#_) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
#win-quest .qd2 .qd-chips:not(#_) { position: relative; height: 34px; margin: 0 18px 0 6px; display: block !important; }
#win-quest .qd2 .qd-trk { position: absolute; left: 0; right: 0; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .3); overflow: hidden; }
#win-quest .qd2 .qd-trk b { display: block; height: 100%; background: linear-gradient(90deg, #d99a20, #ffe58a); }
#win-quest .qd2 .qd-chip:not(#_) { position: absolute; top: 50%; transform: translate(-50%, -50%); min-width: 40px; height: 26px; padding: 0 8px !important; border-radius: 13px; font-size: 12px !important; font-weight: 800; }
#win-quest .qd2 .qd-msrow:not(#_) { display: flex !important; align-items: center; gap: 8px; }
#win-quest .qd2 .qd-mslab { font-size: 12px !important; font-weight: 700; color: #e9c27a !important; white-space: nowrap; }
/* Thưởng: ô nhỏ gọn, đều nhau */
#win-quest .qd :is(.qd-msrw, .qw-drw, .qw-pool) .rw-cell:not(#_) { width: 42px !important; height: 42px !important; flex: 0 0 42px; }
#win-quest .qd :is(.qd-msrw, .qw-drw, .qw-pool):not(#_) { display: flex; gap: 6px; flex-wrap: nowrap; }
/* Dòng nhiệm vụ: Tên + tiến độ | thưởng | nút — mọi dòng thẳng cột */
#win-quest .qd .qw-dtask:not(#_) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto 96px; align-items: center; gap: 14px; padding: 8px 12px !important; }
#win-quest .qd .qw-dtask .so-info:not(#_) { display: contents !important; }
#win-quest .qd .qw-dtask .so-info > b { grid-column: 1; grid-row: 1; align-self: end; font-size: 13.5px; color: #fff3d6; }
#win-quest .qd .qw-dtask .qd-prog:not(#_) { grid-column: 1; grid-row: 2; display: flex !important; align-items: center; gap: 8px; margin: 0 !important; }
#win-quest .qd .qw-dtask .qd-prog .qd-track { flex: 1 1 auto; height: 7px; }
#win-quest .qd .qw-dtask .qd-prog small { flex: 0 0 auto; min-width: 56px; text-align: right; font-size: 12px; font-weight: 700; }
#win-quest .qd .qw-dtask .qw-drw:not(#_) { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; }
#win-quest .qd .qw-dtask > .pbtn:not(#_) { grid-column: 3; grid-row: 1 / span 2; width: 96px; min-width: 0 !important; }
#win-quest .qd .qw-dtask > .pbtn.go:not(#_) { background: linear-gradient(180deg, #e0a845, #a5661c) !important; color: #2a1708 !important; text-shadow: none !important; border-image: none !important; box-shadow: inset 0 0 0 1px #5a3410 !important; }
#win-quest .qd .qw-dtask.claimed { opacity: .55; }
/* Thưởng làm đủ: cùng kiểu dòng nhiệm vụ, nổi bật nhẹ */
#win-quest .qd .qd-bonus:not(#_) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 12px !important; border-radius: 8px; background: linear-gradient(90deg, rgba(232, 183, 101, .16), rgba(232, 183, 101, .04)); box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .4); }
#win-quest .qd .qd-bonus-h b { font-size: 13.5px; color: #ffe7ac; display: block; }
#win-quest .qd .qd-bonus-h span { font-size: 12px; color: #b89d76; }
#win-quest .qd .qw-pool .qw-bonus-btn:not(#_) { width: 96px; margin-left: 8px; }
@media (max-height: 560px), (max-width: 900px) {
  #win-quest .qd-top.qd2:not(#_) { padding: 6px 8px !important; gap: 4px; }
  #win-quest .qd2 .qd-dil-h:not(#_), #win-quest .qd2 .qd-done:not(#_) { font-size: 11px !important; }
  #win-quest .qd2 .qd-dil-h b, #win-quest .qd2 .qd-done b { font-size: 12px !important; }
  #win-quest .qd2 .qd-week, #win-quest .qd2 .qd-time { font-size: 10px !important; }
  #win-quest .qd2 .qd-ms:not(#_) { gap: 10px; }
  #win-quest .qd2 .qd-chips:not(#_) { height: 26px; margin: 0 14px 0 4px; }
  #win-quest .qd2 .qd-chip:not(#_) { min-width: 30px; height: 20px; font-size: 10px !important; padding: 0 4px !important; }
  #win-quest .qd2 .qd-mslab { font-size: 10px !important; }
  #win-quest .qd :is(.qd-msrw, .qw-drw, .qw-pool) .rw-cell:not(#_) { width: 30px !important; height: 30px !important; flex-basis: 30px; }
  #win-quest .qd :is(.qd-msrw, .qw-drw, .qw-pool):not(#_) { gap: 4px; }
  #win-quest .qd .qw-dtask:not(#_) { grid-template-columns: minmax(0, 1fr) auto 70px; gap: 8px; padding: 5px 8px !important; }
  #win-quest .qd .qw-dtask .so-info > b { font-size: 11px; }
  #win-quest .qd .qw-dtask .qd-prog small { font-size: 10px; min-width: 44px; }
  #win-quest .qd .qw-dtask > .pbtn:not(#_), #win-quest .qd .qw-pool .qw-bonus-btn:not(#_) { width: 70px; }
  #win-quest .qd .qd-bonus:not(#_) { gap: 8px; padding: 5px 8px !important; }
  #win-quest .qd .qd-bonus-h b { font-size: 11px; } #win-quest .qd .qd-bonus-h span { font-size: 10px; }
}
.tq-info.ti-info .tq-line .v { text-align: left !important; }
/* 1.28.35: Tộc khố — ô đồ dùng khung ô đồ chung (đồng bộ Hành trang) */
#win-guild .gd-item .gd-ic.inv-slot:not(#_) { position: relative; width: 46px !important; height: 46px !important; min-height: 0 !important; aspect-ratio: 1 !important; border-radius: 4px !important; background-size: 80%, 100% !important; flex: 0 0 auto; }
@media (max-height: 560px), (max-width: 900px) { #win-guild .gd-item .gd-ic.inv-slot:not(#_) { width: 36px !important; height: 36px !important; } }
/* 1.28.35: nút Tự động to hơn (máy tính và điện thoại) */
#touch #btn-auto.auto-btn:not(#_) { width: 46px !important; height: 46px !important; padding: 8px !important; }
@media (max-height: 560px), (max-width: 900px) { #touch #btn-auto.auto-btn:not(#_) { width: 40px !important; height: 40px !important; padding: 7px !important; left: calc(50% - var(--chw) / 2 - 46px) !important; bottom: calc(3px + var(--sb, 0px) + (var(--chh) - 40px) / 2) !important; } }
#win-character .mount-pane:not(#_) { align-items: stretch; justify-content: flex-start; }
/* 1.28.39: cửa hàng hiện hết hàng, cuộn để xem (không chia trang) */
#win-shop .shop-pager { display: none !important; }
#win-shop .shop-listbox:not(#_) { overflow-y: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#win-shop .shop-list:not(#_) { align-content: start; }
/* 1.28.40: ô kỹ năng thú cưng luôn hiện ảnh kỹ năng (cả ở Chợ / xem người khác) */
#screen-game .parch-win .pv-sk:not(.empty):not(.shut):not(#_), #screen-game .pv-sk:not(.empty):not(.shut):not(#_) { background: var(--ic) center / cover no-repeat, #160d07 !important; }

/* 1.28.41 */ .cm-dc { background: linear-gradient(180deg, #7a86ff, #5865f2); }
/* 1.28.41: đăng ký trên iPhone: không mất phần đầu khi form dài hơn màn, cuộn được ở mọi hướng, nút ngôn ngữ không đè thẻ Đăng ký */
#screen-auth:not(#_) { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom, 0px); }
#screen-auth .auth-main:not(#_) { justify-content: safe center; }
@media (orientation: portrait) and (max-height: 620px) {
  #screen-auth .auth-side:not(#_) { padding: 6px 12px !important; }
  #screen-auth .logo .site-logo, #screen-auth .logo img { max-height: 52px; }
  #screen-auth .logo-text:not(#_) { font-size: 26px !important; }
  #screen-auth .fi:not(#_) { height: 40px; }
  #screen-auth .fld:not(#_) { margin-bottom: 6px !important; }
  #screen-auth .auth-tabs .tab:not(#_) { height: 36px; }
  #screen-auth .btn-primary:not(#_) { height: 44px; }
  #auth-reg-note:not(#_) { font-size: 11px; margin: 0 0 2px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .auth-lang:not(#_) { top: auto; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
  #screen-auth .auth-panel:not(#_) { max-height: calc(100dvh - 30px); margin-top: 4px; }
  #screen-auth .auth-panel.reg #auth-reg-note:not(#_) { font-size: 10.5px; line-height: 1.3; margin: 0 0 2px; }
  #screen-auth .auth-panel.reg .fi:not(#_) { height: 34px; }
  #screen-auth .auth-panel.reg .auth-tabs .tab:not(#_) { height: 34px; }
  #screen-auth .auth-panel.reg .btn-primary:not(#_) { height: 40px; }
}
/* 1.28.47: bảng cập nhật app */
.appupd { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; background: rgba(0, 0, 0, .6); padding: 16px; }
.appupd-card { width: min(420px, 100%); box-sizing: border-box; padding: 20px 22px 18px; border: 13px solid transparent; border-image: url("/builtin/ui_frame_window.png") 22 fill / 13px stretch; color: #f3e3c3; font: 500 14px/1.5 'Be Vietnam Pro', system-ui, sans-serif; text-shadow: 0 1px 2px #000; }
.appupd-title { display: block; font-size: 18px; color: #ffd45a; margin-bottom: 8px; text-align: center; }
.appupd-msg { margin: 0 0 10px; }
.appupd-bar { height: 10px; border-radius: 6px; background: rgba(0, 0, 0, .5); overflow: hidden; margin: 6px 0; box-shadow: inset 0 0 0 1px rgba(232, 183, 101, .4); }
.appupd-bar[hidden] { display: none; }
.appupd-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7ac943, #b6f06a); transition: width .2s; }
.appupd-note { display: block; min-height: 1.2em; color: #e8c98a; font-size: 12.5px; margin-bottom: 8px; }
.appupd-row { display: flex; gap: 10px; justify-content: center; }
.appupd-row button { min-width: 120px; height: 40px; border: 0; cursor: pointer; font: 800 14px 'Be Vietnam Pro', system-ui, sans-serif; color: #fff; border-radius: 6px; }
.appupd-ok { background: linear-gradient(180deg, #7ac943, #3f8f1e); box-shadow: 0 3px 0 #2a5c12; }
.appupd-later { background: linear-gradient(180deg, #6b5a48, #45372a); box-shadow: 0 3px 0 #2a2018; }
.appupd-row button:disabled { filter: grayscale(.6) brightness(.8); cursor: default; }
