/* ═══════════════════════════════════════════════════════════════
   SKIN — lớp sơn cuối cùng: HUD trong game + màn Tạo nhân vật theo đúng
   mockup chủ game gửi (thẻ kem sáng, viền nâu mảnh, nút vàng, icon giữ nguyên).
   Nạp SAU ui.css/wood.css/panel.css nên mọi rule ở đây đè lên bản cũ.
   ═══════════════════════════════════════════════════════════════ */
:root{
  --sk-card: linear-gradient(180deg,#fffdf8 0%,#fdf3e0 100%);
  --sk-line: #e6cfa6;
  --sk-line2: #c9a97a;
  --sk-ink: #5a3a1a;
  --sk-ink2: #9b7c55;
  --sk-sh: 0 5px 0 rgba(190,158,110,.45), 0 14px 26px rgba(60,40,15,.22);
  --sk-gold: linear-gradient(180deg,#ffd979 0%,#f7b029 100%);
  --sk-green: linear-gradient(180deg,#6ee08d 0%,#2fb85f 100%);
}

/* ══════════════ HUD ══════════════ */
#hud .hud-top{gap:12px;top:12px;left:12px;right:12px}

/* thẻ người chơi */
#hud .profile{background:var(--sk-card);border:2.5px solid var(--sk-line);border-radius:24px;
  box-shadow:inset 0 1px 0 #fff,var(--sk-sh);padding:7px 18px 7px 7px;min-width:236px;color:var(--sk-ink);text-shadow:none}
#hud .profile .avatar-ring{border:3px solid #fff;box-shadow:0 0 0 3px #f3c76a,0 4px 10px rgba(60,40,15,.25);background:#eaf3ff}
#hud .profile .lvl{background:linear-gradient(180deg,#6ee08d,#2fb85f);border:2px solid #fff;color:#fff;box-shadow:0 2px 0 rgba(20,110,60,.6);font-family:var(--fh);font-weight:900}
#hud .pname{color:var(--sk-ink);text-shadow:none;font-weight:900}
#hud .pfarm{color:var(--sk-ink2);text-shadow:none}
#hud .xpbar{background:#eddfc4;border:1.5px solid #dcc59c;box-shadow:inset 0 1px 2px rgba(120,90,50,.25)}
#hud .xpbar>div{background:linear-gradient(180deg,#7fe6a0,#35bd68)}

/* "Đang ở <khu>" */
#hud .zone-name{top:86px;left:12px;background:var(--sk-green);border:2.5px solid #fff;color:#fff;
  border-radius:999px;padding:7px 16px 7px 12px;box-shadow:0 4px 0 rgba(20,110,60,.55),0 10px 20px rgba(30,90,50,.28);
  font-weight:900;text-shadow:0 1px 0 rgba(0,0,0,.18)}

/* thẻ nhiệm vụ giữa trên */
#hud .quest-track{background:var(--sk-card);border:2.5px solid var(--sk-line);border-radius:22px;
  box-shadow:inset 0 1px 0 #fff,var(--sk-sh);padding:8px 16px 8px 9px;max-width:430px;color:var(--sk-ink)}
#hud .quest-track>i{background:linear-gradient(180deg,#ffe9a8,#f7c651);border:2px solid #fff;border-radius:16px;
  padding:8px;width:42px;height:42px;color:#8a5a00;box-shadow:0 3px 0 rgba(190,140,30,.5)}
#hud .qt-title{color:var(--sk-ink2);font-weight:800;font-size:.78em;text-transform:none}
#hud .qt-desc{color:var(--sk-ink);font-weight:900;font-size:1.02em}
#hud .qt-prog{background:#eaf7ec;border:2px solid #bfe6c8;color:#2f8a4f;border-radius:999px;padding:3px 12px;font-weight:900}
#hud .quest-track::after{content:"";width:10px;height:10px;margin-left:2px;border-right:3px solid #c9a97a;border-bottom:3px solid #c9a97a;transform:rotate(-45deg);opacity:.85}

/* xu / kim cương / năng lượng / giờ */
#hud .res{background:linear-gradient(180deg,#fffdf8,#fdf1dc);border:2.5px solid var(--sk-line);color:var(--sk-ink);
  border-radius:999px;padding:5px 8px 5px 5px;gap:7px;text-shadow:none;
  box-shadow:inset 0 1px 0 #fff,0 4px 0 rgba(190,158,110,.4),0 10px 18px rgba(60,40,15,.18)}
#hud .res>i{width:30px;height:30px;padding:4px;border-radius:50%;background:#fff6df;border:2px solid #f0dcb4}
#hud .res.coin>i{background:radial-gradient(circle at 50% 35%,#ffe9a8,#f2b21f);border-color:#e3a115;color:#7a4b00}
#hud .res.gem>i{background:radial-gradient(circle at 50% 35%,#d7f0ff,#59c2f7);border-color:#3aa9e8;color:#0b5b86}
#hud .res.energy>i{background:radial-gradient(circle at 50% 35%,#fff0b8,#ffc61a);border-color:#e8a900;color:#7a4b00}
#hud .res.clock>i{background:radial-gradient(circle at 50% 35%,#ffe9c9,#ffb86b);border-color:#f0a047;color:#8a4b00}
#hud .res .res-max{color:var(--sk-ink2);font-weight:800}
#hud .res .res-add{background:linear-gradient(180deg,#6ee08d,#2fb85f);border:2px solid #fff;color:#fff;
  width:24px;height:24px;border-radius:50%;box-shadow:0 2px 0 rgba(20,110,60,.6);font-weight:900;line-height:1}
#hud .resources .icon-btn{background:var(--sk-card);border:2.5px solid var(--sk-line);color:var(--sk-ink);
  box-shadow:inset 0 1px 0 #fff,0 4px 0 rgba(190,158,110,.4)}

/* hai cột nút tròn hai bên */
#hud .side-btn{width:72px;color:var(--sk-ink);font-size:.7em;font-weight:900;
  text-shadow:0 1px 0 rgba(255,255,255,.9),0 0 6px rgba(255,255,255,.7)}
