/* ตั้งค่า · รหัสประจำวัน */
.topnav .nav-out{margin-left:0}
.set-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:14px;color:var(--ink)}
.set-row .seg button{padding:5px 14px;font-size:12px}
.kc-box{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--hair);border-radius:10px;background:rgba(0,0,0,.25)}
.kc-row{display:flex;align-items:center;gap:10px;color:var(--ink-2);font-size:13px}
.kc-row span{flex:1}
.kc-code{font-family:var(--fd);font-size:28px;font-weight:600;letter-spacing:.14em;color:var(--ink);font-variant-numeric:tabular-nums}
.kc-row:nth-child(2) .kc-code{font-size:19px;font-weight:500;color:var(--ink-2)}
.kc-act{display:flex;gap:8px;flex-wrap:wrap}
.kc-sec{display:flex;flex-direction:column;gap:10px}
.kc-sec h3{margin:0;font-size:14px;font-weight:500;color:var(--brass)}
.ci-list{display:flex;flex-direction:column;gap:6px;max-height:220px;overflow:auto}
.ci-row{display:flex;align-items:center;gap:10px;padding:6px 8px;border:1px solid var(--hair);border-radius:8px;background:rgba(0,0,0,.2)}
.ci-row img{width:36px;height:36px;object-fit:cover;border-radius:6px;flex:none}
.ci-nm{flex:1;min-width:0;display:flex;flex-direction:column;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ci-nm small{color:var(--ink-3);font-size:11.5px}
.ci-prev{display:flex;align-items:center;gap:12px;color:var(--ink-2);font-size:12.5px}
.ci-prev img{width:96px;height:96px;object-fit:cover;border-radius:10px;border:1px solid var(--hair)}
.kc-err{margin:0;font-size:12.5px;color:var(--danger)}.kc-ok{margin:0;font-size:12.5px;color:var(--ok)}
/* หน้าตั้งค่า / ตัวจัดการรูป: แถบหัวข้อโค้งมีลายดาว · แถวขึ้นต้น ✦ · ตัวเลือกทรงเม็ดยา */
.gb-tname{min-width:5em}
.set-body{gap:10px;padding-top:14px}
.set-h{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding:8px 10px 8px 18px;border-radius:6px 999px 999px 6px;border:1px solid var(--brass-line);background:linear-gradient(90deg,rgba(217,164,90,.34),rgba(217,164,90,.14) 62%,rgba(217,164,90,.05));color:var(--cream);font-weight:500;font-size:15px;letter-spacing:.02em}
.set-body>.set-h:first-child{margin-top:0}
.set-stars{width:58px;height:17px;flex:none;fill:rgba(255,236,190,.34)}
.set-r{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:9px 12px 9px 16px;border-radius:12px;border:1px solid var(--hair);background:var(--glass-2)}
.set-l{display:flex;align-items:baseline;gap:9px;color:var(--ink);font-size:14px;font-weight:400}
.set-l::before{content:"✦";color:var(--brass);font-size:12px}
.set-sel{-webkit-appearance:none;appearance:none;min-width:158px;padding:8px 40px 8px 18px;border-radius:999px;border:1px solid var(--brass-line);background:#0A0F24 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23E2B85C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center/12px;color:var(--ink);font-size:14px;cursor:pointer}
.set-sel:hover{border-color:var(--brass)}
.set-seg{display:inline-flex;padding:3px;border-radius:999px;border:1px solid var(--brass-line);background:rgba(0,0,0,.45)}
.set-seg button{border:0;background:none;min-width:58px;padding:6px 16px;border-radius:999px;color:var(--ink-2);font-size:13px;letter-spacing:.03em}
.set-seg button[aria-pressed="true"]{background:linear-gradient(180deg,#F6CB74,#D9A13F);color:#2B1A05;font-weight:600}
.set-seg button:disabled{opacity:.45;cursor:not-allowed}
.set-btn{padding:8px 20px;border-radius:999px;border:1px solid var(--brass);background:rgba(217,164,90,.14);color:var(--cream);font-size:13.5px;font-weight:500}
.set-btn:hover{background:rgba(217,164,90,.28)}
.awk-ico{width:22px;height:22px;object-fit:contain;filter:drop-shadow(0 0 3px rgba(150,190,255,.6));align-self:center}
.awk-note{display:block;font-size:11.5px;color:var(--ink-3);font-weight:300;margin-left:8px}
.set-l:has(.awk-ico){flex-wrap:wrap}
.ci-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px}
.ci-hint{margin:-4px 2px 0;font-size:12px;color:var(--ink-3)}
.ci-act{display:flex;gap:8px;flex-wrap:wrap}
.ci-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.ci-tools input{flex:1;min-width:150px;border:1px solid var(--edge);background:#0B1624;border-radius:999px;padding:8px 16px;font-size:14px;color:var(--ink)}
.ci-list{max-height:min(46vh,380px)}
.ci-row{align-items:center;padding:8px 10px;border-radius:12px}
.ci-row img{width:44px;height:44px}
.ci-nm{white-space:normal;overflow:visible;gap:1px}
.ci-nm b{font-weight:500;font-size:14px}
.ci-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:3px}
.ci-tag{font-style:normal;font-size:11px;line-height:1.5;padding:0 8px;border-radius:999px;border:1px solid var(--tc,var(--hair));color:var(--tc,var(--ink-2))}
.ci-rar{color:var(--gold);border-color:var(--brass-line)}
.ci-use{color:var(--warn);border-color:var(--warn)}
.ci-empty{margin:6px 0;text-align:center;color:var(--ink-3);font-size:13px}
.cs{position:relative;display:inline-block;min-width:158px}
.cs-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px 8px 18px;border-radius:999px;border:1px solid var(--brass-line);background:#0A0F24;color:var(--ink);font-size:14px;text-align:left}
.cs-btn svg{width:12px;height:8px;flex:none;fill:none;stroke:#E2B85C;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.cs.open .cs-btn svg{transform:rotate(180deg)}
.cs-btn:hover,.cs.open .cs-btn{border-color:var(--brass)}
.cs-list{position:fixed;z-index:200;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:22px;background:rgba(20,26,46,.98);border:1px solid var(--brass-line);box-shadow:0 18px 50px rgba(0,0,0,.55);max-height:min(60vh,360px);overflow:auto}
.cs-opt{display:block;width:100%;text-align:left;padding:9px 16px;border-radius:999px;border:0;background:#0A0F24;color:var(--ink);font-size:14px}
.cs-opt:hover{background:#1A2547}
.cs-opt.sel{background:linear-gradient(180deg,#F6CB74,#D9A13F);color:#2B1A05;font-weight:600}
.dz{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:16px;border-radius:14px;border:1.5px dashed var(--brass-line);background:rgba(217,164,90,.06);color:var(--ink-2);font-size:13px;cursor:pointer;transition:border-color .15s,background .15s}
.dz:hover,.dz.over,.dz:focus-visible{border-color:var(--brass);background:rgba(217,164,90,.16);color:var(--ink)}
.dz.over{border-style:solid;box-shadow:0 0 0 3px rgba(217,164,90,.25)}
.dz svg{width:28px;height:28px;fill:none;stroke:var(--brass);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dz-main{min-height:150px}
.dz-img{max-height:150px;max-width:100%;border-radius:10px;object-fit:contain}
.dz-cap{font-size:12px;color:var(--ink-3)}
.dz-sm{min-height:0;padding:8px;gap:4px}
.dz-sm svg{width:22px;height:22px}
.dz-sm .dz-img{width:64px;height:64px;object-fit:cover}
.ci-sks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:10px}
.ci-sk{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:12px;border:1px solid var(--hair);background:var(--glass-2)}
.ci-sk.on{border-color:var(--brass-line)}
.ci-sk-h{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--ink)}
.ci-sk input[type="text"]{border:1px solid var(--edge);background:#0B1624;border-radius:8px;padding:6px 9px;font-size:13px;color:var(--ink);width:100%}
.ci-skico{width:22px;height:22px;border-radius:5px;object-fit:cover;border:1px solid var(--hair)}
@keyframes rk-glow{50%{filter:drop-shadow(0 0 22px rgba(246,196,83,.85)) drop-shadow(0 3px 4px rgba(0,0,0,.5))}}
@keyframes lg-in{from{opacity:0;transform:translateY(14px) scale(.98)}}
@keyframes rise{from{transform:translate(-50%,8px);opacity:0}}
@keyframes celestial-drift{to{background-position:40px -201px,110px -173px,90px -177px}}
@keyframes celestial-orbit{to{transform:rotate(360deg)}}
@keyframes celestial-shine{0%,65%{left:-65%}90%,100%{left:135%}}
@keyframes celestial-enter{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
html.force-motion .rk-sss .rk-em img{animation:rk-glow 3.2s ease-in-out infinite}
html.force-motion .login::after{animation:celestial-drift 26s linear infinite}
html.force-motion .lg-logo::before{animation:celestial-orbit 35s linear infinite}
html.force-motion .lg-logo::after{animation:celestial-orbit 50s linear infinite reverse}
html.force-motion .lg-go::after{animation:celestial-shine 6s ease-in-out infinite}
html.force-motion .lg-card{animation:celestial-enter .65s var(--ease) both}
html.force-motion #toast:not([hidden]){animation:rise .18s ease-out}
html.force-motion.anim-in .banner{animation:celestial-enter .55s var(--ease) both}
html.force-motion.anim-in .gb-card{animation:celestial-enter .5s var(--ease) both}
html.force-motion.anim-in .gb-card:nth-child(2){animation-delay:.07s}
html.force-motion.anim-in .gb-card:nth-child(3){animation-delay:.14s}
html.force-motion dialog[open]{animation:celestial-enter .25s var(--ease)}
html[data-theme="light"]:not(#_) .spd-ico{filter:brightness(.28) sepia(.4) saturate(2)}
html.force-motion .as-ring::before{animation-duration:2.2s!important}
html.no-motion .as-ring::before{animation:as-spin 5s linear infinite!important}/* ดาวแนะนำไม้ตีของทีมแก้ + แถบ "มีไม้แนะนำ" บนทีมศัตรู */
@keyframes rec-twinkle{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.14) rotate(8deg)}}
.gb-star{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 8px;border-radius:999px;border:1px solid var(--hair);background:rgba(0,0,0,.28);color:var(--ink-3);font-size:12px;flex:none}
.gb-star svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.gb-star em{font-style:normal;font-weight:600;white-space:nowrap}
button.gb-star:hover{color:var(--gold);border-color:var(--brass)}
.gb-star.on{color:#2B1A05;border-color:#F2C86B;background:linear-gradient(180deg,#F8D783,#DFA23C)}
.gb-star.on svg{fill:#FFF6D0;stroke:#8A5A12;filter:drop-shadow(0 0 3px rgba(255,235,160,.95))}
.gb-star.ro{cursor:default}
.off-castles{align-items:center}
.rec-strip{display:flex;align-items:center;gap:7px;width:fit-content;max-width:100%;margin:0 0 0 auto;padding:4px 10px 4px 8px;border-radius:12px;border:1px solid #D9A45A;background:linear-gradient(90deg,rgba(248,215,131,.30),rgba(223,162,60,.12) 70%,rgba(223,162,60,.05));color:#FFE7A6;font-size:13px;text-align:left;cursor:pointer;box-shadow:0 0 14px rgba(255,214,120,.18) inset,0 0 0 1px rgba(255,236,190,.06)}
.rec-strip:hover{border-color:#F2C86B;background:linear-gradient(90deg,rgba(248,215,131,.42),rgba(223,162,60,.18) 70%,rgba(223,162,60,.08))}
.rec-strip svg{width:20px;height:20px;flex:none;fill:#FFD86B;stroke:#8A5A12;stroke-width:1.2;stroke-linejoin:round;filter:drop-shadow(0 0 5px rgba(255,220,120,.9))}
html:not(.no-motion) .rec-strip svg{animation:rec-twinkle 2.8s ease-in-out infinite}
.rec-strip b{font-weight:600;letter-spacing:.02em;font-size:12.5px}
.rec-hits{margin-left:2px;display:flex;gap:4px}
.rec-hits i{font-style:normal;font-size:11.5px;line-height:1;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:linear-gradient(180deg,#F8D783,#DFA23C);color:#2B1A05;font-weight:700}/* ไอคอนประกาศ/บันทึกอัปเดตบนแถบเมนู + แถบประกาศ + รายการ */
.nav-out{position:relative}
.nav-ico{width:20px;height:20px;object-fit:contain;display:block}
.nav-dot{position:absolute;top:4px;right:4px;width:9px;height:9px;border-radius:50%;background:#FF5A5A;box-shadow:0 0 0 2px var(--navy),0 0 8px rgba(255,90,90,.8)}
html[data-theme="light"]:not(#_) .nav-ico,html[data-theme="light"]:not(#_) .news-bar img{filter:brightness(.32)}
.nav-out.lg-lang{position:absolute;top:22px;right:24px;z-index:3}
.news-bar{position:relative;display:flex;align-items:center;gap:14px;max-width:1720px;margin:12px auto 0;width:calc(100% - 32px);padding:12px 14px 12px 16px;border-radius:16px;border:1px solid #D9A45A;background:radial-gradient(120% 160% at 0% 0%,rgba(248,215,131,.30),transparent 55%),linear-gradient(90deg,rgba(38,30,16,.72),rgba(20,24,44,.72));color:#FFE7A6;box-shadow:0 8px 26px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,236,190,.07);overflow:hidden}
.news-bar::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,#F8D783,#DFA23C)}
.news-orb{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#FFE9A8,#D9A23F 70%);box-shadow:0 0 0 3px rgba(248,215,131,.25),0 0 16px rgba(255,214,120,.55)}
.news-orb img{width:24px;height:24px;object-fit:contain;filter:brightness(.15)}
.news-orb.sm{width:34px;height:34px;box-shadow:0 0 0 2px rgba(248,215,131,.2)}
.news-orb.sm img{width:18px;height:18px}
.news-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
.news-txt small{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#D9A45A;font-weight:500}
.news-txt b{font-weight:600;font-size:16px;color:#FFF1C4}
.news-txt span{white-space:pre-wrap;font-size:14px;color:#F3E6C4;line-height:1.5}
.news-ph{opacity:.55;font-style:normal}
.news-side{display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex:none}
.news-side time{font-size:11.5px;color:#C9B27A}
.news-bar.prev{margin:0;width:100%}
.nw-prevwrap{display:flex;flex-direction:column;gap:6px}
.nw-prevlbl{font-size:12px;color:var(--ink-3)}
.nw-cnt{float:right;font-style:normal;color:var(--ink-3);font-size:11.5px}
.news-compose{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:14px;border:1px solid var(--brass-line);background:rgba(217,164,90,.05)}
.news-list{display:flex;flex-direction:column;gap:10px}
.news-txt a,.news-item p a{color:#FFD98A;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.ci-urg{font-style:normal;color:#fff;background:linear-gradient(180deg,#F0605D,#C23A3A);border-color:#F0605D;font-weight:600}
.news-bar.urgent{border-color:#F0605D}.news-bar.urgent::before{background:linear-gradient(180deg,#FF8A86,#D24545)}
.news-item.urgent{border-color:rgba(240,96,93,.55);background:linear-gradient(90deg,rgba(240,96,93,.12),transparent 60%),var(--glass-2)}
.news-item.expired{opacity:.62}
.news-exp{font-size:11.5px;color:var(--ink-3)}
.nw-sel{background:rgba(255,255,255,.06);color:inherit;border:1px solid var(--hair);border-radius:8px;padding:6px 10px;font:inherit;font-size:13px;max-width:60%}
.nw-sel option{background:#0A0F24;color:#E6E3FF}
.news-nudge.urgent{border-color:#F0605D}
@media(max-width:520px){.news-nudge{left:10px;right:10px;max-width:none;bottom:calc(10px + env(safe-area-inset-bottom,0px));padding:7px 6px 7px 10px;gap:9px;border-radius:14px}.nn-txt small{display:none}.nn-txt b{font-size:13px}.nn-go{padding:6px 12px}}
.news-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px;color:var(--ink-3)}
.news-item{display:flex;gap:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--hair);background:var(--glass-2)}
.news-item.pinned{border-color:var(--brass-line);background:linear-gradient(90deg,rgba(217,164,90,.10),transparent 60%),var(--glass-2)}
.news-item.fresh{box-shadow:0 0 0 1px rgba(255,214,120,.35),0 0 14px rgba(255,214,120,.12)}
.news-main{flex:1;min-width:0}
.news-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.news-h b{font-weight:600;font-size:15px}
.news-item p{margin:6px 0 8px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink-2);font-size:14px;line-height:1.55}
.news-f{display:flex;align-items:center;gap:8px;justify-content:space-between}
.news-f time{font-size:12px;color:var(--ink-3)}
.news-act{display:flex;gap:2px}
.ci-new{color:#2B1A05;background:linear-gradient(180deg,#F8D783,#DFA23C);border-color:#F2C86B;font-weight:600}/* ป้ายแดงบอกจำนวนประกาศที่ยังไม่ได้อ่าน + กล่องข้อความลอยเตือน */
#news-dot{top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;display:grid;place-items:center;font-style:normal;font-size:11px;font-weight:700;line-height:1;color:#fff;background:linear-gradient(180deg,#FF6B6B,#E02F2F);box-shadow:0 0 0 2px var(--navy),0 0 10px rgba(255,80,80,.85)}
html:not(.no-motion) #news-dot:not([hidden]){animation:dot-pulse 1.8s ease-in-out infinite}
@keyframes dot-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}
.news-nudge{position:fixed;right:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:60;display:flex;align-items:center;gap:11px;max-width:min(380px,calc(100vw - 28px));padding:10px 8px 10px 12px;border-radius:16px;border:1px solid #D9A45A;background:linear-gradient(90deg,rgba(60,46,20,.96),rgba(22,26,48,.96));color:#FFE7A6;box-shadow:0 14px 40px rgba(0,0,0,.45),0 0 0 1px rgba(255,236,190,.08) inset}
html:not(.no-motion) .news-nudge{animation:nudge-in .45s cubic-bezier(.2,.9,.3,1.1)}
@keyframes nudge-in{from{transform:translateY(24px);opacity:0}}
.news-nudge .news-orb{animation:none}
.nn-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.nn-txt b{font-weight:600;font-size:14px;color:#FFF1C4}
.nn-txt small{font-size:12px;color:#D8C18A}
.nn-go{flex:none;border:0;padding:7px 14px;border-radius:999px;background:linear-gradient(180deg,#F8D783,#DFA23C);color:#2B1A05;font-weight:600;font-size:13px}
.news-nudge .btn.ghost{color:#D8C18A}.log-list{margin:2px 0 6px;padding:0 4px 0 22px;display:flex;flex-direction:column;gap:5px;color:var(--ink-2);font-size:14px}
.log-list li::marker{color:var(--brass)}
.field textarea{border:1px solid var(--edge);background:#0B1624;border-radius:7px;padding:8px 10px;font-size:14px;color:var(--ink);width:100%;min-height:90px;resize:vertical}html.no-motion *,html.no-motion *::before,html.no-motion *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
