/* the combat calculator (src/pages/tools.tsx combatPage, public/static/combat.js) */
.cb{margin:1rem 0 1.4rem}
.cb-msg{color:var(--mu)}
.cb-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cb-box{padding:12px 14px 14px;border-radius:var(--r);background:var(--card)}
.cb-box h3{margin:0 0 .6rem;font-size:1rem;font-weight:600}
.cb-act,.cb-res{margin-top:12px}
.cb-seg{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 .7rem}
.cb-seg button{padding:5px 11px;border:0;border-radius:var(--r);background:var(--sheet);color:inherit;font:inherit;font-size:.88rem;cursor:pointer}
.cb-seg button:hover{background:var(--card2)}
.cb-seg button[aria-pressed="true"]{background:var(--ac-bg);color:#fff}
.cb-fs{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px 10px;margin:0 0 .7rem}
.cb-fl{display:flex;flex-direction:column;gap:3px;font-size:.8rem;color:var(--mu)}
.cb-fl.cb-wide{grid-column:1/-1;margin-bottom:.6rem}
.cb-fl input,.cb-fl select,.cb-pick input{width:100%;min-width:0;padding:6px 9px;border:1px solid var(--line);border-radius:var(--r);background:var(--sheet);color:var(--tx);font:inherit;font-size:.92rem}
.cb-fl input:focus,.cb-fl select:focus,.cb-pick input:focus{outline:none;border-color:var(--ac)}
.cb-l{margin:.2rem 0 .35rem;font-size:.8rem;color:var(--mu)}
.cb-note{margin:.3rem 0;font-size:.85rem;color:var(--mu)}
.cb-pick{position:relative}
.cb-list{position:absolute;z-index:5;left:0;right:0;top:100%;max-height:320px;overflow:auto;margin:4px 0 0;padding:4px;list-style:none;border:1px solid var(--line);border-radius:var(--r);background:var(--sheet);box-shadow:0 8px 24px rgba(0,0,0,.35)}
.cb-list button{display:block;width:100%;padding:6px 8px;border:0;border-radius:4px;background:none;color:inherit;font:inherit;font-size:.9rem;text-align:left;cursor:pointer}
.cb-list button:hover{background:var(--card2)}
.cb-list small{color:var(--mu)}
.cb-npc{margin:.5rem 0 0;font-size:.85rem;color:var(--mu);line-height:1.5}
.cb-big{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin:0 0 .6rem}
.cb-big span{width:100%;font-size:.8rem;color:var(--mu)}
.cb-big b{font-size:2rem;font-weight:700;color:var(--ac);line-height:1.1}
.cb-big small{font-size:.95rem;color:var(--tx)}
.cb-dl{display:grid;grid-template-columns:max-content 1fr;gap:4px 16px;margin:0 0 .7rem;font-size:.92rem}
.cb-dl dt{color:var(--mu)}
.cb-dl dd{margin:0}
.cb-dl dd.cb-w{grid-column:1/-1;color:var(--mu);font-size:.85rem}
.cb-fx{margin:0 0 .8rem;padding:8px 10px;border-radius:var(--r);background:var(--sheet);font:13px/1.5 ui-monospace,Consolas,monospace;overflow-wrap:anywhere}
.cb-fx span{font-family:inherit;color:var(--mu)}
.cb-btn{display:flex;gap:8px;flex-wrap:wrap}
.cb-btn button,.cb-x{padding:6px 12px;border:1px solid var(--line);border-radius:var(--r);background:transparent;color:inherit;font:inherit;font-size:.88rem;cursor:pointer}
.cb-btn button:hover,.cb-x:hover{border-color:var(--ac)}
.cb-res h4{display:flex;align-items:center;gap:10px;margin:1rem 0 .5rem;font-size:.95rem}
.cb-x{padding:2px 9px;font-size:.8rem}
.cb-f{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px}
.cb-f dt{font-weight:600}
.cb-f dd{margin:0}
@media (max-width:700px){.cb-g{grid-template-columns:1fr}.cb-f{grid-template-columns:1fr}.cb-f dd{margin-bottom:.4rem}}

/* the page: the attacker with the inventory of the stat calculator on the left, the target, the action and the result on the right */
.cbx{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);gap:14px;align-items:start;margin:1rem 0 1.4rem}
.cbx-a{min-width:0;padding:12px 14px 14px;border-radius:var(--r);background:var(--card)}
.cbx .cb{margin:0;position:sticky;top:10px;max-height:calc(100vh - 20px);overflow-y:auto;scrollbar-width:thin}
.cbx .cb .cb-box{margin-top:0}
.cbx .cb .cb-box+.cb-box{margin-top:12px}
.cbx-h{display:flex;align-items:center;gap:9px;margin:0 0 .7rem}
.cbx-h h2,.cbx-h h3{margin:0;font-size:1rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.cbx-tag{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:6px;background:var(--ac-bg);color:#fff;font-weight:700;font-size:.85rem}
.cbx-alt{padding-top:4px}
.cb-from .cb-stats{margin:0 0 .6rem;font-size:.9rem;line-height:1.5}

/* the inventory: the slots of the stat calculator laid out as the paper doll of the game */
.cbx-pc .lc2-slots{grid-template-columns:repeat(3,66px)!important;grid-template-areas:". helmet ." "gloves upper boots" ". lower ." "weapon . shield" "ear1 neck ear2" "ring1 . ring2";
  justify-content:center;gap:12px 18px;padding:18px 12px;border-radius:var(--r);background:radial-gradient(70% 60% at 50% 35%,#2b3326 0%,#151a13 70%,#0f120d 100%);box-shadow:inset 0 0 0 1px #2e3428}
.cbx-pc .lc2-slot{display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;border:0;background:none;box-shadow:none;position:relative;min-width:0}
.cbx-pc .lc2-slot[data-slot="HELMET"]{grid-area:helmet}.cbx-pc .lc2-slot[data-slot="GLOVE"]{grid-area:gloves}.cbx-pc .lc2-slot[data-slot="UPPER"]{grid-area:upper}
.cbx-pc .lc2-slot[data-slot="BOOT"]{grid-area:boots}.cbx-pc .lc2-slot[data-slot="LOWER"]{grid-area:lower}.cbx-pc .lc2-slot[data-slot="WEAPON"]{grid-area:weapon}
.cbx-pc .lc2-slot[data-slot="SHIELD"]{grid-area:shield}.cbx-pc .lc2-slot[data-slot="EARRING1"]{grid-area:ear1}.cbx-pc .lc2-slot[data-slot="NECKLACE"]{grid-area:neck}
.cbx-pc .lc2-slot[data-slot="EARRING2"]{grid-area:ear2}.cbx-pc .lc2-slot[data-slot="RING1"]{grid-area:ring1}.cbx-pc .lc2-slot[data-slot="RING2"]{grid-area:ring2}
.cbx-pc .lc2-slot-b{display:grid;place-items:center;width:58px;height:58px;padding:0;border:1px solid #3d3a2c;border-radius:6px;background:linear-gradient(180deg,#24251e,#141510);box-shadow:inset 0 0 0 1px #000,0 1px 0 rgba(255,255,255,.05)}
.cbx-pc .lc2-slot-b:hover{border-color:var(--ac)}
.cbx-pc .lc2-slot-t{display:none}
.cbx-pc .lc2-slot-ic,.cbx-pc .lc2-slot-ic img,.cbx-pc .lc2-slot-ic .lc2-ic-ph{width:46px;height:46px}
.cbx-pc .lc2-ench{position:absolute;right:-12px;top:-8px}
.cbx-pc .lc2-ench select{width:44px;height:22px;padding:0 4px;font-size:11px;background-image:none;text-align:center;border-radius:5px}
.cbx-pc .lc2-ench:not(.is-up){opacity:0;transition:opacity .15s}
.cbx-pc .lc2-slot:hover .lc2-ench,.cbx-pc .lc2-ench:focus-within{opacity:1}
.cbx-pc .lc2-sa{flex:none;padding:0;width:120px;flex-direction:column;align-items:stretch;gap:2px}
.cbx-pc .lc2-sa span{display:none}
.cbx-pc .lc2-sa select{height:24px;font-size:11px}
.cbx-pc .lc2-slot-w{flex-wrap:nowrap}

/* the sets of the inventory by grade */
.cb-sets{margin-top:14px}
.cb-set-row{display:flex;align-items:flex-start;gap:8px;margin:5px 0}
.cb-set-row>.lc2-gr{flex:none;margin-top:9px}
.cb-set-row>div{display:flex;flex-wrap:wrap;gap:4px}
.cb-sets button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #3d3a2c;border-radius:5px;background:#151510;color:inherit;cursor:pointer;font-size:10px}
.cb-sets button:hover{border-color:var(--ac)}
.cb-sets img{width:34px;height:34px;border-radius:3px}

@media (max-width:900px){.cbx{grid-template-columns:1fr}.cbx .cb{position:static;max-height:none;overflow:visible}}