#hud .side-btn i{width:56px;height:56px;padding:11px;border-radius:50%;
  background:var(--sk-card);border:2.5px solid var(--sk-line);color:#8a5a2a;
  box-shadow:inset 0 1px 0 #fff,0 4px 0 rgba(190,158,110,.45),0 10px 18px rgba(60,40,15,.2)}
#hud .side-btn:hover i{transform:translateY(-2px)}
#hud .side-btn .badge{background:linear-gradient(180deg,#ff7a7a,#e0364a);border:2px solid #fff;box-shadow:0 2px 0 rgba(150,30,45,.6)}

/* bản đồ nhỏ tròn + logo gỗ */
#hud #minimap{border:5px solid #fff8ea;border-radius:50%;box-shadow:0 0 0 3px #c9a97a,0 6px 0 rgba(150,110,60,.45),0 14px 26px rgba(60,40,15,.3)}
#hud .cam-btn{background:var(--sk-card);border:2.5px solid var(--sk-line);color:#8a5a2a;box-shadow:inset 0 1px 0 #fff,0 4px 0 rgba(190,158,110,.45)}

/* thanh dock dưới */
#hud .hud-bottom,#hud .dock{background:var(--sk-card);border:2.5px solid var(--sk-line);border-radius:26px;padding:8px 10px;gap:2px;
  box-shadow:inset 0 1px 0 #fff,0 6px 0 rgba(190,158,110,.45),0 16px 30px rgba(60,40,15,.25)}
#hud .hud-bottom .dock-btn,#hud .dock-btn{color:var(--sk-ink);text-shadow:none;font-weight:900;border-radius:18px;padding:6px 10px 5px;background:transparent;box-shadow:none}
#hud .dock-btn i{color:#8a5a2a}
#hud .dock-btn:hover{background:rgba(255,236,196,.7)}
#hud .dock-btn.active,#hud .dock-btn:first-child{background:var(--sk-gold);color:#6b4100;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.75),0 4px 0 #c98a12}
#hud .dock-btn.active i,#hud .dock-btn:first-child i{color:#7a4b00}

