:root { --night: #12262c; --deep: #1d4c54; --cloth: #27636a; --paper: #f3e6c3; --pane: rgb(243 230 195 / .76); --tile: rgb(228 209 160 / .66); --head: rgb(29 76 84 / .84); --ink: #2f2218; --gold: #f0b43c; --red: #d9503f; --glass: rgb(14 32 38 / .82); --bar: 122px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; max-width: 100%; overscroll-behavior: none; }
body { background: var(--night); color: var(--paper); font: 600 15px/1.35 "Chakra Petch", "Leelawadee UI", Tahoma, sans-serif; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { min-height: 40px; border: 0; border-radius: 5px; padding: 5px 12px; background: var(--gold); color: var(--ink); cursor: pointer; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .22); white-space: nowrap; }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
button:disabled { opacity: .5; cursor: default; }
button.plain, button.x { background: var(--cloth); color: var(--paper); }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #ffe9b0; outline-offset: 2px; }
input:not([type=checkbox]) { min-width: 0; width: 100%; min-height: 44px; border: 2px solid var(--cloth); border-radius: 5px; padding: 6px 12px; background: #0d1d22; color: var(--paper); font-size: 16px; }
input::placeholder { color: #8fa9a6; font-weight: 500; }
canvas { image-rendering: pixelated; }
s { text-decoration: none; } i, em { font-style: normal; }

#game { height: 100dvh; width: 100%; overflow: hidden;  display: flex; flex-direction: column; align-items: center; justify-content: center; }
#stage { position: relative; height: min(100dvh - var(--bar), 177.78vw); width: min(100vw, calc(min(100dvh - var(--bar), 177.78vw) * 0.75)); max-width: 100vw; overflow: hidden; touch-action: none; user-select: none; flex: none; }
#pixels, #text { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; }
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; position: absolute; }

/* การ์ดโปรไฟล์ */
#card { left: 6px; top: 6px; width: clamp(192px, 62%, 232px); display: flex; gap: 7px; align-items: center; padding: 6px 9px 6px 6px; text-align: left; background: var(--glass); color: var(--paper); box-shadow: 0 0 0 2px var(--cloth); min-height: 0; }
#avatar { width: 52px; height: 56px; background: #2c6a6e; border-radius: 4px; flex: none; }
#card .info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.line { display: flex; gap: 6px; align-items: baseline; justify-content: space-between; min-width: 0; }
#cName { overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 1.25; }
#cLvl { color: var(--gold); font-size: 13px; flex: none; }
.meter { position: relative; height: 13px; border-radius: 3px; background: #0a181c; overflow: hidden; display: block; }
.meter s { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .4s; }
.meter em { position: absolute; inset: 0; font-size: 10px; line-height: 13px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
.xp s { background: #6aa0e0; } .energy s { background: #62b858; } .energy.low s { background: var(--red); }
.money { justify-content: flex-start; gap: 7px; white-space: nowrap; font-size: 12px; line-height: 1.2; }
.money small { margin-left: auto; font-size: 10px; color: #a9c4c0; }
.coin::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; background: var(--gold); box-shadow: inset -1px -2px 0 #b97a1c; }
.coin { font-variant-numeric: tabular-nums; }

#sky { left: calc(6px + clamp(192px, 62%, 232px) + 6px); right: 56px; top: 6px; display: flex; gap: 4px; pointer-events: none; }
#sky button { pointer-events: auto; width: 35px; flex: none; min-height: 48px; padding: 3px 0 4px; display: grid; justify-items: center; align-content: center; gap: 2px; background: var(--glass); color: var(--paper); box-shadow: 0 0 0 2px var(--cloth); font-size: 9.5px; line-height: 1.2; }
#hud { container-type: size; } @container (max-width: 345px) { #sky { left: auto; right: 6px; top: 146px; flex-direction: row-reverse; } #sky button { width: 44px; } }
#sky .col { display: flex; flex-direction: column; gap: 4px; }
#sky #tCh { min-height: 34px; padding: 2px 0 3px; gap: 0; } #tCh small { font-size: 8.5px; opacity: .85; } #tCh b { font-size: 14px; line-height: 1; color: #ffe27a; }
#sky b { font-weight: 600; } #timePic canvas { width: 24px; height: 22px; display: block; animation: skybob 3s ease-in-out infinite alternate; } #tTime.night { background: rgb(22 24 62 / .86); box-shadow: 0 0 0 2px #5560b4; } #tTime.night s { background: #b9c6ff; }
#sky .mini { width: 30px; height: 4px; } #pearlPic canvas { width: 21px; height: 21px; display: block; } #tPearl { align-self: flex-start; box-shadow: 0 0 0 2px #ff9fdc; background: rgb(70 30 74 / .86); animation: pearlbeat 1.6s ease-in-out infinite; }
#pearlPic .pearlpic { --s: 10px; } #pearlPic .pearlpic i:nth-of-type(1) { left: -5px; top: -3px; } #pearlPic .pearlpic i:nth-of-type(2) { right: -6px; --s: 9px; } #pearlPic .pearlpic i:nth-of-type(3) { left: 0; bottom: -3px; --s: 8px; }
@keyframes skybob { from { transform: translateY(-1px) rotate(-5deg); } to { transform: translateY(1px) rotate(5deg); } } @keyframes pearlbeat { 50% { box-shadow: 0 0 0 2px #ffd6f0, 0 0 14px 2px #ff9fdc; } }
#tools { right: 6px; top: 6px; display: grid; gap: 6px; justify-items: end; }
#tools button { width: 44px; min-height: 40px; padding: 0; background: var(--glass); color: var(--paper); box-shadow: 0 0 0 2px var(--cloth); display: grid; place-items: center; }
#tools canvas { width: 24px; height: 22px; }
#tGoal { font-size: 12px; align-content: center; gap: 3px; }
.mini { display: block; width: 34px; height: 5px; background: #0a181c; border-radius: 2px; overflow: hidden; }
.mini s { display: block; height: 100%; width: 0; background: var(--gold); }
#tGoal.rush { animation: glow .5s alternate infinite; }
@keyframes glow { to { box-shadow: 0 0 0 2px #ffe27a, 0 0 16px #ffe27a; } }

/* ลูกศรบอกว่าเลื่อนได้: เด้งและวาบไล่กัน */
.go { top: 50%; width: 48px; height: 72px; margin-top: -36px; padding: 0; background: none; box-shadow: none; display: flex; align-items: center; justify-content: center; }
#goL { left: 0; } #goR { right: 0; transform: scaleX(-1); }
#goR:active:not(:disabled) { transform: scaleX(-1); }
.go::before { content: ""; position: absolute; inset: 6px auto 6px 0; width: 46px; border-radius: 0 40px 40px 0; background: linear-gradient(90deg, rgb(255 226 122 / .5), transparent); animation: warp 1.5s ease-in-out infinite; transform-origin: left; }
.go i { position: relative; width: 17px; height: 34px; margin-left: -5px; background: #ffe27a; clip-path: polygon(100% 0, 100% 34%, 46% 50%, 100% 66%, 100% 100%, 0 50%); filter: drop-shadow(0 0 1px #3a1c08) drop-shadow(0 0 3px #3a1c08); animation: hop 1.5s ease-in-out infinite; }
.go i:nth-child(1) { animation-delay: .24s; } .go i:nth-child(2) { animation-delay: .12s; }
@keyframes hop { 0%, 60%, 100% { transform: translateX(6px); opacity: .62; } 25% { transform: translateX(-6px) scale(1.2); opacity: 1; } 40% { transform: translateX(1px); opacity: .85; } }
@keyframes warp { 0%, 100% { opacity: .35; transform: scaleX(.7); } 30% { opacity: 1; transform: scaleX(1.15); } }

#recenter { left: 50%; bottom: 48px; transform: translateX(-50%); background: var(--glass); color: var(--paper); box-shadow: 0 0 0 2px var(--cloth); display: flex; gap: 7px; align-items: center; font-size: 13px; }
#recenter:active:not(:disabled) { transform: translateX(-50%) translateY(1px); }
#recenter canvas { width: 24px; height: 22px; }
#roomPill { left: 6px; bottom: 6px; min-height: 34px; padding: 3px 10px; font-size: 13px; background: var(--glass); color: var(--paper); box-shadow: none; }
/* การ์ดพยากรณ์อากาศ: มุมซ้ายล่างเหนือป้ายชาแนล โปร่งแสง ไอคอนพิกเซลลอยขึ้นลงเบา ๆ ฝนใกล้ตก = ขอบฟ้าเรืองกระพริบ */
#wxCard { left: 6px; bottom: 46px; display: flex; align-items: center; gap: 7px; min-height: 0; padding: 5px 10px 5px 7px; border-radius: 10px; background: rgb(14 32 38 / .55); color: var(--paper); box-shadow: 0 0 0 1.5px rgb(255 255 255 / .14); backdrop-filter: blur(3px); text-align: left; transition: box-shadow .4s; }
#wxCard:active:not(:disabled) { transform: translateY(1px); }
#wxPic { display: grid; place-items: center; width: 28px; height: 26px; border-radius: 8px; background: rgb(255 255 255 / .1); }
#wxPic canvas { width: 24px; height: 22px; image-rendering: pixelated; animation: wxbob 2.6s ease-in-out infinite; }
#wxCard .wxt { display: grid; line-height: 1.15; }
#wxCard b { font-size: 12.5px; font-weight: 700; } #wxCard small { font-size: 11px; opacity: .85; }
#wxCard.soon { box-shadow: 0 0 0 1.5px #9fd8ff; animation: wxglow 1.8s ease-in-out infinite; } #wxCard.soon small { color: #bfe6ff; opacity: 1; }
#wxCard.rain small { color: #bfe6ff; opacity: 1; }
@keyframes wxbob { 50% { transform: translateY(-1.5px); } }
@keyframes wxglow { 50% { box-shadow: 0 0 0 1.5px #9fd8ff, 0 0 10px rgb(159 216 255 / .55); } }
#hud:has(#chatSheet:not([hidden])) :is(#wxCard, #worldFeed) { visibility: hidden; }
/* แชทโลกมุมขวาล่าง: แถวข้อความโปร่งแสง ใหม่อยู่ล่าง เด้งขึ้นมาแล้วค่อย ๆ จางหาย ชื่อสีชมพูแบบแชทโลก */
#worldFeed { right: 6px; bottom: 6px; width: 200px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
#worldFeed li { pointer-events: auto; cursor: pointer; max-width: 100%; padding: 4px 9px; border-radius: 9px; background: rgb(14 32 38 / .55); box-shadow: 0 0 0 1.5px rgb(255 255 255 / .12); backdrop-filter: blur(3px); color: var(--paper); font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; animation: wfIn .25s ease-out, wfOut var(--life, 8000ms) linear forwards; }
#worldFeed b { color: #ff9fc0; font-weight: 700; }
@keyframes wfIn { from { transform: translateY(6px); } }
@keyframes wfOut { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
#roomPill::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7be08a; margin-right: 7px; }
#bots { right: 6px; bottom: 46px; display: flex; gap: 4px; }      /* โหมดทดสอบ: ยกขึ้นเหนือป้ายชาแนล ไม่ให้ทับชื่อแผนที่ */
#bots button { min-height: 34px; font-size: 13px; background: var(--glass); color: var(--paper); box-shadow: none; }
#offline { position: absolute; inset: auto 0 42% 0; text-align: center; background: rgb(60 20 18 / .92); padding: 10px; }
#toast { position: fixed; z-index: 5; left: 50%; top: 30%; transform: translateX(-50%); padding: 8px 14px; border-radius: 5px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 3px var(--deep); opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 86%; text-align: center; }
#toast.show { opacity: 1; } #toast.bad { background: #ffd9cc; }

/* เมนูล่าง */
#bar { width: min(100vw, calc(min(100dvh - var(--bar), 177.78vw) * 0.75)); height: var(--bar); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-rows: 1fr auto; gap: 7px; }
.menu { display: grid; grid-template-columns: 1.15fr repeat(5, 1fr); gap: 5px; }
.menu button { padding: 3px 0 5px; display: grid; justify-items: center; align-content: center; gap: 2px; background: var(--cloth); color: var(--paper); font-size: clamp(10.5px, 3.3vw, 14px); line-height: 1.15; position: relative; min-width: 0; }
.menu canvas { width: 24px; height: 22px; }
#fish { background: var(--gold); color: var(--ink); } #fish.stop { background: #b9c4b8; color: var(--ink); }
#hook { background: #8d3429; color: #fff; } #hook.now { background: var(--red); animation: pull .28s steps(2) infinite; }
@keyframes pull { to { background: #ffe27a; color: #7a1f14; } }
#chatBtn.new::after, #bag.new::after, #bookBtn.new::after { content: ""; position: absolute; right: 7px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
#chat { display: flex; gap: 6px; position: relative; }
#sayLeft { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #88a39f; pointer-events: none; font-variant-numeric: tabular-nums; } #sayLeft.full { color: var(--red); } #chat #say { padding-right: 34px; }
#sayGo.paid { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; padding-top: 2px; padding-bottom: 2px; } #sayGo.paid small { font-size: 11px; font-weight: 700; }
#chatList li b[onclick], #chatList li:not(.me) b { cursor: pointer; }

/* แชท */
#chatSheet { inset: auto 0 0 0; height: 56%; background: rgb(12 28 33 / .78); box-shadow: 0 -2px 0 var(--cloth); display: flex; flex-direction: column; user-select: text; touch-action: pan-y; }
.tabs { display: flex; gap: 4px; }
.tabs button { flex: 1; min-height: 40px; padding: 4px 6px; background: transparent; color: inherit; box-shadow: inset 0 -2px 0 rgb(128 128 128 / .35); border-radius: 0; opacity: .75; min-width: 0; }
.tabs button[aria-selected=true] { box-shadow: inset 0 -3px 0 var(--gold); opacity: 1; }
.tabs button.x { flex: 0 0 auto; opacity: 1; background: none; box-shadow: none; }
#chatList { list-style: none; margin: 0; padding: 6px 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 14px; overscroll-behavior: contain; }
#chatList > :first-child { margin-top: auto; }
#chatList li { overflow-wrap: anywhere; } #chatList b { color: #9fd8ff; margin-right: 6px; } #chatList .me b { color: #ffe27a; } #chatList time { color: #88a39f; font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
#chatList .ann { color: #ffd84a; } #chatList .k-level { color: #ffe27a; } #chatList .k-sell { color: #f0c878; } #chatList .k-pearl, #chatList .k-shop { color: #ffd0ee; } #chatList .k-info { color: #a9c4c0; } #chatList .empty { color: #a9c4c0; }

#hud:has(#chatSheet:not([hidden])) :is(#roomPill, #bots, #recenter) { visibility: hidden; }

/* เข้าสู่ระบบ */
/* หน้าแรก: ฉากเต็มจอ ตัดขอบซ้ายขวา */
.landing #stage { height: max(100dvh, 560px); max-width: none; }
#joinBox { position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(rgb(10 26 30 / .55), rgb(10 26 30 / .05) 34%, rgb(10 26 30 / .35) 60%, rgb(10 26 30 / .8)); padding: max(16px, 6dvh) 16px max(16px, 5dvh); overflow: auto; }
.logo { flex: none; text-align: center; color: #ffe9b0; text-shadow: 0 3px 0 #12323a, 0 0 14px #12323a; } .logo h1 { margin: 0; font-size: clamp(34px, 11vw, 50px); line-height: 1.25; letter-spacing: .01em; } .logo p { margin: 0; font-size: 15px; color: #e8f6ea; } .logo .en { display: block; margin: -2px 0 6px; font-size: 17px; letter-spacing: .14em; color: #9fe3c8; }
.panel { flex: none; width: min(330px, 100%); display: grid; gap: 10px; }
#vHome button { min-height: 52px; font-size: 18px; } #vHome .ghost { background: rgb(14 32 38 / .72); color: var(--paper); box-shadow: 0 0 0 2px var(--cloth); } #homeMsg { margin: 0; min-height: 1.4em; text-align: center; color: #ffe9b0; font-size: 14px; }
#goResume { background: #62b858; color: #0e2410; white-space: normal; line-height: 1.25; }
#join { background: rgb(243 230 195 / .94); color: var(--ink); border-radius: 6px; padding: 14px; box-shadow: 0 0 0 3px var(--head), 0 14px 30px rgb(0 0 0 / .4); margin: auto 0; }
#join header { display: flex; align-items: center; gap: 10px; } #join h2 { margin: 0; font-size: 21px; color: var(--deep); } #goBack { min-width: 44px; font-size: 22px; padding: 0; line-height: 1; }
#join label, #linkForm label { font-size: 14px; display: grid; gap: 3px; } #join input, #linkForm input { background: #fffaf0; color: var(--ink); }
#join input::placeholder, #linkForm input::placeholder { color: #8a7a60; }
#join .note { margin: 0; font-size: 13px; font-weight: 500; } #join .note:empty { display: none; }
div.reg { display: grid; justify-items: center; gap: 6px; } #preview { width: 225px; height: 100px; }
#join.login :is(.reg, .acc2), #join:is(.guest, .solo, .google) :is(.acc, .acc2) { display: none; }
#linkDlg { background: rgb(243 230 195 / .97); } #linkDlg[open] { width: min(330px, calc(100vw - 32px)); padding: 16px; } #linkForm { display: grid; gap: 10px; } #linkForm h2 { margin: 0; color: var(--deep); } #linkForm p { margin: 0; font-weight: 500; font-size: 14px; } #lErr { color: #a3281a; min-height: 1.2em; }
#authErr { margin: 0; color: #a3281a; min-height: 1.3em; font-size: 14px; }

/* กระเป๋าและหน้าต่าง */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--pane); border-radius: 6px; box-shadow: 0 0 0 3px var(--head), 0 14px 40px rgb(0 0 0 / .4); overflow: hidden; backdrop-filter: blur(2px); }
.optc { color: #1a7a34; } .optp { color: #d63a12; }
#chatList .k-optc { color: #7ee08a; } #chatList .k-optp { color: #ff8a5c; }
/* สีตามช่องแชท: โลก = ชมพูแดง, แผนที่ = เขียว, ระบบและประกาศ = เหลืองเทา */
#chatList li.ch-world { color: #ff8fa8; } #chatList li.ch-world b { color: #ff5c80; }
#chatList li.ch-map { color: #9be89a; } #chatList li.ch-map b { color: #5fd46a; }
#chatList li.me b { color: #ffe27a; }
#chatList[data-tab="sys"] li, #chatList li.ann { color: #d4cc9e; }
#chatList li.empty { color: #a9c4c0; }
/* ปุ่มเลือกช่องที่จะส่ง หน้าช่องพิมพ์ */
#sayTo { flex: none; min-width: 58px; padding-left: 8px; padding-right: 8px; font-weight: 700; }
#sayTo.to-world { background: #c8385e; color: #fff; box-shadow: inset 0 -3px 0 #8e2242; } #sayTo.to-map { background: #3f9a4a; color: #fff; box-shadow: inset 0 -3px 0 #2a6e33; }
.goalrow { align-items: center; } .goalcount { margin-left: auto; } .rw { min-width: 74px; justify-content: center; text-align: center; } .rw.wait { opacity: .55; } .rw.wait .pearlpic i { display: none; } .rw.got { color: #1a7a34; font-size: 14px; } button.rw.ready { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 2px 12px; animation: glowrw 1s alternate infinite; } @keyframes glowrw { to { box-shadow: inset 0 -3px 0 rgb(0 0 0 / .22), 0 0 10px 2px #ffd84a; } }
.rods { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.rods li { display: grid; grid-template-columns: 70px 1fr auto; gap: 4px 10px; align-items: center; background: var(--tile); border-radius: 5px; padding: 8px 10px; }
.rods li.on { background: #fff6da; box-shadow: inset 0 0 0 3px var(--deep); } .rods canvas { width: 70px; }
.rods .txt { display: grid; gap: 1px; min-width: 0; line-height: 1.3; } .rods small { font-weight: 600; font-size: 14px; } .rods .wait { color: #8a5a10; }
.rods .btns { display: grid; gap: 5px; } .rods .btns button { min-height: 38px; padding: 3px 12px; font-size: 14px; } .rods .btns .plain { min-height: 34px; }
.nm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .tier.grade { font-size: 12px; padding: 0 8px; } .gradehead { align-items: center; margin-top: 2px; }
.rodtile canvas { width: 100px; }
.body p.hint { font-size: 12px; line-height: 1.35; }
#revealDlg { background: var(--deep); color: var(--paper); text-align: center; overflow: hidden; } #revealDlg[open] { width: min(320px, calc(100vw - 40px)); padding: 18px; display: grid; gap: 10px; justify-items: center; }
#revealDlg canvas { width: 200px; animation: rodshake .9s ease-in-out; } #revealDlg b { font-size: 19px; }
#revealDlg .got { font-size: 18px; padding: 8px 14px; border-radius: 5px; background: #fffaf0; animation: pop .5s .85s both; } #revealDlg .row { width: 100%; animation: pop .4s 1.1s both; }
@keyframes rodshake { 0% { transform: scale(.7); } 15%, 45%, 75% { transform: rotate(-9deg) scale(1.02); } 30%, 60% { transform: rotate(9deg) scale(1.06); } 88% { transform: scale(1.25); filter: brightness(2.2); } 100% { transform: none; filter: none; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } to { transform: none; opacity: 1; } }
#askDlg, #pickDlg { background: rgb(243 230 195 / .95); }
/* ส่งความคิดเห็น (ปุ่มในตั้งค่า) */
#fbDlg { background: var(--paper); color: var(--ink); } #fbDlg[open] { width: min(360px, calc(100vw - 32px)); padding: 16px; animation: pop .3s both; }
#fbForm { display: grid; gap: 10px; } #fbForm .nhead { font-size: 18px; color: var(--deep); text-align: center; } .fbhint { margin: 0; font-size: 13px; line-height: 1.45; color: #6b5a44; text-align: center; }
.fbkinds { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fbkinds button { padding: 5px 10px; font-size: 13px; background: #fffaf0; color: var(--ink); box-shadow: inset 0 0 0 2px #d8c49a; border-radius: 14px; }
.fbkinds button[aria-pressed=true] { background: var(--gold); box-shadow: inset 0 0 0 2px #b7801f; }
#fbText { width: 100%; resize: none; font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 6px; border: 2px solid #d8c49a; background: #fffdf5; color: var(--ink); }
.fbleft { text-align: right; color: #8a7a62; margin-top: -6px; } .fbleft.bad { color: var(--red); }
.fbbtn { width: 100%; }
/* ประกาศจากทีมงาน (เช่น รีเซ็ตข้อมูล) ขึ้นตอนเข้าเกม กด "รับทราบ" แล้วไม่ขึ้นอีก */
#noticeDlg { background: var(--paper); color: var(--ink); text-align: center; } #noticeDlg[open] { width: min(340px, calc(100vw - 40px)); padding: 18px; display: grid; gap: 12px; animation: pop .35s both; }
#noticeDlg .nhead { font-size: 19px; color: var(--deep); } #noticeDlg p { margin: 0; white-space: pre-line; line-height: 1.5; }
#noticeGift { display: grid; gap: 4px; padding: 10px; border-radius: 6px; background: #fff3c8; box-shadow: inset 0 0 0 2px var(--gold); } #noticeGift small { color: #8a5a10; } #noticeGift b { font-size: 16px; color: #2c6b3a; }
#pickDlg[open] { width: min(320px, calc(100vw - 40px)); padding: 16px; display: grid; gap: 14px; } #pickDlg p { margin: 0; white-space: pre-line; }
#pickDlg .picks { display: grid; gap: 8px; } #pickDlg .picks button { width: 100%; }
dialog::backdrop { background: rgb(8 20 24 / .22); }
dialog.sheet[open] { width: min(440px, calc(100vw - 20px)); height: min(680px, calc(100dvh - 40px)); display: flex; flex-direction: column; }
.body > * { flex-shrink: 0; }
#infoDlg.sheet[open] { height: fit-content; max-height: min(680px, calc(100dvh - 40px)); }
dialog header { display: flex; gap: 8px; align-items: center; padding: 8px; background: var(--head); color: var(--paper); }
dialog header .tabs { flex: 1; min-width: 0; } dialog h2 { margin: 0 0 0 6px; flex: 1; font-size: 19px; }
.tabs.sub { background: var(--head); color: var(--paper); padding: 0 8px; }
.body { padding: 12px; overflow-y: auto; overflow-x: hidden; flex: 1; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.body h3 { margin: 4px 0 0; font-size: 15px; } .body p { margin: 0; font-weight: 500; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row > button { flex: 1; }
.sum { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sum button.slotbtn { min-height: 28px; padding: 2px 10px; font-size: 13px; margin-right: auto; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; position: relative; }
.slot .badge { position: absolute; left: 2px; top: 2px; font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; padding: 2px 4px; border-radius: 3px; background: var(--deep); color: var(--paper); }
.slot.none { background: #e9dfc4; } .slot .badge.wait { background: #b8862a; color: #fff; } .slot.worn { background: #fff6da; }
/* ช่องที่มีราคา: รูปด้านบน ราคาบรรทัดล่าง ตัวเลขยาวได้ไม่ทับรูป */
.slot.priced { aspect-ratio: auto; grid-template-rows: auto auto; align-content: start; gap: 1px; padding: 4px 2px 4px; }
.slot.priced .pic { width: 100%; aspect-ratio: 1.1; display: grid; place-items: center; overflow: hidden; }
.slot.priced .pic canvas.look { height: 96%; }
.slot .foot { font-size: 12px; font-weight: 700; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot .foot.coin::before { width: 8px; height: 8px; margin-right: 3px; }
.slot .foot.pp, .slot .foot.sp { color: #8a3a78; }
.slot .foot.pp::before, .slot .foot.sp::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; background: radial-gradient(circle at 35% 35%, #fff, #f3d6e8 55%, #b48ac8); box-shadow: 0 0 0 1px #7a6298; }
.slot .foot.sp::before { border-radius: 2px 50% 2px 50%; }
.slot .foot.own { color: var(--deep); font-weight: 600; }
.slot.priced.worn .foot.own { font-weight: 700; }
.slot canvas[width="40"] { width: 80%; } .slot canvas.look { width: auto; height: 90%; }
.tip { position: absolute; z-index: 3; background: #fff6da; border-radius: 6px; padding: 10px; display: grid; gap: 8px; box-shadow: 0 0 0 2px var(--deep), 0 6px 16px rgb(0 0 0 / .35); }
.tip.pop { animation: tipin .12s ease-out; }
.tip b { font-size: 16px; } .tip p { margin: 0; }
.tip::before { content: ''; position: absolute; left: calc(var(--ax) - 8px); top: -9px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--deep); }
.tip.up::before { top: auto; bottom: -9px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--deep); }
@keyframes tipin { from { opacity: 0; transform: translateY(-4px); } }
.tip.up.pop { animation-name: tipup; } @keyframes tipup { from { opacity: 0; transform: translateY(4px); } }
.hint { margin: 0; font-size: 13px; opacity: .75; }
.slot { aspect-ratio: 1; min-height: 0; padding: 0; background: var(--tile); position: relative; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--tier, #cdb987); }
.slot canvas { width: 92%; } .slot em { position: absolute; right: 4px; bottom: 1px; font-size: 12px; } .slot[aria-pressed=true] { background: #fff6da; outline: 3px solid var(--deep); }
.detail { background: #fff6da; border-radius: 5px; padding: 10px; display: grid; gap: 8px; } .detail b { font-size: 17px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; } .chips button { min-height: 36px; padding: 3px 11px; background: var(--tile); box-shadow: none; } .chips button[aria-pressed=true] { background: var(--deep); color: var(--paper); }
.chips button { flex: 1 1 auto; }
.gear { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gear li, .fishes li { list-style: none; } .gear, .fishes { margin: 0; padding: 0; }
.gear button { width: 100%; height: 100%; padding: 6px 4px; display: grid; justify-items: center; align-content: start; gap: 2px; background: var(--tile); box-shadow: none; white-space: normal; line-height: 1.25; font-size: 14px; }
.gear canvas { width: 116px; max-width: 100%; } .gear button[aria-pressed=true] { box-shadow: inset 0 0 0 3px var(--deep); background: #fff6da; } .gear small { font-size: 12px; font-weight: 500; }
.hero { display: flex; gap: 12px; align-items: center; background: #bcd6c0; border-radius: 5px; padding: 8px 12px; } .hero canvas { width: 144px; }
.fishes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .fishes li { background: var(--tile); border-radius: 4px; padding: 8px 6px; display: grid; justify-items: center; text-align: center; gap: 1px; }
.fishes canvas { width: 132px; max-width: 100%; } .fishes span { font-size: 13px; font-weight: 500; } .fishes .none { background: rgb(228 209 160 / .4); } .fishes .none canvas { opacity: .7; }
.tier { display: inline-block; padding: 1px 9px; border-radius: 3px; background: #3a2c28; color: var(--tier); font-size: 14px; }
.prog { height: 12px; background: var(--tile); border-radius: 3px; overflow: hidden; } .prog s { display: block; height: 100%; background: #62b858; }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; } .check input { width: 22px; height: 22px; accent-color: var(--deep); flex: none; } .check.sub { margin-left: 30px; } .check.off { opacity: .5; }
.ptag { display: inline-flex; gap: 5px; align-items: center; } .gear .ptag canvas, .ptag canvas { width: 20px; height: 20px; }
/* ไข่มุกวิ้งๆ: ดาวสี่แฉกกะพริบสลับกัน */
.pearlpic { position: relative; display: inline-grid; place-items: center; --s: 9px; } .slot .pearlpic { width: 100%; --s: 17px; }
.pearlpic i { position: absolute; width: var(--s); height: var(--s); filter: drop-shadow(0 0 1px #b060c0); animation: twinkle 1.8s ease-in-out infinite; pointer-events: none; }
.pearlpic i::before { content: ""; position: absolute; inset: 0; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.pearlpic i:nth-of-type(1) { left: 2%; top: 2%; } .pearlpic i:nth-of-type(2) { right: 0; top: 24%; animation-delay: .6s; --s: 7px; } .pearlpic i:nth-of-type(3) { left: 22%; bottom: 0; animation-delay: 1.2s; --s: 7px; }
.slot .pearlpic i:nth-of-type(1) { left: 24%; top: 4%; } .slot .pearlpic i:nth-of-type(2) { right: 20%; top: 26%; --s: 15px; } .slot .pearlpic i:nth-of-type(3) { left: 30%; bottom: 0; --s: 13px; }
.slot .pearlpic i { filter: drop-shadow(0 0 1px #b03c9a) drop-shadow(0 0 2px #ff6fce); } .ptag .pearlpic i:nth-of-type(1) { left: -3px; top: -3px; } .ptag .pearlpic i:nth-of-type(2) { right: -3px; } .ptag .pearlpic i:nth-of-type(3) { display: none; }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 45% { transform: scale(1.15) rotate(20deg); opacity: 1; } 70% { transform: scale(.3) rotate(35deg); opacity: .5; } }
.rank { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; } .rank li { display: grid; grid-template-columns: 20px 66px 1fr auto; align-items: center; gap: 8px; line-height: 1.25; background: var(--tile); padding: 8px 10px; border-radius: 4px; } .rank li.me { background: #fff0b8; } .rank canvas { width: 66px; } .rank .who { min-width: 0; overflow-wrap: anywhere; } .rank .who small { display: block; font-weight: 500; font-size: 13px; } .rank .kg { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; } .rank .tier { font-size: 12px; padding: 0 7px; }
#askDlg[open] { width: min(320px, calc(100vw - 40px)); padding: 16px; display: grid; gap: 14px; } #askDlg p { margin: 0; white-space: pre-line; }
@media (prefers-reduced-motion: reduce) { #timePic canvas, #tPearl, button.rw.ready, #revealDlg *, .pearlpic i, .go i, .go::before, #hook.now, #tGoal.rush { animation: none; opacity: .9; } #hook.now { background: #ffe27a; color: #7a1f14; } }

/* มือถือแนวนอน: บังจอให้หมุนกลับ (เกมยังรันอยู่ข้างหลัง) */
#turn { display: none; }
html.turned #turn { position: fixed; inset: 0; z-index: 2147483647; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: var(--night); color: var(--paper); }
html.turned #turn b { font-size: 20px; color: var(--gold); } html.turned #turn p { margin: 0; font-size: 14px; opacity: .85; }
html.turned main, html.turned dialog { visibility: hidden; } html.turned dialog::backdrop { background: none; }
#turn .phone { width: 34px; height: 58px; border: 4px solid var(--paper); border-radius: 7px; position: relative; animation: turnme 2.4s ease-in-out infinite; }
#turn .phone::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 8px; height: 3px; margin-left: -4px; border-radius: 2px; background: var(--paper); }
@keyframes turnme { 0%, 20% { transform: rotate(-90deg); } 55%, 100% { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { #turn .phone { animation: none; } }

/* บอสประจำแผนที่ */
#bossBar { left: 6px; right: 56px; top: 96px;          /* main.js วางใต้การ์ดโปรไฟล์จริงอีกที */ padding: 5px 8px 6px; border-radius: 5px; background: rgb(60 16 18 / .86); box-shadow: 0 0 0 2px #c9483c; display: grid; gap: 3px; pointer-events: none; }
#bossBar.warn { background: rgb(40 24 30 / .86); box-shadow: 0 0 0 2px #8a5a64; animation: glowred 1s alternate infinite; }
#bossBar .bn { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#bossBar b { font-size: 13px; color: #ffd9a0; } #bossBar small { font-size: 11px; color: #f3c8b8; font-variant-numeric: tabular-nums; }
#bossBar .meter { height: 12px; } #bossBar .meter s { background: linear-gradient(#ff7a5a, #d9302a); } #bossBar .meter em { line-height: 12px; }
@keyframes glowred { to { box-shadow: 0 0 0 2px #ff7a6a, 0 0 14px #ff5a4a; } }
#fish.atk { background: #e8503c; color: #fff6e4; animation: glowred .8s alternate infinite; }
.shardbar { height: 10px; border-radius: 3px; background: #0a181c; overflow: hidden; } .shardbar s { display: block; height: 100%; background: linear-gradient(90deg, #ffb0e0, #ff8fcf); }
@media (prefers-reduced-motion: reduce) { #bossBar.warn, #fish.atk { animation: none; } }

/* เลือกชาแนล: การ์ดแผนที่เลื่อนแนวนอน + ตารางชาแนล 3 ช่องต่อแถว */
.mapcards { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -2px; overscroll-behavior-x: contain; scrollbar-width: thin; }
.mapcard { flex: 0 0 112px; scroll-snap-align: start; min-height: 0; padding: 0 0 6px; display: grid; justify-items: center; gap: 1px; background: var(--tile); box-shadow: 0 0 0 2px transparent; border-radius: 6px; overflow: hidden; position: relative; white-space: normal; line-height: 1.2; }
.mapcard img { width: 100%; height: 42px; object-fit: cover; image-rendering: pixelated; display: block; margin-bottom: 3px; }
.mapcard b { font-size: 14px; } .mapcard small { font-size: 12px; opacity: .8; }
.mapcard i { position: absolute; top: 3px; left: 3px; font-style: normal; font-size: 10.5px; padding: 1px 5px; border-radius: 3px; background: var(--gold); color: var(--ink); font-weight: 700; }
.mapcard[aria-pressed=true] { box-shadow: 0 0 0 3px var(--deep); background: var(--deep); color: var(--paper); }
.mapcard.locked img { filter: grayscale(.85) brightness(.75); }
.chgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chgrid .ch { min-height: 50px; padding: 4px 4px 7px; display: grid; justify-items: center; align-content: center; gap: 1px; background: var(--tile); box-shadow: none; position: relative; overflow: hidden; white-space: normal; line-height: 1.2; }
.chgrid .ch b { font-size: 14px; } .chgrid .ch small { font-size: 11.5px; opacity: .8; }
.chgrid .ch .fill { position: absolute; left: 0; bottom: 0; height: 4px; }
.chgrid .ch.cur { background: var(--deep); color: var(--paper); opacity: 1; }
.mapcards::-webkit-scrollbar { height: 4px; } .mapcards::-webkit-scrollbar-thumb { background: rgb(0 0 0 / .25); border-radius: 2px; } .mapcards { scrollbar-color: rgb(0 0 0 / .25) transparent; }
.rule { margin: 6px 0 8px; padding: 6px 9px; border-radius: 5px; background: rgb(0 0 0 / .06); box-shadow: inset 3px 0 0 var(--deep); font-size: 13px; line-height: 1.35; } .rule b { display: block; font-size: 14px; } .rule p { margin: 2px 0 0; }

/* เหยื่อพิเศษ */
.baitrow { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 7px 8px; margin-bottom: 6px; border-radius: 5px; background: var(--tile); }
.baitrow b { font-size: 14px; } .baitrow p { margin: 1px 0 0; font-size: 12.5px; opacity: .85; } .baitrow small.on { display: block; margin-top: 2px; font-size: 12px; color: #2f8a3a; font-weight: 700; }
.baitrow button { flex: none; min-width: 74px; display: grid; justify-items: center; gap: 0; line-height: 1.15; padding: 3px 8px; } .baitrow button small { font-size: 11.5px; }
#buffs { position: absolute; left: 6px; top: 86px; max-width: clamp(192px, 62%, 232px); padding: 2px 8px; border-radius: 4px; background: rgb(20 60 40 / .78); color: #c8f8c0; font-size: 11.5px; font-weight: 700; pointer-events: none; }

/* สัตว์เลี้ยง */
canvas.pix { image-rendering: pixelated; }
.eggcard { display: flex; gap: 10px; align-items: center; padding: 8px; margin-bottom: 8px; border-radius: 6px; background: var(--tile); }
.eggcard.soon { opacity: .6; } .eggpic { flex: none; width: 66px; display: grid; place-items: center; } .eggpic canvas { width: 54px; height: auto; }
.eggbody { flex: 1; display: grid; gap: 4px; } .eggbody small { font-size: 12px; opacity: .8; } .eggbody button { min-height: 36px; }
.rates { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; } .rates span { display: inline-flex; align-items: center; gap: 4px; } .rates i { width: 9px; height: 9px; border-radius: 2px; background: var(--tier); box-shadow: 0 0 0 1px rgb(0 0 0 / .3); }
.petdex { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .petdex div { display: grid; justify-items: center; align-content: end; gap: 1px; padding: 6px 2px 4px; border-radius: 5px; background: var(--tile); box-shadow: inset 0 -3px 0 var(--tier); min-height: 78px; }
.petdex canvas { max-width: 56px; height: auto; } .petdex small { font-size: 11.5px; text-align: center; line-height: 1.15; } .petdex i { font-style: normal; font-size: 10.5px; opacity: .75; }
.petopts { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; } .optpet { color: #7a4ad8; font-weight: 700; }
dialog.gacha { width: min(320px, 92vw); padding: 12px 12px 14px; text-align: center; background: radial-gradient(circle at 50% 40%, #3a5a8a, #172840); color: #fff; }
dialog.gacha::backdrop { background: rgb(8 14 24 / .7); }
#eggCv { width: 100%; height: auto; image-rendering: pixelated; display: block; }
#eggTitle { display: block; font-size: 18px; margin-top: 4px; min-height: 1.3em; } #eggSub { margin: 4px 0 10px; min-height: 1.3em; font-size: 14px; color: #d8e4f0; }
#eggBtns { justify-content: center; } #eggBtns button { min-width: 110px; }
.goldperk { color: #b8741a; font-weight: 700; opacity: 1 !important; } .eggicons { position: absolute; right: 3px; top: 3px; display: flex; gap: 1px; } .eggicon { width: 11px; height: 13px; } .eggfrom .eggicon { vertical-align: -2px; } .slot .foot.tiername { font-size: 11.5px; color: inherit; opacity: .8; } .slot { position: relative; }
#bots { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 12px); }
.treats { display: flex; gap: 14px; margin: -2px 0 8px; font-size: 13.5px; font-weight: 700; } .treats span { display: inline-flex; align-items: center; gap: 5px; } .treats i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset -1px -2px 0 rgb(0 0 0 / .25), 0 0 0 1px rgb(0 0 0 / .3); }

.eggs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.eggcard2 { position: relative; display: grid; justify-items: center; gap: 3px; padding: 10px 8px 8px; border-radius: 6px; background: var(--tile); }
.eggcard2.soon { opacity: .6; } .eggcard2 > b { font-size: 15px; } .eggcard2 .eggbuy { width: 100%; min-height: 38px; margin-top: 4px; }
.eggcard2 .eggpic { background: none; box-shadow: none; padding: 0; min-height: 0; } .eggcard2 .eggpic canvas { width: 60px; height: auto; display: block; }
.eggcard2 .eggi { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; font-weight: 800; font-size: 14px; background: var(--deep); color: var(--paper); box-shadow: none; }

/* ---------- กระเป๋า: การ์ดตัวละครแบบเกม ---------- */
.charcard { display: flex; gap: 10px; align-items: stretch; padding: 6px; border-radius: 8px; background: #2a5a5f; box-shadow: inset 0 0 0 2px #3f7f84, 0 3px 0 #143338; color: var(--paper); }
.stage { position: relative; flex: 0 0 46%; min-height: 128px; border-radius: 6px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 10px;
  background: linear-gradient(#8fd3ee 0%, #c9eef6 58%, #7cbf5a 58%, #68a84a 100%); box-shadow: inset 0 0 0 2px #143338; }
.stage::after { content: ""; position: absolute; left: 0; right: 0; top: 58%; height: 3px; background: #4e8f3c; }
.stage .pedestal { position: absolute; bottom: 7px; left: 50%; width: 70%; height: 12px; transform: translateX(-50%); border-radius: 50%; background: rgb(20 40 30 / .28); }
.stage canvas { position: relative; z-index: 1; image-rendering: pixelated; } .stage > canvas:first-of-type { width: 96px; height: auto; }
.stage canvas.pix { width: auto; height: 40px; margin-left: -6px; }
.cinfo { flex: 1; display: grid; align-content: center; gap: 6px; min-width: 0; }
.plate { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; background: #183d42; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .3); min-width: 0; }
.plate .lv { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--gold); color: var(--ink); font-size: 12.5px; font-weight: 800; }
.plate b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff3cf; }
.stat { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 5px; background: rgb(243 230 195 / .92); color: var(--ink); font-size: 13.5px; }
.stat .ico { width: 14px; height: auto; image-rendering: pixelated; } .stat .kg { font-size: 10.5px; font-weight: 800; padding: 0 3px; border-radius: 3px; background: #2f2218; color: var(--paper); }
.equip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 8px 0; }
.eqslot { min-height: 0; padding: 4px 2px 3px; display: grid; justify-items: center; gap: 1px; border-radius: 6px; background: rgb(228 209 160 / .9); color: var(--ink); box-shadow: inset 0 0 0 2px #b9a77a, 0 2px 0 rgb(0 0 0 / .18); }
.eqslot.coin { box-shadow: inset 0 0 0 2px #55c070, 0 2px 0 rgb(0 0 0 / .18); } .eqslot.pearl { box-shadow: inset 0 0 0 2px #ff8a5c, 0 2px 0 rgb(0 0 0 / .18); } .eqslot.pet { box-shadow: inset 0 0 0 2px #a77ae8, 0 2px 0 rgb(0 0 0 / .18); }
.eqslot.on { background: #fff3cf; transform: translateY(-1px); }
.eqpic { height: 38px; display: grid; place-items: center; overflow: hidden; } .eqpic canvas { max-height: 38px; max-width: 44px; width: auto; height: auto; image-rendering: pixelated; } .eqpic .empty { opacity: .45; font-size: 18px; }
.eqslot small { font-size: 11px; }
.buffs { border-radius: 8px; padding: 6px 8px 8px; background: #f7ebcb; box-shadow: inset 0 0 0 2px #c9b17c, 0 3px 0 rgb(0 0 0 / .15); color: var(--ink); display: grid; gap: 5px; margin-bottom: 8px; }
.bhead { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 3px; border-bottom: 2px dashed #d8c494; } .bhead b { font-size: 15px; } .bhead small { opacity: .7; }
.brow { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 5px; background: rgb(255 255 255 / .55); }
.btag { flex: none; min-width: 52px; text-align: center; font-size: 11px; font-weight: 800; padding: 2px 5px; border-radius: 4px; color: #fff; background: #8a7a5a; }
.brow.coin .btag { background: #3f9a52; } .brow.pearl .btag { background: #e0703f; } .brow.pet .btag { background: #8a5ad0; }
.btxt { display: grid; font-size: 13.5px; line-height: 1.25; } .btxt small { font-size: 11px; opacity: .65; font-weight: 600; }
.brow.coin .btxt { color: #23703a; } .brow.pearl .btxt { color: #c24a1c; } .brow.pet .btxt { color: #6a3cb8; }
.stage > canvas:first-of-type { width: 112px; } .stage canvas.pix { height: 46px; } .eqpic canvas { height: 34px; width: auto; max-width: 48px; max-height: none; }

/* กระเป๋าเงิน (หน้าตัวละคร) */
.wallet .wrow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px; background: rgb(255 255 255 / .55); }
.wpic { width: 20px; display: grid; place-items: center; } .wpic .coin::before { width: 12px; height: 12px; margin: 0; } .wfish { image-rendering: pixelated; width: 16px; height: auto; }
.wdot { width: 13px; height: 13px; border-radius: 50%; background: var(--c); box-shadow: inset -1px -2px 0 rgb(0 0 0 / .25), 0 0 0 1px rgb(0 0 0 / .35); }
.wname { flex: 1; display: grid; font-size: 14px; line-height: 1.2; } .wname small { font-size: 11px; opacity: .65; } .wrow b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wallet button { margin-top: 2px; }
/* ---------- ร้านค้าแบบเกม ---------- */
#mainBody .sum { align-items: center; padding: 6px 10px; border-radius: 7px; background: #183d42; color: #fff3cf; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .3), 0 2px 0 #0e2629; margin-bottom: 8px; }
#mainBody .sum b, #mainBody .sum span { color: #fff3cf; }
#mainBody .rule { background: #f7ebcb; box-shadow: inset 0 0 0 2px #c9b17c, 0 3px 0 rgb(0 0 0 / .15); border-radius: 8px; padding: 7px 10px; }
#mainBody .rule b { color: #6a4a1e; }
#mainBody .chips button { box-shadow: inset 0 0 0 2px #c9b17c, 0 2px 0 rgb(0 0 0 / .18); background: #f1e2b8; color: var(--ink); border-radius: 6px; }
#mainBody .chips button[aria-pressed=true] { background: var(--deep); color: #fff3cf; box-shadow: inset 0 0 0 2px #3f7f84, 0 2px 0 #0e2629; }
#mainBody h3 { display: inline-block; margin: 10px 0 6px; padding: 2px 10px; border-radius: 4px; background: #6a4a1e; color: #fff3cf; font-size: 14px; }
.treats { padding: 5px 10px; border-radius: 6px; background: #f7ebcb; box-shadow: inset 0 0 0 2px #c9b17c; color: var(--ink); width: fit-content; }
.eggcard2 { background: linear-gradient(#9fd8f0, #d4f0f6 62%, #f1e2b8 62%); box-shadow: inset 0 0 0 3px #9fb4c8, 0 3px 0 rgb(0 0 0 / .2); border-radius: 8px; }
.eggcard2:last-child { box-shadow: inset 0 0 0 3px #e0a83a, 0 3px 0 rgb(0 0 0 / .2); }
.eggcard2 .eggpic { position: relative; } .eggcard2 .eggpic::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 52px; height: 9px; transform: translateX(-50%); border-radius: 50%; background: rgb(20 40 50 / .25); z-index: -1; }
.eggcard2 > b { color: #3a2a14; }

/* สมุดสะสม: แถบระดับเป็นสีของระดับนั้น */
#mainBody .goalrow { align-items: center; padding: 5px 10px; background: color-mix(in srgb, var(--tier) 72%, #3a3020); color: var(--ink); box-shadow: inset 0 -2px 0 rgb(0 0 0 / .22), 0 2px 0 rgb(0 0 0 / .18); }
#mainBody .goalrow .goalname { font-size: 15px; color: #1e1810; } #mainBody .goalrow .goalcount { color: #1e1810; font-weight: 700; }

/* อันดับนักตก แบบเกม */
#infoBody .sum { align-items: center; padding: 6px 10px; border-radius: 7px; background: #183d42; color: #fff3cf; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .3), 0 2px 0 #0e2629; margin: 4px 0 8px; }
#infoBody .sum span { font-size: 12.5px; opacity: .85; }
.rank li { background: #f7ebcb; box-shadow: inset 4px 0 0 var(--tier), inset 0 0 0 2px #d8c494, 0 2px 0 rgb(0 0 0 / .15); border-radius: 6px; padding: 7px 10px 7px 12px; color: var(--ink); }
.rank li .no { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #c9b17c; color: #fff; font-size: 12.5px; }
.rank li.r1 .no { background: #e8b22e; box-shadow: 0 0 0 2px #fff3b0; } .rank li.r2 .no { background: #a8b4c0; box-shadow: 0 0 0 2px #eef2f6; } .rank li.r3 .no { background: #c07a44; box-shadow: 0 0 0 2px #f6d8b8; }
.rank li.me { background: #fff3cf; box-shadow: inset 4px 0 0 var(--tier), inset 0 0 0 2px var(--gold), 0 2px 0 rgb(0 0 0 / .15); }
.rank li { grid-template-columns: 24px 66px 1fr auto !important; }
#infoBody h3 { display: inline-block; margin: 10px 0 6px; padding: 2px 10px; border-radius: 4px; background: #6a4a1e; color: #fff3cf; font-size: 14px; }

/* หน้าตั้งค่าแบบเกม */
.setcard { margin-bottom: 8px; } .setcard .hint { margin: 2px 2px 0; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 8px; border-radius: 6px; background: rgb(255 255 255 / .55); cursor: pointer; position: relative; }
.toggle .tname { flex: 1; display: grid; font-size: 14.5px; } .toggle .tname small { font-size: 11.5px; opacity: .65; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .knob { flex: none; width: 46px; height: 24px; border-radius: 12px; background: #b9a77a; box-shadow: inset 0 2px 0 rgb(0 0 0 / .2); position: relative; transition: background .15s; }
.toggle .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff8e4; box-shadow: 0 2px 0 rgb(0 0 0 / .25); transition: left .15s; }
.toggle input:checked + .knob { background: #3f9a52; } .toggle input:checked + .knob::after { left: 25px; }
.toggle input:focus-visible + .knob { outline: 2px solid var(--deep); outline-offset: 2px; }
.tierpick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; } .tierpick.off { opacity: .45; }
.tierpick button { min-height: 34px; padding: 2px; font-size: 12.5px; background: #efe3c2; color: var(--ink); box-shadow: inset 0 0 0 2px #cdb987, 0 2px 0 rgb(0 0 0 / .15); border-radius: 6px; }
.tierpick button[aria-pressed=true] { background: color-mix(in srgb, var(--tier) 75%, #3a3020); box-shadow: inset 0 0 0 2px rgb(0 0 0 / .25), 0 2px 0 rgb(0 0 0 / .2); font-weight: 800; }
button.logout { width: 100%; margin-top: 4px; background: #b8473a; color: #fff3e8; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .25); }

/* ---------- แชทแบบเกม ---------- */
#chatSheet { background: rgb(12 30 34 / .86); box-shadow: 0 -3px 0 #3f7f84, 0 -6px 0 rgb(0 0 0 / .25); border-radius: 12px 12px 0 0; }
#chatTabs { gap: 5px; padding: 7px 8px 5px; box-shadow: none; border-bottom: 2px dashed rgb(159 216 255 / .15); }
#chatTabs button { flex: 1; min-height: 32px; padding: 2px 6px; border-radius: 7px; background: #183d42; color: #d8e4e0; opacity: 1; font-size: 13.5px; box-shadow: inset 0 0 0 2px #2c5c62, 0 2px 0 rgb(0 0 0 / .3); }
#chatTabs button[aria-selected=true] { color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35), 0 2px 0 rgb(0 0 0 / .3); }
#chatTabs button[data-tab=all][aria-selected=true] { background: var(--gold); color: var(--ink); }
#chatTabs button[data-tab=world][aria-selected=true] { background: #c8385e; }
#chatTabs button[data-tab=map][aria-selected=true] { background: #3f9a4a; }
#chatTabs button[data-tab=sys][aria-selected=true] { background: #8a8466; }
#chatTabs #chatClose { flex: none; min-width: 52px; background: #b8473a; color: #fff3e8; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .25); }
#chatList { gap: 3px; padding: 6px 8px; }
#chatList li { padding: 4px 8px; border-radius: 6px; background: rgb(255 255 255 / .06); line-height: 1.35; }
#chatList li.ann, #chatList[data-tab="sys"] li { background: rgb(212 204 158 / .08); }
#chatList li.me { background: rgb(255 226 122 / .1); }
#chatList li.empty { background: none; box-shadow: none; text-align: center; padding-top: 18px; }
#chatList time { display: inline-block; min-width: 34px; padding: 0 4px; margin-right: 6px; border-radius: 3px; background: rgb(0 0 0 / .25); color: #8fa8a4; font-size: 11px; text-align: center; }

/* หน้าสุ่มไข่แบบเกม: หัวหน้าต่างเหมือนเมนูอื่น เวทีกรอบเข้ม การ์ดผลลัพธ์กระดาษ */
dialog.gacha { width: min(330px, 92vw); padding: 0; text-align: center; background: var(--pane); color: var(--ink); }
dialog.gacha .gbody { padding: 10px; display: grid; gap: 8px; }
.gstage { border-radius: 8px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #3f7f8a, #1a3a44 70%); box-shadow: inset 0 0 0 3px #143338, 0 3px 0 rgb(0 0 0 / .2); }
.gcard { border-radius: 8px; padding: 7px 10px; background: #f7ebcb; box-shadow: inset 0 0 0 2px #c9b17c, 0 3px 0 rgb(0 0 0 / .15); min-height: 54px; display: grid; align-content: center; }
#eggTitle { font-size: 17px; margin: 0; color: #3a2a14; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; } #eggTitle .tier { font-size: 12.5px; }
#eggSub { margin: 3px 0 0; color: #5a4a30; font-size: 14px; } #eggSub.optpet { color: #6a3cb8; font-weight: 700; }
#eggBtns { justify-content: center; } #eggBtns button { flex: 1; min-width: 0; }

/* หน้าเลือกชาแนลแบบเกม */
#infoBody .chgrid .ch { min-height: 54px; background: #f7ebcb; color: var(--ink); border-radius: 7px; box-shadow: inset 0 0 0 2px #c9b17c, 0 2px 0 rgb(0 0 0 / .18); padding-bottom: 9px; }
#infoBody .chgrid .ch b { font-size: 14.5px; } #infoBody .chgrid .ch small { opacity: .75; }
#infoBody .chgrid .ch .fill { height: 5px; left: 6px; right: auto; bottom: 4px; border-radius: 3px; max-width: calc(100% - 12px); }
#infoBody .chgrid .ch::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 5px; border-radius: 3px; background: rgb(0 0 0 / .1); }
#infoBody .chgrid .ch.cur { background: var(--deep); color: #fff3cf; box-shadow: inset 0 0 0 2px var(--gold), 0 2px 0 #0e2629; opacity: 1; }
#infoBody .chgrid .ch.cur::after { background: rgb(255 255 255 / .15); }
#infoBody .chgrid .ch:disabled:not(.cur) { opacity: .55; }
#infoBody .hint { padding: 6px 10px; border-radius: 7px; background: #f7ebcb; box-shadow: inset 0 0 0 2px #c9b17c; color: #5a4a30; }

/* หน้าเวลาแบบเกม */
.timecard { border-radius: 8px; padding: 6px; background: #2a5a5f; box-shadow: inset 0 0 0 2px #3f7f84, 0 3px 0 #143338; display: grid; gap: 6px; margin-bottom: 8px; }
.tsky { position: relative; border-radius: 6px; min-height: 92px; display: grid; justify-items: center; align-content: center; gap: 0; box-shadow: inset 0 0 0 2px #143338; overflow: hidden; }
.timecard.day .tsky { background: linear-gradient(#7cc8ec, #c9eef6 70%, #7cbf5a 70%); } .timecard.night .tsky { background: linear-gradient(#1c2450, #3a3f78 70%, #2c4a3a 70%); }
.tico { position: absolute; top: 8px; right: 12px; width: 30px; height: auto; image-rendering: pixelated; }
.tclock { font-size: 34px; line-height: 1; color: #fff; text-shadow: 0 3px 0 rgb(0 0 0 / .35), 0 0 0 #000; -webkit-text-stroke: 1px rgb(20 30 40 / .5); }
.tphase { font-size: 13px; padding: 1px 10px; border-radius: 10px; background: rgb(0 0 0 / .35); color: #fff3cf; margin-top: 4px; }
.tbar { height: 8px; border-radius: 4px; background: #143338; overflow: hidden; } .tbar s { display: block; height: 100%; background: var(--gold); }
.timecard.night .tbar s { background: #a8b4ff; } .tleft { text-align: center; color: #fff3cf; font-size: 12.5px; }
.tev .btxt b { font-size: 14px; } .brow.none .btag { background: #8a7a5a; } .brow.none .btxt { color: #5a4a30; }

.goalcard .tsky { background: linear-gradient(#8fd6c8, #45909f 60%, #265c75); } .goalcard .tbar s { background: #5fd46a; }
.goalcard.rush .tsky { background: linear-gradient(#ffe8a0, #f0b43c 60%, #c87a2a); } .goalcard.rush .tbar s { background: var(--gold); }
.goalcard .tclock { font-size: 30px; }

/* ---------- หน้าเข้าเกมแบบเกม ---------- */
.gcardui { background: #f7ebcb; color: var(--ink); border-radius: 10px; padding: 12px; box-shadow: inset 0 0 0 2px #c9b17c, 0 0 0 3px #1d4c54, 0 12px 30px rgb(0 0 0 / .45); }
#vHome.gcardui { background: rgb(247 235 203 / .94); }
.gcardui header { display: flex; align-items: center; gap: 8px; margin: -12px -12px 4px; padding: 8px 10px; border-radius: 10px 10px 0 0; background: var(--head); color: var(--paper); }
.gcardui header h2 { margin: 0; font-size: 19px; color: #fff3cf; } #goBack, #pickBack { min-width: 40px; min-height: 36px; font-size: 22px; padding: 0; line-height: 1; }
#vHome .ghost { background: #183d42; color: #fff3cf; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .3); } #homeMsg { color: #6a4a1e; }
#vHome #goResume { background: #3f9a52; color: #fff; }
.pick { min-height: 64px; display: grid; justify-items: start; gap: 2px; padding: 8px 14px 8px 52px; text-align: left; white-space: normal; position: relative; background: #fff8e4; color: var(--ink); box-shadow: inset 0 0 0 2px #c9b17c, 0 3px 0 rgb(0 0 0 / .15); border-radius: 8px; }
.pick::before { content: "✉"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #1d4c54; color: #fff; font-size: 17px; }
.pick.gmail::before { content: "G"; background: #fff; color: #4285f4; font-weight: 900; box-shadow: 0 0 0 2px #dbe4f0; } .pick.guest::before { content: "▶"; background: #c9a24a; font-size: 13px; }
.pick b { font-size: 16px; } .pick small { font-size: 12.5px; opacity: .75; font-weight: 600; } .pick:disabled { opacity: .55; }
#join.gcardui { padding-top: 12px; } #join label { color: #4a3a22; }
.gbox { display: grid; justify-items: center; gap: 6px; } .gbox .or { font-size: 12.5px; color: #8a7a60; } #gBtn, #lGBtn { min-height: 44px; }
#linkForm .gbox { margin: 4px 0; }
#join header h2 { color: #fff3cf; } #join .note { color: #5a4a30; } #authErr { color: #b8473a; font-weight: 700; margin: 0; } #authErr:empty { display: none; }

/* ========== หน้าเข้าเกม: ป้ายไม้ + กระดาษ ปุ่มนูนแบบเกม ========== */
@keyframes logoBob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
@keyframes shine { 0% { left: -40%; } 60%, 100% { left: 120%; } }
#joinBox .logo { animation: logoBob 4.5s ease-in-out infinite; }
#joinBox .logo h1 { color: #ffe27a; -webkit-text-stroke: 2px #3e2a10; paint-order: stroke fill; text-shadow: 0 5px 0 #3e2a10, 0 8px 14px rgb(0 0 0 / .5); }
#joinBox .logo .en { display: inline-block; padding: 2px 14px; border-radius: 20px; background: #1d4c54; color: #bff4e0; box-shadow: 0 3px 0 #0e2629; text-shadow: none; }
#joinBox .logo p { margin-top: 6px; text-shadow: 0 2px 0 #12323a; }
#joinBox .gcardui { position: relative; padding: 16px 14px 14px; border-radius: 16px; background: linear-gradient(#fbf1d6, #efdcb0); color: var(--ink);
  box-shadow: inset 0 0 0 3px #fff6dc, inset 0 0 0 6px #c9a86a, 0 0 0 4px #5e3e20, 0 8px 0 #3e2a10, 0 18px 34px rgb(0 0 0 / .5); }
#joinBox .gcardui::before, #joinBox .gcardui::after { content: ""; position: absolute; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e8d0a0, #8a6238); box-shadow: 0 1px 0 #3e2a10; }
#joinBox .gcardui::before { left: 10px; } #joinBox .gcardui::after { right: 10px; }
#joinBox .gcardui header { margin: -16px -14px 8px; padding: 10px 14px 12px 12px; border-radius: 16px 16px 0 0; background: linear-gradient(#b4844f, #8a5f3a); border-bottom: 3px solid #5e3e20; box-shadow: inset 0 2px 0 rgb(255 255 255 / .25); }
#joinBox .gcardui header h2, #join header h2 { color: #fff3cf; text-shadow: 0 2px 0 #3e2a10; font-size: 20px; }
#joinBox .gcardui header button { background: #fff3cf; color: #5e3e20; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .2); border-radius: 10px; }
#joinBox button:not(.pick):not(.gfake):not(#goBack):not(#pickBack) { position: relative; overflow: hidden; min-height: 54px; font-size: 18px; font-weight: 800; border-radius: 12px; letter-spacing: .01em;
  box-shadow: inset 0 -5px 0 rgb(0 0 0 / .25), inset 0 2px 0 rgb(255 255 255 / .35), 0 3px 0 rgb(0 0 0 / .3); text-shadow: 0 1px 0 rgb(255 255 255 / .3); transition: transform .06s; }
#joinBox button:active { transform: translateY(2px); }
#joinBox button.plain:not(#goBack):not(#pickBack) { background: linear-gradient(#2f7a82, #1d5a62); color: #fff3cf; text-shadow: 0 1px 0 rgb(0 0 0 / .4); }
#joinBox button.ghost { background: linear-gradient(#24474d, #183338); color: #cfe6e0; text-shadow: none; }
#vHome #goResume { background: linear-gradient(#5cc46a, #3a9a4a); color: #fff; text-shadow: 0 1px 0 rgb(0 0 0 / .35); }
#vHome #goResume::after, #vHome #goRegister:not(.plain)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .35), transparent); transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite; }
#vHome { gap: 10px; }
.pick { min-height: 68px; border-radius: 12px; background: #fffaea; box-shadow: inset 0 0 0 2px #d9bf86, 0 4px 0 #b89a5c; transition: transform .06s; }
.pick:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #d9bf86, 0 2px 0 #b89a5c; }
.pick::before { width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .25); }
#join input:not([type=checkbox]) { border-radius: 10px; border: 3px solid #c9a86a; background: #fffaf0; box-shadow: inset 0 2px 0 rgb(0 0 0 / .06); }
#join input:focus { outline: none; border-color: #e8b22e; box-shadow: 0 0 0 3px rgb(240 180 60 / .35); }
#join label { font-weight: 700; }
#preview { background: radial-gradient(ellipse at 50% 90%, rgb(0 0 0 / .18), transparent 60%); }
.gbox { padding-top: 4px; } .gbox .or { display: flex; align-items: center; gap: 8px; width: 100%; } .gbox .or::before, .gbox .or::after { content: ""; flex: 1; height: 2px; background: #d9bf86; }
.gfake { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 24px; background: #fff; color: #3c4043; font-weight: 700; box-shadow: inset 0 0 0 2px #dadce0; }
.gfake i { font-style: normal; font-weight: 900; color: #4285f4; font-size: 18px; } .gfake:disabled { opacity: .6; } .gbox small { font-size: 12px; color: #8a7a60; }
#homeMsg:empty { display: none; }

/* กิจกรรมล็อคอิน 7 วัน */
/* ปุ่มคู่มือเกมหน้าแรก: ป้ายไม้ตัวหนังสือทอง เด่นบนกรอบครีม แต่เล็กกว่าปุ่มเข้าเล่น */
.wikilink { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; padding: 9px 12px; border-radius: 10px;
  background: linear-gradient(#9a5a2a, #7a4019); color: #ffe27a; font-size: 15px; font-weight: 700; text-decoration: none; letter-spacing: .2px;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .18), inset 0 -3px 0 rgb(0 0 0 / .25), 0 0 0 2px #4a2410, 0 3px 0 2px #3a1b0b; text-shadow: 0 2px 0 #4a2410; }
.wikilink:hover { filter: brightness(1.1); } .wikilink:active { transform: translateY(2px); }
.wikilink::after { content: "NEW"; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #e2483d; color: #fff; text-shadow: none; animation: wikiNew 1.6s ease-in-out infinite; }
@keyframes wikiNew { 50% { transform: scale(1.12); } }
#tQuest { position: relative; } #tQuest.new { box-shadow: 0 0 0 2px var(--gold); }
#tQuest.new::after { content: ""; position: absolute; right: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
/* อีโมต: ปุ่มข้างช่องแชท เปิดแผงเลือก 8 แบบเหนือช่องแชท */
#emoBtn { flex: none; width: 42px; padding: 0; font-size: 20px; line-height: 1; }
#emoPick { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; background: var(--paper); border-radius: 12px; box-shadow: 0 0 0 3px var(--ink), 0 6px 0 rgb(0 0 0 / .35); z-index: 5; }
#emoPick[hidden] { display: none; }
#emoPick button { display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px; background: var(--tile); color: var(--ink); font-size: 24px; line-height: 1; border-radius: 9px; }
#emoPick button small { font-size: 11px; font-weight: 700; }
#emoPick button:active { transform: scale(.92); }
/* ภารกิจรายวัน */
.qlist { display: grid; gap: 8px; }
.qrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 12px; background: var(--tile); border-radius: 10px; }
.qrow b { font-size: 15px; } .qrow.done { background: #d8efc4; } .qrow.claimed { opacity: .6; }
.qbar { grid-column: 1; height: 8px; border-radius: 4px; background: rgb(0 0 0 / .18); overflow: hidden; } .qbar s { display: block; height: 100%; background: #3f9a4a; text-decoration: none; }
.qrow .qnum { font-size: 12px; color: #6a5a48; font-variant-numeric: tabular-nums; }
.qrow button { grid-row: 1 / 3; grid-column: 2; min-width: 86px; }
.qbonus { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff3c8; box-shadow: inset 0 0 0 2px var(--gold); } .qbonus.got { opacity: .6; }
#tEvent { position: relative; } #tEvent.new { box-shadow: 0 0 0 2px var(--gold); animation: evpulse 1.6s ease-in-out infinite; }
#tEvent.new::after { content: ""; position: absolute; right: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
@keyframes evpulse { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 10px 2px rgb(240 180 60 / .6); } }
.slot .badge.event { background: var(--red); color: #fff; left: auto; right: 2px; }
.eggcard2 .eggfree { background: #4cae5a; color: #fff; }
.lday .ljar { width: auto; height: 44px; }
/* กิจกรรมล็อคอิน: กระดานเกม ป้ายทอง แถบความคืบหน้า การ์ดรางวัล ตราประทับ */
.lboard { margin: -4px; padding: 10px 10px 8px; border-radius: 10px; background: linear-gradient(#245d66, #163f47); box-shadow: inset 0 0 0 2px #3f8a8f, 0 3px 0 #0b2328; color: var(--paper); }
.lbanner { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; background: linear-gradient(#ffd877, #e9a531); color: #4a2610; box-shadow: inset 0 2px 0 rgb(255 255 255 / .45), inset 0 -3px 0 rgb(0 0 0 / .18), 0 3px 0 #8a5216; }
.lbanner b { font-size: 17px; letter-spacing: .2px; text-shadow: 0 1px 0 rgb(255 255 255 / .5); }
.lgift { width: 26px; height: 24px; flex: none; animation: lwiggle 2.4s ease-in-out infinite; }
.lclock { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgb(74 38 16 / .82); color: #ffe9b0; white-space: nowrap; }
.ltrack { position: relative; height: 14px; margin: 13px 34px 16px 10px; border-radius: 7px; background: #0c2a30; box-shadow: inset 0 2px 0 rgb(0 0 0 / .35); }
.ltrack s { position: absolute; inset: 0 auto 0 0; width: calc(var(--k) * 100%); border-radius: 7px; background: linear-gradient(#ffe27a, #e9a531); transition: width .5s; }
.ltrack i { position: absolute; top: 50%; left: calc(var(--x) * 100%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #2c5f66; box-shadow: 0 0 0 2px #0c2a30; }
.ltrack i.on { background: #ffe27a; box-shadow: 0 0 0 2px #8a5216, 0 0 6px #ffd24a; }
.ltrack i:last-of-type { width: 20px; height: 20px; margin: -10px 0 0 -10px; clip-path: polygon(50% 0, 63% 35%, 100% 38%, 72% 61%, 81% 100%, 50% 78%, 19% 100%, 28% 61%, 0 38%, 37% 35%); background: #ffd24a; box-shadow: none; }
.ltrack em { position: absolute; right: -32px; top: -3px; font-size: 13px; font-weight: 700; color: #ffe27a; }
.lgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 7px; padding-top: 4px; }
.lday { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 104px; padding: 15px 3px 7px; border-radius: 8px; text-align: center; color: var(--ink); background: linear-gradient(#fff8e2, #ecd9a8); box-shadow: inset 0 0 0 2px #c9a45c, 0 3px 0 #7a5a24; overflow: visible; }
.lday.grand { grid-column: span 2; background: linear-gradient(#fff3c0, #f3c95c); box-shadow: inset 0 0 0 2px #e9a531, 0 3px 0 #8a5216, 0 0 14px rgb(255 210 74 / .45); }
.lday.special:not(.grand) { background: linear-gradient(#e2f4ff, #a9d8f4); box-shadow: inset 0 0 0 2px #5aa8d8, 0 3px 0 #2c6a92, 0 0 12px rgb(120 200 255 / .45); }
.lbadge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; background: #27636a; color: #fff4d0; box-shadow: 0 0 0 2px #f3e6c3, 0 2px 0 2px #0b2328; z-index: 2; }
.lday.grand .lbadge { background: #c8403a; } .lday.special:not(.grand) .lbadge { background: #2c6a92; }
.lday .lpics { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; }
.lday .lit { position: relative; display: inline-grid; place-items: center; }
.lday .lq { position: absolute; right: -6px; bottom: -4px; padding: 0 3px; border-radius: 3px; font-size: 10.5px; line-height: 14px; background: #4a2610; color: #fff4d0; }
.lday .lpic { max-height: 42px; max-width: 46px; width: auto; height: auto; }
.lday .lgem { width: auto; height: 28px; } .lday .ljar { width: auto; height: 46px; }
.lday .lcoin::before { width: 26px; height: 26px; margin: 0; box-shadow: inset -2px -3px 0 #b97a1c, 0 0 0 2px #8a5216; }
.lticket { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 5px; border-radius: 3px; font-size: 11px; color: #fff; background: #c05a8a; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .55); border-left: 3px dotted #fff; border-right: 3px dotted #fff; }
.lticket.glow { background: #3c8ac8; } .lticket.scent { background: #4c9a58; }
.lday .lname { position: relative; z-index: 1; font-size: 11.5px; line-height: 1.2; font-weight: 700; }
.lrays { position: absolute; left: 50%; top: 40px; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: repeating-conic-gradient(rgb(255 255 255 / .55) 0 12deg, transparent 12deg 30deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%); animation: lspin 9s linear infinite; pointer-events: none; }
.lonce { position: absolute; top: -8px; right: -4px; z-index: 3; font-size: 10px; padding: 1px 5px; border-radius: 3px; background: var(--red); color: #fff; box-shadow: 0 2px 0 #7a1f18; transform: rotate(6deg); }
.ltoday { position: absolute; bottom: -9px; left: 50%; z-index: 3; transform: translateX(-50%); font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #4cae5a; color: #fff; box-shadow: 0 2px 0 #1f6a2c; white-space: nowrap; }
.lday.now { animation: lbob 1.2s ease-in-out infinite; box-shadow: inset 0 0 0 3px #4cae5a, 0 3px 0 #1f6a2c, 0 0 14px rgb(120 230 130 / .7); }
.lday.next { box-shadow: inset 0 0 0 2px #c9a45c, 0 3px 0 #7a5a24; outline: 2px dashed rgb(255 233 176 / .7); outline-offset: 2px; }
.lday.got > :not(.lstamp):not(.lbadge) { opacity: .45; filter: grayscale(.7); }
.lstamp { position: absolute; left: 50%; top: 46%; z-index: 4; padding: 2px 6px; border: 3px solid #c8403a; border-radius: 5px; font-size: 13px; font-weight: 700; color: #c8403a; background: rgb(255 248 226 / .85); transform: translate(-50%, -50%) rotate(-14deg); white-space: nowrap; }
.lday.pop .lstamp { animation: lstamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.lclaim { position: relative; overflow: hidden; width: 100%; min-height: 50px; margin: 16px 0 6px; font-size: 17px; border-radius: 8px; box-shadow: inset 0 2px 0 rgb(255 255 255 / .45), inset 0 -4px 0 rgb(0 0 0 / .22), 0 3px 0 #8a5216; }
.lclaim.ready { background: linear-gradient(#ffd877, #e9a531); animation: lbtn 1.4s ease-in-out infinite; }
.lclaim.ready::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / .7), transparent); animation: lshine 2.2s ease-in-out infinite; }
.lclaim:disabled { opacity: 1; background: #0c2a30; color: #cfe0dc; font-size: 14px; box-shadow: inset 0 2px 0 rgb(0 0 0 / .35); } .lclaim:disabled b { color: #ffe27a; }
.lrule { margin: 4px 2px 0; font-size: 11.5px; line-height: 1.35; color: #a9c9c4; text-align: center; }
@keyframes lbob { 50% { transform: translateY(-4px); } }
@keyframes lspin { to { transform: rotate(360deg); } }
@keyframes lwiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-12deg); } 84% { transform: rotate(10deg); } 92% { transform: rotate(-6deg); } }
@keyframes lshine { 0% { left: -40%; } 60%, 100% { left: 120%; } }
@keyframes lbtn { 50% { transform: scale(1.02); } }
@keyframes lstamp { 0% { transform: translate(-50%, -50%) rotate(-14deg) scale(2.4); opacity: 0; } 100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lday.now, .lrays, .lgift, .lclaim.ready, .lclaim.ready::after { animation: none; } }
