/* gear.css — หน้าค่าสถานะแบบ MMO + หน้าต่างอุปกรณ์ 8 ช่อง · ตั๊บ 2026-11-08 */
/* ---- หน้าค่าสถานะ: ค่าต่อสู้ 25 ค่า 2 คอลัมน์ ---- */
#stage .st-win{grid-template-columns:170px minmax(0,1fr) 470px}
#stage .st-row{grid-template-columns:40px minmax(0,1fr) 46px 54px 76px 70px}
.st-cols{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.st-g{margin-bottom:6px}
.st-g>i{display:block;font:700 12px var(--font);font-style:normal;color:#ffd98a;letter-spacing:1px;margin:0 0 3px 2px}
#stage .st-right .st-d{grid-template-columns:minmax(0,1fr) auto 50px;padding:2px 7px;margin-bottom:2px;font-size:12px;min-height:23px}
#stage .st-right .st-d span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#stage .st-right .st-d.zero .st-now{color:#8a8070}
#stage .st-right .st-new{font-size:11.5px}

/* ---- หน้าต่างอุปกรณ์ ---- */
.eq-win{display:grid;grid-template-columns:330px minmax(0,1fr) 300px;gap:14px;align-items:start;min-height:470px}
.eq-doll{display:grid;grid-template-columns:72px 1fr 72px;gap:6px;align-items:center}
.eq-col{display:flex;flex-direction:column;gap:10px}
#stage .eq-slot{position:relative;width:72px!important;height:72px!important;min-height:0!important;padding:4px!important;display:grid;place-items:center;border-radius:10px!important;
  background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--rc) 22%,#1a1226),#0b0712)!important;border:2px solid color-mix(in srgb,var(--rc) 70%,#000)!important;box-shadow:inset 0 0 12px #000a}
#stage .eq-slot.has{box-shadow:inset 0 0 12px #000a,0 0 10px color-mix(in srgb,var(--rc) 50%,transparent)}
#stage .eq-slot.on{outline:2px solid #ffe08a;outline-offset:2px}
.eq-slot em{font:600 12px var(--font);font-style:normal;color:#8a7a60}
.eq-slot .item-art,.eq-slot .gear-svg{width:56px;height:56px}
.eq-hero{position:relative;height:330px;overflow:hidden;border-radius:12px;background:radial-gradient(ellipse at 50% 70%,#2a1d45,#0b0712 75%)}
.eq-hero .portrait{position:absolute;left:50%;bottom:-6px;width:300px;height:300px;margin-left:-150px;background-repeat:no-repeat;filter:drop-shadow(0 0 10px #000)}
.eq-pow{position:absolute;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(3,1fr);text-align:center;padding:22px 4px 8px;background:linear-gradient(transparent,#0b0712f0 50%)}.eq-pow span{display:flex;flex-direction:column}
.eq-pow small{color:#c9b88f;font-size:11px}.eq-pow b{color:#fff;font-size:16px}
.eq-tabs{display:flex;align-items:center;gap:8px;margin-bottom:8px}
#stage .eq-tabs button{min-height:0!important;height:30px;padding:0 14px!important;font-size:13px!important}
#stage .eq-tabs button.on{filter:brightness(1.3)}
.eq-tabs span{color:#ffe08a;font-weight:700}
#stage .eq-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
#stage .eq-it{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:0!important;height:56px;padding:4px 8px!important;text-align:left!important;
  background:#0b071299!important;border:1px solid color-mix(in srgb,var(--rc) 45%,#000)!important;border-left:4px solid var(--rc)!important;border-radius:6px!important;color:#fff!important}
#stage .eq-it.sel{background:color-mix(in srgb,var(--rc) 16%,#0b0712)!important;box-shadow:0 0 0 2px #ffe08a88}
.eq-it .item-art,.eq-it .gear-svg{width:44px;height:44px}
.eq-tx{min-width:0}.eq-tx b{display:block;color:var(--rc);font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.eq-tx small{display:block;color:#c9b88f;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eq-it>i{font-style:normal;font-size:10.5px;color:#7dff8a;border:1px solid #7dff8a66;border-radius:8px;padding:0 6px}
.eq-detail .gd-empty{color:#8a7a60;text-align:center;padding:60px 10px}
.gd-card{padding:12px;border-radius:10px;background:linear-gradient(160deg,color-mix(in srgb,var(--rc) 14%,#140e22),#0b0712);border:1px solid color-mix(in srgb,var(--rc) 55%,#000)}
.gd-top{display:grid;grid-template-columns:56px 1fr;gap:10px;align-items:center;margin-bottom:8px}
.gd-ic .item-art,.gd-ic .gear-svg{width:56px;height:56px}
.gd-top b{display:block;color:var(--rc);font-size:17px}.gd-top small{color:#c9b88f;font-size:12px}
.gd-card>div>small{display:block;color:#c9b88f;font-size:11px;letter-spacing:1px;margin:6px 0 2px}
.gs-l{display:grid;grid-template-columns:minmax(0,1fr) auto 64px;gap:6px;align-items:center;font-size:13px;padding:2px 0}
.gs-l span{color:#e8dcc4}.gs-l b{color:#fff;font-variant-numeric:tabular-nums}
.gd-main .gs-l{font-size:15px}.gd-main .gs-l b{color:#ffe08a}
.gs-l i{font-style:normal;font-size:11.5px;text-align:right;font-variant-numeric:tabular-nums}.gs-l i.up{color:#7dff8a}.gs-l i.down{color:#ff7a6a}
.gs-l.lost span{color:#a09080}
.gd-acts{display:flex;gap:8px;margin-top:10px}
.eq-pg{margin-left:auto;display:flex;align-items:center;gap:8px}
#stage .eq-pg button{width:34px;height:30px!important;padding:0!important}
.eq-pg b{color:#ffe9b0;font-size:13px;min-width:34px;text-align:center}

/* ใต้ค่าพลังหลัก: พลังต่อสู้รวม + 8 ช่องอุปกรณ์ (พี่: "ที่ว่างบาน") · คอลัมน์ขวามีต้านทานธาตุ */
.st-gear{min-width:0;margin-top:10px;padding:10px 14px;border-radius:8px;background:#0b071299;border:1px solid #c9a35a33;display:grid;grid-template-columns:190px 1fr;grid-template-rows:auto auto;gap:4px 14px;align-items:center}
.st-cp{grid-row:1/3;text-align:center;padding:6px 0;border-right:1px solid #c9a35a33}
.st-cp small{display:block;color:#c9b88f;font-size:12px;letter-spacing:2px}
.st-cp b{display:block;font:900 34px/1.1 var(--font);color:#ffe08a;text-shadow:0 0 14px #ffb03a88,0 2px 0 #3a1a06;font-variant-numeric:tabular-nums}
.st-cp i{display:block;min-height:18px;font-style:normal;color:#7dff8a;font-weight:700;font-size:14px}
.st-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-width:0}
#stage .st-slot{width:100%!important;min-width:0!important;max-width:none!important;height:48px!important;min-height:0!important;padding:3px!important;display:grid;place-items:center;border-radius:8px!important;
  background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--rc) 22%,#1a1226),#0b0712)!important;border:2px solid color-mix(in srgb,var(--rc) 70%,#000)!important}
.st-slot .item-art,.st-slot .gear-svg{width:40px;height:40px}
.st-slot em{font:600 10.5px var(--font);font-style:normal;color:#7a6a50}
.st-gear-hint{display:none}
#stage .st-right .st-d{min-height:21px;padding:1px 7px;margin-bottom:2px}
#stage .st-g{margin-bottom:4px}

/* ---- กระเป๋าแบบช่องคลัง (+ ใช้กับคลังในหน้าอุปกรณ์) ---- */
.iv-win{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
.iv-top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.iv-top .gold{margin-left:auto;font-weight:700;white-space:nowrap}
.iv-tabs{display:flex;gap:4px}
#stage .iv-tabs button{min-height:0!important;height:32px;padding:0 14px!important;font-size:13px!important;opacity:.7}
#stage .iv-tabs button.on{opacity:1;filter:brightness(1.25)}
#stage .iv-top>button{min-height:0!important;height:32px;padding:0 12px!important;font-size:13px!important}
.iv-grid{display:grid;grid-template-columns:repeat(8,66px);gap:6px;justify-content:start}
.eq-cells{grid-template-columns:repeat(6,66px)}
#stage .iv-cell{position:relative;width:66px!important;height:66px!important;min-width:0!important;min-height:0!important;padding:5px!important;display:grid;place-items:center;border-radius:8px!important;
  background:radial-gradient(circle at 50% 38%,color-mix(in srgb,var(--rc,#3a2e24) 20%,#1a1226),#0b0712)!important;border:2px solid color-mix(in srgb,var(--rc,#3a2e24) 65%,#000)!important;box-shadow:inset 0 0 10px #000b;transition:none}
#stage .iv-cell.empty{--rc:#33291f;opacity:.55;border-style:solid!important}
#stage button.iv-cell:hover{border-color:var(--rc)!important;box-shadow:inset 0 0 10px #000b,0 0 10px color-mix(in srgb,var(--rc) 60%,transparent);filter:brightness(1.15)}
#stage .iv-cell.sel{outline:2px solid #ffe08a;outline-offset:1px}
.iv-cell .item-art,.iv-cell .gear-svg{width:50px;height:50px;pointer-events:none}
.iv-cell>b{position:absolute;right:4px;bottom:2px;font:800 13px var(--font);color:#fff;text-shadow:0 0 3px #000,0 1px 0 #000,1px 0 0 #000,-1px 0 0 #000}
.iv-cell>i{position:absolute;left:4px;top:2px;font:700 10px var(--font);font-style:normal;color:#ffe9b0;text-shadow:0 1px 2px #000}
.iv-cell>em{position:absolute;right:3px;top:2px;font:800 10px var(--font);font-style:normal;color:#0b0712;background:#7dff8a;border-radius:4px;padding:0 4px}
.iv-foot{display:flex;align-items:center;gap:8px;margin-top:10px}.iv-foot small{margin-right:auto}#stage .iv-foot>button{min-height:0!important;height:32px;padding:0 14px!important;font-size:13px!important;white-space:nowrap}.iv-foot small{color:#8a7a60;font-size:11.5px}
.iv-desc{margin:8px 0 4px;font-size:13.5px;line-height:1.6;color:#e8dcc4}.iv-price{margin:0;color:#ffd98a;font-size:13px}
.iv-none{color:#8a7a60;font-size:12px;margin:8px 0 0}
.eq-win{min-height:0}

/* ---- ของประจำตัวที่เทพีอวยพร (แทนพลังต่อสู้รวม) ---- */
#stage .st-gear{grid-template-columns:minmax(0,1fr) 196px;gap:10px;grid-template-rows:auto;align-items:stretch;padding:10px 12px}
.st-relic{position:relative;min-width:0;padding:8px 10px;border-radius:8px;border:1px solid color-mix(in srgb,var(--rc) 55%,#000);background:linear-gradient(150deg,color-mix(in srgb,var(--rc) 16%,#140e22),#0b0712 70%);box-shadow:inset 0 0 18px color-mix(in srgb,var(--rc) 18%,transparent)}
.rl-top{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:8px;align-items:center}
.rl-ic .relic-svg{width:44px;height:44px;display:block;filter:drop-shadow(0 0 6px var(--rc))}
.rl-nm small{display:block;font-size:10.5px;color:#c9b88f;letter-spacing:1px}.rl-nm b{display:block;color:#fff1cc;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rl-plus{font:900 24px/1 var(--font);font-style:normal;color:#ffe08a;text-shadow:0 0 12px #ffb03a,0 2px 0 #3a1a06}
.rl-stats{display:grid;grid-template-columns:1fr 1fr;gap:1px 12px;margin:6px 0}
.rl-stats>div{display:flex;justify-content:space-between;gap:6px;font-size:11.5px;line-height:1.55}
.rl-stats span{color:#d8ccb4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rl-stats b{color:#fff;white-space:nowrap}
.rl-stats .main b{color:#ffe08a}.rl-stats .lock span,.rl-stats .lock b{color:#6f6450;font-weight:400}
#stage .rl-up{width:100%;height:32px!important;min-height:0!important;font-size:13px!important;padding:0 8px!important}
.rl-max{margin:4px 0 0;text-align:center;color:#ffe08a;font-weight:700}
/* ตีเหล็ก: สั่น + ประกายไฟ · สำเร็จ = แสงทอง · พลาด = ควันเทา */
.st-relic.forging{animation:rlShake .12s linear infinite}
.st-relic.forging .rl-ic{animation:rlGlow .4s ease-in-out infinite alternate}
.st-relic.forging:after{content:'';position:absolute;left:22px;top:20px;width:8px;height:8px;border-radius:50%;background:#fff3b0;box-shadow:12px -10px 0 -2px #ffcf5a,-10px -8px 0 -2px #ff9a3a,8px 10px 0 -3px #ffe08a,-12px 6px 0 -3px #ffb03a;animation:rlSpark .25s steps(2) infinite}
@keyframes rlShake{25%{transform:translate(-2px,1px)}75%{transform:translate(2px,-1px)}}
@keyframes rlGlow{to{filter:brightness(1.8) drop-shadow(0 0 12px #fff)}}
@keyframes rlSpark{50%{transform:scale(1.8) rotate(45deg);opacity:.4}}
.st-relic.rl-win{animation:rlWin 1s ease-out}
.st-relic.rl-win .rl-plus{animation:rlPop .6s cubic-bezier(.2,1.6,.4,1)}
@keyframes rlWin{0%{box-shadow:0 0 0 2px #fff,0 0 40px #ffd56a,inset 0 0 40px #ffd56a}100%{box-shadow:inset 0 0 18px color-mix(in srgb,var(--rc) 18%,transparent)}}
@keyframes rlPop{0%{transform:scale(2.2);filter:brightness(2)}}
.st-relic.rl-fail{animation:rlFail .7s ease-out}
@keyframes rlFail{0%{filter:grayscale(1) brightness(.6)}100%{filter:none}}
#stage .st-gear .st-slots{grid-template-columns:repeat(4,44px);gap:6px;align-content:center;justify-content:end}
#stage .st-gear .st-slot{height:44px!important}
#stage .st-gear .st-slot .item-art,#stage .st-gear .st-slot .gear-svg{width:34px;height:34px}
#stage .st-gear .st-slot em{font-size:9.5px}
#stage .rl-up{white-space:nowrap}
#stage .st-gear{margin-top:4px}
#stage .st-actions{margin-top:2px}
#stage .st-left p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:12.5px}
/* การ์ดไอเทมภาพจริงของนักเรียน (แทนไอคอน SVG) */
.rl-ic .rl-card{display:block;width:44px;height:58px;object-fit:contain;filter:drop-shadow(0 0 6px var(--rc))}
#stage .st-relic .rl-top{grid-template-columns:44px minmax(0,1fr) auto}
/* ---- ห้องทดลองการต่อสู้ ---- */
.lab-win{display:grid;grid-template-columns:420px minmax(0,1fr) 300px;gap:14px;align-items:start}
.lab-tabs{display:flex;gap:4px;margin-bottom:8px}
#stage .lab-tabs button{min-width:0!important;width:36px;height:30px!important;min-height:0!important;padding:0!important;font-size:13px!important;opacity:.65}
#stage .lab-tabs button.on{opacity:1;filter:brightness(1.3)}
.lab-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
#stage .lab-c{position:relative;height:96px!important;min-height:0!important;padding:2px!important;overflow:hidden;border-radius:8px!important;background:#0b071299!important;border:1px solid #c9a35a44!important;display:block!important}
#stage .lab-c.on{border-color:#ffe08a!important;box-shadow:0 0 0 2px #ffe08a66}
.lab-c .portrait{position:absolute;inset:0 0 18px;background-repeat:no-repeat}
.lab-c small{position:absolute;left:2px;right:2px;bottom:2px;font-size:10px;line-height:1.2;color:#ffe9b0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
.lab-mid{text-align:center}.lab-mid h3{margin:4px 0 0;color:#ffe9b0}
.lab-hero{position:relative;height:170px;border-radius:10px;overflow:hidden;background:radial-gradient(ellipse at 50% 80%,#2a1d45,#0b0712 75%)}
.lab-hero .portrait{position:absolute;inset:0;background-repeat:no-repeat}
.lab-skills{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:8px;text-align:left}
.lab-sk{display:grid;grid-template-columns:30px minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:6px;align-items:center;padding:3px 5px;border-radius:6px;background:#0b071299;border:1px solid #c9a35a33}
.lab-sk>span{grid-row:1/3}.lab-sk .lab-ic{width:30px;height:30px}
.lab-sk b{font-size:12px;color:#ffe9b0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lab-sk small{font-size:10.5px;color:#c9b88f}
#stage .lab-sk button{grid-row:1/3;grid-column:3;min-height:0!important;height:26px;padding:0 8px!important;font-size:11.5px!important}
.lab-right h4{margin:0 0 6px;color:#ffe9b0}
.lab-right select{width:100%;margin-bottom:6px}
.lab-mons{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-bottom:8px}
#stage .lab-m{position:relative;height:66px!important;min-height:0!important;padding:0!important;overflow:hidden;border-radius:6px!important;background:#0b071299!important;border:1px solid #c9a35a33!important;display:block!important}
#stage .lab-m.on{border-color:#ffe08a!important}
.lab-m .monster-art{position:absolute;inset:0 0 14px;background-repeat:no-repeat}
.lab-m small{position:absolute;left:1px;right:1px;bottom:1px;font-size:9.5px;color:#ffe9b0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lab-sl{display:block;font-size:12.5px;color:#d8ccb4;margin:4px 0}.lab-sl b{color:#ffe08a}.lab-sl input{width:100%}
.lab-opts{display:grid;grid-template-columns:1fr 1fr;gap:2px 8px;font-size:12.5px;margin:6px 0 10px}
.lab-right>button{width:100%}.lab-note{display:block;margin-top:6px;color:#8a7a60;font-size:11px}
/* ภาพนักเรียนใหม่ในฉากต่อสู้ (พี่: "ใหญ่กว่านี้ ไม่ขาด ไม่ชอบแสงเงาตัวละคร") · ไม่มีเรืองทอง/เงาดำ · ขอบล่างตัดกลางต้นขาซ่อนใต้ขอบแผง */
/* 540px ใหญ่ไป หัวชนขอบบน (พี่ 2026-11-09: "ใหญ่ไปหัวขาด") → 460px */
/* ภาพกว้าง (เอฟเฟกต์ลากยาว เช่น ดาบเงาจันทร์ดับ) → กล่องกว้างตามสัดส่วน ตัวสูงเท่าคนอื่น · กึ่งกลางลำตัว (--scx) ตรงกลางแผง · ค่าใน student-art.js (ar, cx) */
.bt .fighter-figure.portrait[style*="img/students"]{width:calc(460px * var(--ssc,1) * var(--sar,1))!important;height:calc(460px * var(--ssc,1))!important;bottom:-40px!important;transform:translateX(calc(var(--scx,.5) * -100%))!important;filter:none!important;background-size:contain!important;background-position:center bottom!important}
.bt .fighter-panel.acting .fighter-figure.portrait[style*="img/students"]{filter:none!important}
/* มอนข้างนอก (ภาพวาดจากเกมหอคอย) · ใหญ่ขึ้น ไม่มีเงาดำ (ย้อมสีธาตุผ่าน filter ในสไตล์ของภาพเอง) */
.bt .fighter-figure.monster-art[style*="img/mobs"]{width:470px!important;height:470px!important;bottom:6px!important}
.bt .fighter-figure.monster-art[style*="img/mobs"]:not([style*="filter"]){filter:none!important}
/* ---- การ์ดวิญญาณ (soul-cards.js) ---- */
.soul-card{position:relative;width:150px;aspect-ratio:292/491;filter:drop-shadow(0 0 14px color-mix(in srgb,var(--gc) 70%,transparent))}
.soul-card .sc-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}
.soul-card .sc-art{position:absolute;background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--gc) 35%,#1a1226),#0b0712) ;background-size:cover}
.soul-card .sc-art{background-image:none}
.soul-card .sc-art[style*="url("]{background-color:#140e22;background-size:contain;background-repeat:no-repeat;background-position:center}
.soul-card .sc-name{position:absolute;left:8%;right:8%;bottom:6%;text-align:center;font:700 12px var(--font);color:#2a1a08;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.soul-card.big{width:190px}
.vc-card{position:absolute;right:40px;top:96px;width:470px;display:grid;grid-template-columns:190px 1fr;gap:14px;align-items:start;padding:12px;border-radius:12px;background:#0b0712e8;border:1px solid #c9a35a66;box-shadow:0 10px 30px #000a;animation:vcPrize .5s cubic-bezier(.2,1.4,.4,1) both;z-index:5}
.vc-ci{display:flex;flex-direction:column;gap:2px;color:#e8dcc4}
.vc-ci.done{grid-column:1/-1;align-items:center;padding:20px}
.vc-ct{font:800 15px var(--font);color:#ffe08a;margin-bottom:2px}
.vc-ci b{font-size:15px}.vc-ci small{font-size:12px;color:#d8ccb4}.vc-ci small.pr{color:#9fe8ff}
.vc-cq{margin:8px 0 4px;font-size:12.5px;color:#ffe9b0}.vc-cq em{color:#a09080;font-style:normal;font-size:11px}
.vc-tg{display:flex;flex-direction:column;gap:4px;margin-bottom:6px}
#stage .vc-tg button{min-height:0!important;height:30px;padding:0 10px!important;font-size:12.5px!important;text-align:left!important;justify-content:flex-start}
.vc-tg small{color:#9fe8ff;margin-left:6px}
.sock{display:inline-block;width:11px;height:11px;margin:0 2px;border-radius:50%;border:1.5px solid #a09080;background:#0b0712;vertical-align:middle}
.sock.on{border-color:var(--gc);background:radial-gradient(circle,#fff,var(--gc) 60%);box-shadow:0 0 6px var(--gc)}
.cell-socks{position:absolute;left:3px;bottom:2px;display:flex;line-height:0}.cell-socks .sock{width:8px;height:8px;margin:0 1px}
.rl-socks{display:flex;align-items:center;gap:2px;margin-top:2px}
#stage .rl-cl{min-height:0!important;height:18px;padding:0 6px!important;font-size:10px!important;margin-left:6px}
.gd-socks{margin-top:6px}.gd-socks>small{display:block;color:#c9b88f;font-size:11px;letter-spacing:1px;margin:6px 0 2px}
.gs-card{display:flex;flex-direction:column;padding:4px 8px;margin-bottom:3px;border-radius:6px;border-left:3px solid var(--gc);background:#0b071299}
.gs-card b{font-size:12.5px}.gs-card small{font-size:11.5px;color:#d8ccb4}.gs-card small.pr{color:#9fe8ff}
.gs-empty{font-size:12px;color:#8a7a60;padding:2px 0}.gs-note{font-size:11px;color:#8a7a60;font-style:normal}
img.item-art,img.gear-img{object-fit:contain}
/* หอคอย: เลือกชั้น · สมุดอาชีพ · จารึกเซิร์ฟ */
.tw-pick{display:inline-flex;align-items:center;gap:4px;margin-right:8px}
#stage .tw-pick button{min-width:0!important;min-height:0!important;height:32px;padding:0 10px!important;font-size:13px!important}
.tw-pick b{min-width:70px;text-align:center;color:#ffe08a;font-size:16px}
.cb-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:#e8dcc4}.cb-top b{color:#ffe08a}
.cb-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.cb-c{position:relative;height:118px;border-radius:8px;overflow:hidden;background:#0b071299;border:1px solid #c9a35a33}
.cb-c .portrait{position:absolute;inset:0 0 34px;background-repeat:no-repeat}
.cb-c b{position:absolute;left:4px;right:4px;bottom:16px;font-size:11.5px;color:#ffe9b0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
.cb-c small{position:absolute;left:4px;right:4px;bottom:2px;font-size:9.5px;text-align:center;color:#a09080;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cb-c.done{border-color:#ffd56a;box-shadow:inset 0 0 14px #ffd56a33}.cb-c.done small{color:#ffe08a}
.cb-c.open small{color:#9fe8ff}.cb-c.lock{opacity:.45}.cb-c.lock .portrait{filter:grayscale(1) brightness(.5)}
.sr-win{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}
.sr-win h4{margin:0 0 6px;color:#ffe9b0}.sr-win h4 small{color:#a09080;font-weight:400}
.sr-list{display:flex;flex-direction:column;gap:3px}
.sr-list>div{display:grid;grid-template-columns:28px minmax(0,1fr) auto;column-gap:8px;align-items:center;padding:3px 8px;border-radius:6px;background:#0b071299;border:1px solid #c9a35a33}
.sr-list i{font-style:normal;color:#ffe08a;font-weight:800;grid-row:1/3}.sr-list b{color:#fff}.sr-list small{grid-column:2;color:#c9b88f;font-size:11.5px}.sr-list em{grid-row:1/3;grid-column:3;font-style:normal;font-size:11px;color:#8a7a60}
/* ฉากชนะ: ข้อความหลายบรรทัด (หอคอย/การ์ด) ไม่ทับป้ายสล็อต */
#stage .vc-say{width:min(1080px,94%)!important}
#stage .vc-say p{font-size:15px!important;line-height:1.45!important}
#stage .vc-reel{bottom:176px!important}
/* หน้าค่าสถานะ: ภาพตัวละครเต็มตัว (พี่ 2026-11-09: "เป็นแบบเต็มตัวที่ออกแบบมา ย่อส่วนอื่นให้เห็นตัวละครชัดๆ") */
#stage .st-win{grid-template-columns:300px minmax(0,1fr) 420px;gap:12px}
#stage .st-left{gap:2px}
#stage .st-face{width:100%;max-width:none;height:346px;border-radius:12px;margin:0;background:radial-gradient(ellipse at 50% 75%,#2a1d45,#0b0712 72%);box-shadow:0 0 0 2px #c9a35a,0 0 0 5px #1a0a10}
#stage .st-face i[style*="img/students"]{left:4px!important;top:6px!important;right:4px;bottom:0;width:auto!important;height:auto!important;background-size:contain!important;background-position:center bottom!important;transform:none!important}
#stage .st-left h3{margin:4px 0 0;font-size:16px}
#stage .st-left p{font-size:12px!important;margin:0}
#stage .st-exp{margin-top:2px}#stage .st-exp small{font-size:10.5px}
#stage .st-pts{margin:4px 0 0;padding:2px 12px}#stage .st-pts b{font-size:20px}
#stage .st-left>button{min-height:0!important;height:28px;font-size:12px!important}
#stage .st-row{grid-template-columns:36px minmax(0,1fr) 40px 50px 62px 64px;padding:2px 6px;margin-bottom:2px}
#stage .st-nm{font-size:13px}#stage .st-nm small{font-size:10px}#stage .st-val{font-size:14px}
#stage .st-btns button{width:28px!important;height:28px!important;min-height:0!important;padding:0!important}
#stage .st-actions{margin-top:4px}#stage .st-actions button{min-width:120px;height:38px!important;min-height:0!important}
#stage .st-gear{grid-template-columns:minmax(0,1fr) 150px;padding:8px}
#stage .st-gear .st-slots{grid-template-columns:repeat(4,34px);gap:4px}
#stage .st-gear .st-slot{height:34px!important}#stage .st-gear .st-slot .item-art,#stage .st-gear .st-slot .gear-svg,#stage .st-gear .st-slot img{width:26px;height:26px}
#stage .st-gear .st-slot em{font-size:8.5px}
#stage .rl-stats>div{font-size:11px}
#stage .st-right .st-d{min-height:20px;font-size:11.5px}
#stage .st-left p.muted{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* ของประจำตัวเทพีย้ายไปคอลัมน์ขวา (ใต้สนับสนุน) · ช่องสวมใส่ตรงกลางขยายให้เห็นการ์ดที่ใส่ (พี่ 2026-11-09) */
#stage .st-right .st-relic{margin-top:6px;padding:6px 8px}
#stage .st-right .st-relic .rl-top{grid-template-columns:38px minmax(0,1fr) auto;gap:6px}
#stage .st-right .rl-ic .relic-svg,#stage .st-right .rl-ic .rl-card{width:38px;height:48px}
#stage .st-right .rl-nm b{font-size:13px}#stage .st-right .rl-plus{font-size:20px}
#stage .st-right .rl-stats{margin:4px 0;gap:0 8px}#stage .st-right .rl-stats>div{font-size:10.5px;line-height:1.5}
#stage .st-right .rl-up{height:28px!important;font-size:12px!important}
#stage .st-gear.eq7{display:block;padding:8px 10px}
.st-gh{font:700 12.5px var(--font);color:#ffe9b0;margin:0 0 6px 2px}.st-gh small{color:#8a7a60;font-weight:400;margin-left:6px}
#stage .st-gear.eq7 .st-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;justify-content:stretch}
#stage .st-gear.eq7 .st-slot{height:auto!important;min-height:0!important;padding:5px 4px 4px!important;display:grid!important;grid-template-rows:46px auto 14px;justify-items:center;gap:1px;border-radius:8px!important;width:100%!important}
#stage .st-gear.eq7 .ss-ic{width:46px;height:46px;display:grid;place-items:center}
#stage .st-gear.eq7 .ss-ic .item-art,#stage .st-gear.eq7 .ss-ic .gear-svg,#stage .st-gear.eq7 .ss-ic img{width:44px;height:44px}
#stage .st-gear.eq7 .ss-n{max-width:100%;font-size:10.5px;color:#e8dcc4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#stage .st-gear.eq7 .st-slot:not(.has) .ss-n{color:#7a6a50}
#stage .st-gear.eq7 .ss-sock{display:flex;justify-content:center;align-items:center;line-height:0}
#stage .st-gear.eq7 .ss-sock .sock{width:11px;height:11px}
#stage .st-gear.eq7 .ss-sock em{font-style:normal;font-size:9.5px;color:#6a5a48;line-height:14px}
#stage .st-right .st-d{min-height:19px!important;margin-bottom:1px!important;padding:0 7px!important}
#stage .st-right .st-g{margin-bottom:2px}

/* โรงหลอม: วัตถุดิบเป็นช่องไอเทม มี/ต้องใช้ · ของยังไม่ครบ = เทาทึบ (2026-11-09) */
#stage .fg-card{display:flex;flex-direction:column;gap:10px}
#stage .fg-top{display:flex;gap:12px;align-items:center}
#stage .fg-out{flex:none;width:84px;height:84px;display:grid;place-items:center;border-radius:8px;background:radial-gradient(circle at 50% 40%,#3a2c52,#0b0712);border:2px solid #c9a35a;box-shadow:inset 0 0 12px #000c,0 0 12px #ffcf6a55}
#stage .fg-out .item-art{width:72px;height:72px}
#stage .fg-card.lack .fg-out{border-color:#4a4150;box-shadow:inset 0 0 12px #000c}
#stage .fg-card.lack .fg-out .item-art{filter:grayscale(1) brightness(.45) contrast(.9);opacity:.8}
#stage .fg-info h3{margin:0 0 4px}
#stage .fg-info p{margin:0;font-size:12px;opacity:.75}
#stage .fg-mats{display:flex;flex-wrap:wrap;gap:8px}
#stage .fg-mat{position:relative;width:58px;height:58px;display:grid;place-items:center;border-radius:6px;background:radial-gradient(circle at 50% 38%,#2a2036,#0b0712);border:2px solid #8a7040;box-shadow:inset 0 0 10px #000b}
#stage .fg-mat .item-art{width:46px;height:46px}
#stage .fg-mat>b{position:absolute;right:3px;bottom:1px;font:800 13px var(--font);color:#9dff9a;text-shadow:0 0 3px #000,0 1px 0 #000,1px 0 0 #000,-1px 0 0 #000}
#stage .fg-mat.lack{border-color:#3d3540}
#stage .fg-mat.lack .item-art{filter:grayscale(1) brightness(.4);opacity:.75}
#stage .fg-mat.lack>b{color:#ff6b6b}
#stage .fg-gold>span{font-size:28px;color:#ffd36a;text-shadow:0 0 8px #ffb02e88}
#stage .fg-gold.lack>span{color:#6d6470;text-shadow:none}
#stage .fg-card button[disabled]{opacity:.55;filter:grayscale(1);cursor:not-allowed}
/* โรงหลอมรอบ 2: แท็บหมวด + เลือกเมือง + ป้ายขั้น */
#stage .fg-bar{display:flex;align-items:center;gap:10px;margin:0 0 10px}
#stage .fg-tabs{display:flex;flex-wrap:wrap;gap:4px;flex:1}
#stage .fg-tabs{flex-wrap:nowrap!important}#stage .fg-tabs button,#stage .fg-reg button{min-height:0!important;height:32px;padding:0 7px!important;font-size:12.5px!important;min-width:0!important;white-space:nowrap;opacity:.7}#stage .fg-reg button{opacity:1}
#stage .fg-tabs button.on{opacity:1;filter:brightness(1.3);color:#ffe9a8!important}
#stage .fg-reg{display:flex;align-items:center;gap:6px;white-space:nowrap}
#stage .fg-reg b{font-size:13px;color:#ffe2a0;min-width:84px;text-align:center}#stage .fg-bar>.gold{white-space:nowrap}
#stage .fg-reg button[disabled]{opacity:.35}
#stage .fg-tier{display:inline-block;margin:0 0 4px;padding:1px 8px;border-radius:10px;font:800 11px var(--font);color:#10121a}
#stage .fg-tier.t0{background:#cfd6e0}
#stage .fg-tier.t1{background:#6ab8ff}
#stage .fg-tier.t2{background:#ffcf5a}
#stage .fg-tier.tu{background:#9dff9a}
#stage .fg-card.lack .fg-tier{filter:grayscale(.7) brightness(.7)}