/* ══════════════ MÀN TẠO NHÂN VẬT ══════════════ */
/* biển tên + phụ đề */
#screen-character .char-head .ribbon{padding:12px 54px 10px;border-radius:20px;
  box-shadow:inset 0 2px 0 rgba(255,235,200,.5),0 7px 0 #4f2e12,0 18px 34px rgba(40,20,5,.45)}
#screen-character .char-head h2{font-size:clamp(30px,3.6vw,48px);text-shadow:0 3px 0 #5b3416,0 8px 18px rgba(0,0,0,.35)}
#screen-character .char-head .plank{background:linear-gradient(180deg,#fffaf0,#f3e0bd);border:2px solid rgba(150,100,40,.4);
  color:#7d4b12;text-shadow:0 1px 0 rgba(255,255,255,.8);border-radius:999px;padding:9px 26px;margin-top:-6px;
  box-shadow:inset 0 1px 0 #fff,0 8px 20px rgba(40,20,5,.28);letter-spacing:.02em;z-index:0}

/* cột anh hùng bên trái: viên thuốc kính mờ + ảnh + mô tả + mũi tên */
.hero-list button{padding:8px 14px 8px 8px;gap:12px;font-size:1em;text-align:left;position:relative;padding-right:32px}
.hero-list button img,.hero-list button i{width:48px;height:48px;border:2.5px solid rgba(255,255,255,.85);background:#fff6e4}
.hero-list button .hl-tx{display:flex;flex-direction:column;gap:1px;line-height:1.15}
.hero-list button .hl-tx small{font-weight:700;font-size:.74em;opacity:.9;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.hero-list button::after{content:"";position:absolute;right:14px;top:50%;width:8px;height:8px;margin-top:-5px;
  border-right:3px solid rgba(255,255,255,.9);border-bottom:3px solid rgba(255,255,255,.9);transform:rotate(-45deg)}

/* bệ gỗ dưới nhân vật */
#screen-character .char-stage{isolation:isolate}
#screen-character .char-stage::after{content:"";position:absolute;left:50%;bottom:12%;width:min(42%,260px);aspect-ratio:2.6/1;
  transform:translateX(-50%);border-radius:50%;background:radial-gradient(60% 70% at 50% 40%,#e0b478 0,#c08a4e 55%,#a06f39 100%);
  box-shadow:0 14px 30px rgba(40,20,5,.35);z-index:-1;opacity:.92}

/* thanh hành động dưới nhân vật */
#screen-character .stage-anims{background:rgba(255,252,244,.82);border:2.5px solid #fff;
  box-shadow:0 10px 26px rgba(40,20,5,.25);padding:7px}
#screen-character .stage-anims button{color:#6b4a24;font-weight:800}
#screen-character .stage-anims button.active{background:linear-gradient(180deg,#4f96ff,#2b74ec);color:#fff;
  box-shadow:0 3px 0 #17489f}

/* bảng bên phải */
#screen-character .char-panel{background:linear-gradient(180deg,#fffdf8,#fdf2df);border:3px solid #fff;border-radius:30px;
  box-shadow:0 10px 0 rgba(190,158,110,.4),0 22px 46px rgba(60,40,15,.3)}
#screen-character .char-tabs{background:transparent;padding:12px 8px;gap:8px}
#screen-character .char-tabs button{width:60px;height:60px;border-radius:18px;background:#fff;border:2.5px solid #f0e0c2;
  color:#a98a63;font-size:.58em;box-shadow:0 3px 0 rgba(190,158,110,.35)}
#screen-character .char-tabs button.active{background:linear-gradient(180deg,#4f96ff,#2b74ec);color:#fff;border-color:#fff;
  box-shadow:0 4px 0 #17489f,0 8px 18px rgba(47,124,246,.35)}
#screen-character .char-content label{text-transform:uppercase;letter-spacing:.04em;color:#8a6a45;font-weight:900;font-size:.8em}
#screen-character .char-content input{border-radius:16px;border:2.5px solid #ead9b8;background:#fff;color:#5a3a1a;font-weight:800}
#screen-character .hero-current{background:linear-gradient(180deg,#f2f8ff,#e6f1ff);border:2.5px solid #cfe2fb;border-radius:20px}
#screen-character .swatches button,#screen-character .swatches .sw{width:52px;height:52px;border-radius:50%;border:3px solid #fff;
  box-shadow:0 3px 0 rgba(150,120,80,.35),0 6px 14px rgba(60,40,15,.2)}
#screen-character .swatches .sw.active,#screen-character .swatches button.active{box-shadow:0 0 0 4px #2b74ec,0 6px 14px rgba(47,124,246,.35)}
#screen-character #btnStartGame{background:var(--sk-gold);color:#6b4100;border:3px solid #fff;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.7),0 6px 0 #c98a12,0 14px 26px rgba(180,120,20,.35);font-weight:900}
#screen-character #btnStartGame i{color:#7a4b00}

/* ghi chú gỗ hai góc trên */
.note-tl{position:absolute;left:104px;top:22px;z-index:4;max-width:210px;padding:10px 16px;border-radius:14px;
  background:var(--wood-tex) center/300px,#f6dcb0;background-blend-mode:multiply;color:#4a2c12;
  border:2.5px solid #b98a52;box-shadow:0 6px 0 rgba(140,95,45,.5),0 12px 24px rgba(40,20,5,.3);
  font-family:var(--fs);font-size:1.02em;line-height:1.25;text-align:center;transform:rotate(-3deg)}
@media (max-width:1100px){.note-tl{display:none}}

/* ══════════════ ĐIỆN THOẠI ══════════════ */
@media (max-width:820px){
  #hud .profile{min-width:0;padding:5px 12px 5px 5px;border-radius:20px}
  #hud .side-btn{width:60px;font-size:.62em}
  #hud .side-btn i{width:46px;height:46px;padding:9px}
  #hud .dock{padding:6px;border-radius:22px}
  #hud .dock-btn{padding:5px 7px 4px}
  #hud .zone-name{top:76px;font-size:.84em;padding:5px 12px}
}

/* ══════════════ ĐĂNG NHẬP: cuộn được, không bao giờ bị cắt / đè chân trang ══════════════ */
#screen-auth{overflow-y:auto;overflow-x:hidden;display:block;-webkit-overflow-scrolling:touch}
#screen-auth .sky-bg,#screen-auth .sky-glow{position:fixed}
#screen-auth .auth-wrap{min-height:100%;align-content:center}
#screen-auth .foot-bar{position:fixed;left:0;right:0;bottom:0}
@media (max-width:1060px){
  #screen-auth .auth-brand{display:flex!important}          /* rule cũ ẩn cột logo ở màn hẹp — luôn cho hiện */
  #screen-auth .auth-wrap{width:min(560px,94vw)}
}
/* thẻ đăng nhập gọn hơn khi màn hẹp/thấp để không phải cuộn nhiều */
@media (max-width:1060px),(max-height:820px){
  #screen-auth .auth-body{padding:12px 16px 14px}
  #screen-auth .auth-head{padding:10px 16px 4px}
  #screen-auth .auth-form{gap:8px}
  #screen-auth .social button{padding:8px 10px}
}

/* gọn thêm khi màn thấp: bỏ slogan, thu logo, giảm khoảng đệm để không phải cuộn */
@media (max-height:880px){
  #screen-auth .auth-wrap{padding:clamp(34px,4.5vh,56px) 0 calc(98px + var(--safe-b,0px));gap:clamp(10px,1.6vh,18px)}
  #screen-auth .auth-brand .logo-mark,#screen-auth .auth-brand .logo-mark svg,#screen-auth .auth-brand .logo-mark img{max-height:17vh}
}
@media (max-height:820px) and (max-width:1060px){#screen-auth .brand-lead{display:none}}
@media (max-height:760px){
  #screen-auth .auth-brand .logo-mark,#screen-auth .auth-brand .logo-mark svg,#screen-auth .auth-brand .logo-mark img{max-height:14vh}
  #screen-auth .auth-head h3{font-size:1.15em}
  #screen-auth .auth-head{padding:8px 14px 2px}
  #screen-auth .or{margin:6px 0}
}

/* chân trang trên điện thoại: chỉ còn hàng mạng xã hội gọn, không đè lên thẻ đăng nhập */
@media (max-width:700px){
  #screen-auth .foot-bar{padding:8px 10px calc(8px + var(--safe-b,0px));gap:10px;justify-content:center;flex-wrap:nowrap;
    background:linear-gradient(180deg,rgba(30,18,6,0),rgba(30,18,6,.45))}
  #screen-auth .foot-bar>span:first-child,#screen-auth .foot-bar .links,#screen-auth .foot-bar .sep,#screen-auth .foot-bar .stores{display:none}
  #screen-auth .foot-bar .ver{position:absolute;right:10px;bottom:calc(10px + var(--safe-b,0px));font-size:.72em;opacity:.85}
  #screen-auth .auth-wrap{padding-bottom:calc(82px + var(--safe-b,0px))}
}

/* bệ gỗ đã dựng bằng 3D trong khung xem trước → bỏ bệ giả bằng CSS */
#screen-character .char-stage::after{display:none}
/* 6 ô màu trên một hàng, vừa khít bảng */
#screen-character .swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;justify-items:center}
#screen-character .swatches button,#screen-character .swatches .sw{width:100%;max-width:48px;aspect-ratio:1/1;height:auto}
/* cột anh hùng to hơn cho cân với mockup */
.hero-list button{font-size:1.04em;padding:9px 34px 9px 9px}
.hero-list button img,.hero-list button i{width:52px;height:52px}
/* biển gỗ nhỏ dưới bảng phải */
.char-note{position:absolute;right:max(26px,3.2vw);bottom:20px;z-index:4;max-width:min(400px,30vw);text-align:center;padding:8px 18px;border-radius:14px;
  background:var(--wood-tex) center/300px,#f6dcb0;background-blend-mode:multiply;color:#4a2c12;border:2.5px solid #b98a52;
  box-shadow:0 5px 0 rgba(140,95,45,.45),0 10px 20px rgba(40,20,5,.25);font-family:var(--fs);font-size:1em}
@media (max-width:1100px){.char-note{display:none}}
/* chừa chỗ cho biển gỗ nhỏ dưới bảng phải (không đè nút Bắt đầu) */
#screen-character .char-panel{margin-bottom:46px}
.char-note{bottom:6px}
@media (max-height:820px){#screen-character .char-panel{margin-bottom:38px}.char-note{font-size:.9em;padding:6px 14px}}

/* thanh dock (khung .hud-bottom) — nền kem như mockup, mục đang chọn màu vàng */
#hud .hud-bottom{background:var(--sk-card)!important;background-blend-mode:normal!important;border:2.5px solid var(--sk-line)!important;
  border-radius:26px!important;box-shadow:inset 0 1px 0 #fff,0 6px 0 rgba(190,158,110,.45),0 16px 30px rgba(60,40,15,.25)!important}
#hud .hud-bottom .dock-btn{color:var(--sk-ink)!important;text-shadow:none!important}
#hud .hud-bottom .dock-btn.active,#hud .hud-bottom .dock-btn:first-child{background:var(--sk-gold)!important;color:#6b4100!important;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.75),0 4px 0 #c98a12!important}

/* ══════════════ HUD trên điện thoại: không dính, không tràn ══════════════ */
@media (max-width:820px){
  #hud .hud-top{flex-wrap:wrap;gap:6px;align-items:flex-start}
  #hud .profile{order:1;flex:0 1 auto;min-width:0;max-width:56vw;padding:4px 10px 4px 4px;border-radius:18px}
  #hud .profile .avatar-ring{width:38px;height:38px}
  #hud .pname{font-size:.92em}
  #hud .resources{order:2;margin-left:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;max-width:60vw}
  #hud .res{padding:3px 7px 3px 3px;font-size:.8em;gap:5px}
  #hud .res>i{width:24px;height:24px;padding:3px}
  #hud .res .res-add{width:19px;height:19px;font-size:.9em}
  #hud .zone-name{top:auto;margin-top:2px;position:absolute;left:10px;top:82px}
  /* dock: vừa đủ 9 mục, cuộn ngang nếu máy quá hẹp */
  #hud .hud-bottom{left:8px;right:8px;transform:none;width:auto;max-width:none;justify-content:center;
    overflow-x:auto;overflow-y:hidden;scrollbar-width:none;border-radius:22px;padding:6px 8px;gap:2px}
  #hud .hud-bottom::-webkit-scrollbar{display:none}
  #hud .hud-bottom .dock-btn{flex:0 0 auto;width:auto;min-width:38px;padding:5px 6px 4px}
  #hud .hud-bottom .dock-btn i{width:28px;height:28px}
  body.touch #hud .hud-bottom{transform:none;bottom:calc(8px + var(--safe-b,0px))}
}
@media (max-width:820px) and (orientation:portrait){
  #hud .hud-right{top:120px}
  #hud #minimap{width:92px;height:92px}
}
/* điện thoại: hàng tài nguyên xuống dòng riêng, không đè thẻ người chơi */
@media (max-width:820px){
  #hud .hud-top{flex-wrap:wrap}
  #hud .profile{flex:0 0 auto;max-width:min(60vw,240px)}
  #hud .resources{flex:1 1 100%;order:3;justify-content:flex-start;max-width:none;margin-left:0;margin-top:2px}
  #hud .zone-name{position:absolute;left:10px;top:130px}
  #hud .hud-left{top:172px}
}
@media (max-width:820px) and (min-width:560px){
  #hud .resources{flex:0 0 auto;order:2;margin-left:auto;justify-content:flex-end;max-width:58vw}
  #hud .zone-name{top:82px}#hud .hud-left{top:130px}
}

/* nút phóng to / thu nhỏ bàn cờ tỷ phú */
#monoHud .mh-zoom{position:fixed;right:14px;bottom:calc(150px + var(--safe-b,0px));z-index:46;display:flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;background:linear-gradient(180deg,#fffdf8,#fdf1dc);border:2.5px solid #e6cfa6;
  box-shadow:inset 0 1px 0 #fff,0 5px 0 rgba(190,158,110,.45),0 12px 22px rgba(60,40,15,.25);pointer-events:auto}
#monoHud .mh-zoom button{width:30px;height:30px;border-radius:50%;background:linear-gradient(180deg,#ffd979,#f7b029);
  border:2px solid #fff;color:#6b4100;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 0 #c98a12}
#monoHud .mh-zoom button i{width:16px;height:16px}
#monoHud .mh-zoomv{font:900 .82em var(--fh);color:#7a4b12;min-width:38px;text-align:center}
@media (max-width:820px){#monoHud .mh-zoom{right:10px;bottom:calc(196px + var(--safe-b,0px));padding:5px 8px}}

/* ══════════════ MÀN TẠO NHÂN VẬT TRÊN ĐIỆN THOẠI / MÀN HẸP ══════════════ */
@media (max-width:900px){
  #screen-character{display:block;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
  #screen-character .sky-bg,#screen-character .sky-glow{position:fixed}
  #screen-character .char-head{margin:max(12px,env(safe-area-inset-top)) auto 8px;width:min(560px,94vw)}
  #screen-character .char-head .ribbon{padding:9px 30px 7px}
  #screen-character .char-head h2{font-size:clamp(24px,6.4vw,32px)}
  #screen-character .char-head .plank{padding:7px 18px;font-size:.92em}
  #screen-character .char-wrap{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;gap:10px;
    width:min(560px,94vw);margin:0 auto;padding:0 0 calc(26px + var(--safe-b,0px))}
  #screen-character .char-stage{height:42vh;min-height:280px;margin:0}
  #screen-character .char-stage canvas{width:100%;height:100%}
  #screen-character .stage-arrow{width:48px;height:48px}
  #screen-character .stage-anims{position:static;transform:none;margin:8px auto 0;display:flex;flex-wrap:wrap;justify-content:center;gap:4px;max-width:100%}
  #screen-character .stage-anims button{padding:5px 12px;font-size:.8em}
  #screen-character .stage-hint,#screen-character .stage-dots{display:none}
  #screen-character .char-panel{grid-template-columns:62px 1fr;margin-bottom:0;border-radius:24px}
  #screen-character .char-tabs{padding:8px 6px;gap:6px}
  #screen-character .char-tabs button{width:50px;height:50px;border-radius:15px;font-size:.54em}
  #screen-character .char-content{padding:12px 14px 14px}
  #screen-character .swatches{grid-template-columns:repeat(6,1fr);gap:6px}
  #screen-character .swatches button,#screen-character .swatches .sw{max-width:40px}
  .note-tl,.note-tr,.char-note,.sign-br{display:none!important}
}

/* ═══════════ THẺ TÚI MAY MẮN / BẢN TIN — dùng đúng khung tranh chủ game gửi ═══════════ */
#monoHud .mm-card.frame{width:min(430px,92vw);padding:0;border:0;background:none;box-shadow:none;overflow:visible;display:flex;flex-direction:column;align-items:center;gap:6px}
#monoHud .mm-card.frame .fr-box{position:relative;width:100%;background-size:100% 100%;background-repeat:no-repeat;
  filter:drop-shadow(0 18px 30px rgba(30,15,5,.45))}
#monoHud .mm-card.frame.news .fr-box{aspect-ratio:760/889;background-image:url(../assets/ui/mono/frame_news.png)}
#monoHud .mm-card.frame.lucky .fr-box{aspect-ratio:749/931;background-image:url(../assets/ui/mono/frame_lucky.png)}
/* chữ nằm gọn trong ô giấy kem của khung */
#monoHud .mm-card.frame .fr-head{position:absolute;display:flex;align-items:center;justify-content:center;
  font:900 clamp(11px,2.4vw,15px)/1 var(--fh);letter-spacing:.05em;color:#8a5a1e;text-align:center}
#monoHud .mm-card.frame.news .fr-head{left:35%;right:13%;top:21.5%;height:11.5%}
#monoHud .mm-card.frame.lucky .fr-head{display:none}
#monoHud .mm-card.frame .fr-in{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;text-align:center;overflow:hidden}
#monoHud .mm-card.frame.news .fr-in{left:16%;right:11%;top:37%;bottom:31%}
#monoHud .mm-card.frame.lucky .fr-in{left:20%;right:19%;top:46%;bottom:25%}
#monoHud .mm-card.frame .fr-in h3{margin:0;font:900 clamp(15px,3.4vw,21px)/1.15 var(--fh);color:#8a3f0c}
#monoHud .mm-card.frame.news .fr-in h3{color:#1f4f9a}
#monoHud .mm-card.frame .fr-in .mm-text{margin:0;font-size:clamp(12px,2.7vw,15px);line-height:1.32;font-weight:700;color:#5a3a1a}
#monoHud .mm-card.frame .mm-btns{margin:0;justify-content:center}
@media (max-height:760px){#monoHud .mm-card.frame{width:min(360px,84vw)}}

/* ═══════════ BIỂN SLOGAN (màn tải + đăng nhập): dải ruy-băng kem–vàng có đuôi gấp ═══════════ */
#screen-loading .logo-sub,#screen-auth .auth-brand{position:relative}
#screen-loading .logo-sub .plank,#screen-auth .auth-brand .plank{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  padding:clamp(8px,1.1vh,12px) clamp(22px,3vw,44px);border-radius:14px;
  background:linear-gradient(180deg,#fffdf6 0%,#fbecd0 46%,#f0d9ad 100%);
  border:2.5px solid #c9a05a;
  box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 rgba(150,105,45,.22),0 6px 0 rgba(140,95,40,.35),0 14px 30px rgba(40,20,5,.32);
  color:#7a4512;text-shadow:0 1px 0 rgba(255,255,255,.9);
  font-family:var(--fh);font-weight:900;text-transform:uppercase;
  letter-spacing:clamp(.06em,.55vw,.18em);font-size:clamp(11px,1.25vw,16px);white-space:nowrap}
/* đuôi ruy-băng hai bên */
#screen-loading .logo-sub .plank::before,#screen-loading .logo-sub .plank::after,
#screen-auth .auth-brand .plank::before,#screen-auth .auth-brand .plank::after{
  content:"";display:block!important;position:absolute;top:50%;width:22px;height:calc(100% - 10px);
  transform:translateY(-50%);background:linear-gradient(180deg,#e9cf9c,#d3b177);border:2.5px solid #b98f4a;border-radius:5px;z-index:-1;
  box-shadow:0 5px 0 rgba(140,95,40,.3)}
#screen-loading .logo-sub .plank::before,#screen-auth .auth-brand .plank::before{left:-15px;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,38% 50%)}
#screen-loading .logo-sub .plank::after,#screen-auth .auth-brand .plank::after{right:-15px;clip-path:polygon(0 0,100% 0,62% 50%,100% 100%,0 100%)}
@media (max-width:560px){
  #screen-loading .logo-sub .plank::before,#screen-loading .logo-sub .plank::after,
  #screen-auth .auth-brand .plank::before,#screen-auth .auth-brand .plank::after{width:14px}
}
/* thẻ tiến trình màn tải: kem sáng, thanh vàng, bo mềm */
#screen-loading .load-card{background:linear-gradient(180deg,#fffdf8,#fdf2df);border:2.5px solid #e6cfa6;border-radius:24px;
  box-shadow:inset 0 1px 0 #fff,0 8px 0 rgba(190,158,110,.4),0 20px 40px rgba(50,30,10,.3)}
#screen-loading .load-label,#screen-loading .load-pct{color:#6b4419;font-weight:900}
#screen-loading .progress{background:#ecdcbc;border:2px solid #fff;box-shadow:inset 0 2px 4px rgba(120,85,35,.25)}
#screen-loading .progress-fill{background:linear-gradient(180deg,#ffd979,#f7b029)}
#screen-loading .load-tip{color:#8a6a45}

/* chế độ Sắp xếp nông trại: ẩn dock/joystick để thanh công cụ không bị che */
body.arranging #hud .hud-bottom,body.arranging #joystick,body.arranging .touch-actions,body.arranging .interact,body.arranging #hud .hud-logo{display:none!important}
body.arranging #hud .hud-left,body.arranging #hud .hud-right{opacity:.35;pointer-events:none}

/* ── hồ sơ nhân vật: 2 cột trên máy tính, 1 cột trên điện thoại (trước đây style inline 300px 1fr đè media query → cột phải bị bóp) ── */
.split.prof{grid-template-columns:300px 1fr}
@media (max-width:900px){.split.prof{grid-template-columns:1fr} .split.prof .prof-card{max-width:360px;margin:0 auto;width:100%}}
@media (max-width:640px){.srow{flex-wrap:wrap} .srow .s-main{flex:1 1 55%;min-width:0} .srow .tag,.srow .btn{flex:1 1 100%;text-align:center;justify-content:center} .srow .s-main span{font-size:.86em}}
