/* Stat calculator: the interface drawn by calc-ui.js over the form of the engine. The layout follows the width of
   the calculator itself (classes w520 / w680 / w820 set by the script): from 680 px the totals stand on the right
   and stick while the page scrolls; narrower, they go on top and a line of the main stats appears at the bottom. */
.lc2, .lc2-dlg {
  --ink: #fff; --txt: #c8c3bf; --mut: #a8a29e; --mut2: #8a8683;
  --line: #3b3734; --line2: #33302d; --soft: #33302d; --seg: #1a1816; --card: #292624; --ctl: #1f1d1b;
  --bd: #4d4844; --bdh: #7a726b; --on: #171513;
  --acc: #eab308; --acc-h: #facc15; --acc2: rgba(234, 179, 8, .13); --acc3: rgba(234, 179, 8, .22); --focus: rgba(234, 179, 8, .3);
  --up: #4cc35b; --up2: rgba(76, 195, 91, .16); --down: #ef4444; --down2: rgba(239, 68, 68, .16);
  --hp: #d0453e; --mp: #3474d1; --cp: #d98a1c;
  --r: 6px; --r2: 8px;
  --sh: 0 1px 2px rgba(0, 0, 0, .25);
}
/* the light theme of the site */
:root[data-theme="light"] .lc2, :root[data-theme="light"] .lc2-dlg {
  --ink: #1c1917; --txt: #332e2a; --mut: #6f6963; --mut2: #8a837b;
  --line: #e5e0d8; --line2: #ece8e1; --soft: #ece8e1; --seg: #e8e3da; --card: #ffffff; --ctl: #fbfaf7;
  --bd: #cfc8be; --bdh: #9c9387; --on: #ffffff;
  --acc: #a8520a; --acc-h: #7c3a06; --acc2: rgba(168, 82, 10, .11); --acc3: rgba(168, 82, 10, .2); --focus: rgba(168, 82, 10, .3);
  --up: #2f7d3b; --up2: rgba(47, 125, 59, .12); --down: #c0392b; --down2: rgba(192, 57, 43, .1);
  --sh: 0 1px 2px rgba(40, 30, 15, .08);
}
/* the few dark grounds the interface draws on its own, in the light theme */
:root[data-theme="light"] .lc2-sw > span, :root[data-theme="light"] .lc2-tog { background: #cfc8be; }
:root[data-theme="light"] .lc2-sw input:checked + span, :root[data-theme="light"] .is-on .lc2-tog { background: var(--acc); }
:root[data-theme="light"] .lc2-seg button:hover { background: rgba(28, 25, 23, .05); }
:root[data-theme="light"] .lc2-tile.is-on { box-shadow: inset 0 0 0 1px var(--acc); }
:root[data-theme="light"] .lc2-strip { background: rgba(251, 250, 247, .96); box-shadow: 0 -4px 18px rgba(40, 30, 15, .12); }
:root[data-theme="light"] .lc2-dg-h { background: rgba(251, 250, 247, .97); }
:root[data-theme="light"] .lc2-dlg::backdrop { background: rgba(40, 30, 15, .35); }
/* the form of the engine is hidden while the interface works; if the script did not start, the class is taken off
   and the form is shown as it is */
html.lc2 .skillisttabwrapper, html.lc2 #loading_txt { display: none !important; }
html:not(.lc2) .lc2 { display: none; }
.lc2 { margin: 0 0 24px; color: var(--txt); font-size: 14px; line-height: 1.45; }
.lc2 *, .lc2-dlg * { box-sizing: border-box; }
.lc2 button, .lc2 select, .lc2 input, .lc2-dlg button, .lc2-dlg input { font: inherit; color: inherit; }
.lc2 :focus-visible, .lc2-dlg :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.lc2 [hidden], .lc2-dlg [hidden] { display: none !important; }
.lc2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lc2-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lc2-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- totals */

/* ---------- totals */
.gw { --gw-txt: #d6d0bf; --gw-lab: #aea795; --gw-val: #f1ecdd; --gw-line: rgba(0, 0, 0, .55); --gw-hl: rgba(255, 255, 255, .055);
  position: relative; display: flex; flex-direction: column; color: var(--gw-txt); font: 12px/1.35 Tahoma, Verdana, "Segoe UI", "DejaVu Sans", sans-serif;
  border: 3px solid transparent; border-radius: 4px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E") padding-box,
    radial-gradient(120% 60% at 50% 0%, rgba(120, 110, 90, .16), transparent 70%) padding-box,
    linear-gradient(180deg, #2c2c2f 0%, #1d1e21 55%, #17181a 100%) padding-box,
    linear-gradient(160deg, #9b927a 0%, #4a463c 22%, #2a2823 45%, #6f6856 70%, #2b2924 100%) border-box;
  box-shadow: 0 0 0 1px #050505, inset 0 0 0 1px #000, inset 0 0 0 2px rgba(255, 245, 220, .07), 0 12px 32px rgba(10, 12, 16, .35); }
.gw-title { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 26px; padding: 0 10px;
  background: linear-gradient(180deg, #4b4840 0%, #34322c 48%, #24231f 52%, #2c2a25 100%); border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 0 rgba(255, 255, 255, .05); color: #ece5cd; font-size: 12.5px; text-shadow: 0 1px 0 #000; letter-spacing: .02em; }
.gw-title::before, .gw-title::after { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: linear-gradient(135deg, #f0dc9c, #8f7840); box-shadow: 0 0 0 1px #000; }
.gw-in { display: flex; flex-direction: column; padding: 7px 8px 9px; }
.gw-who { display: flex; flex-direction: column; padding: 0 2px 6px; }
.gw-who b { color: #8fe0ff; font-size: 13px; font-weight: 400; text-shadow: 0 1px 0 #000; }
.gw-who small { color: #c9b27a; font-size: 12px; }
.gw-bars { display: flex; flex-direction: column; gap: 3px; padding: 0 2px 4px; }
.gw-row { display: flex; align-items: center; gap: 6px; }
.gw-k { flex: none; width: 22px; color: var(--gw-txt); }
.gw-bar { position: relative; flex: 1 1 auto; height: 14px; border: 1px solid #000; background: linear-gradient(180deg, #120f0e, #1d1a18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 1px 0 rgba(255, 255, 255, .06); }
.gw-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.gw-fill::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04)); }
.gw-hp .gw-fill { background: linear-gradient(180deg, #e3645c 0%, #b62520 50%, #7a0e0a 100%); }
.gw-mp .gw-fill { background: linear-gradient(180deg, #6c9cec 0%, #2457b7 50%, #10306f 100%); }
.gw-cp .gw-fill { background: linear-gradient(180deg, #f6cf6a 0%, #c98b12 50%, #7c510a 100%); }
.gw-bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 400; line-height: 1;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 2px #000, 0 1px 1px #000; white-space: nowrap; }
.gw-bar .lc2-d { position: absolute; right: 2px; top: 1px; z-index: 2; line-height: 10px; padding: 0 4px; font-size: 10px; border-radius: 3px; }
.gw .gw-sec { margin: 6px -8px 2px; padding: 3px 10px; background: linear-gradient(180deg, #34322d, #24231f); border-top: 1px solid #4a473e; border-bottom: 1px solid #0b0b0a;
  color: #ebe5d2; font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; text-shadow: 0 1px 0 #000; }
.gw-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.gw-st > div { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; padding: 2px 6px; }
.gw-st > div:nth-child(odd) { border-right: 1px solid var(--gw-line); box-shadow: 1px 0 0 var(--gw-hl); }
.gw-st dt { margin: 0; min-width: 0; color: var(--gw-lab); font-weight: 400; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-st dd { position: relative; margin: 0; font-style: normal; }
.gw-st dd b { color: var(--gw-val); font-weight: 400; font-variant-numeric: tabular-nums; }
.gw-st dd .lc2-d { position: absolute; right: calc(100% + 3px); top: 1px; z-index: 2; line-height: 13px; padding: 0 4px; font-size: 10.5px; border-radius: 3px; }
.gw-base { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gw-base > div:nth-child(odd) { border-right: 0; box-shadow: none; }
.gw-base > div:not(:nth-child(3n)) { border-right: 1px solid var(--gw-line); box-shadow: 1px 0 0 var(--gw-hl); }
.gw-act { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.gw-btn { height: 27px; padding: 0 10px; border: 1px solid #070707; border-radius: 2px; cursor: pointer; color: #ebe3c9; font: 12px Tahoma, Verdana, "Segoe UI", sans-serif; text-shadow: 0 1px 0 #000;
  background: linear-gradient(180deg, #5b574c 0%, #3d3a33 48%, #2b2924 52%, #36342e 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 1px #5d584a; transition: filter .15s; }
.gw-btn:hover { filter: brightness(1.18); }
.gw-btn:active { filter: brightness(.9); }
.gw-btn-p { color: #ffd98a; }
.gw .gw-btn:focus-visible { outline: 2px solid #c9a24e; outline-offset: 2px; }
.gw-note { margin: 7px 2px 0; font-size: 11.5px; color: #958f7f; }

.gw .lc2-d { font-family: Tahoma, Verdana, sans-serif; }
.gw .lc2-d.is-up { color: #9dffb2; background: rgba(10, 70, 30, .92); box-shadow: 0 0 0 1px #000; }
.gw .lc2-d.is-down { color: #ffaaa2; background: rgba(90, 10, 8, .92); box-shadow: 0 0 0 1px #000; }
/* the light theme: the same window as parchment in a bronze frame */
:root[data-theme="light"] .gw { --gw-txt: #4a4440; --gw-lab: #6f6963; --gw-val: #1c1917; --gw-line: rgba(100, 80, 40, .18); --gw-hl: rgba(255, 255, 255, .7);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E") padding-box,
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .6), transparent 70%) padding-box,
    linear-gradient(180deg, #f7f2e6 0%, #efe8d9 55%, #e9e1cf 100%) padding-box,
    linear-gradient(160deg, #dcc48c 0%, #a98a4b 22%, #8b6f37 45%, #cbb074 70%, #8b6f37 100%) border-box;
  box-shadow: 0 0 0 1px #7a6030, inset 0 0 0 1px rgba(255, 255, 255, .75), inset 0 0 0 2px rgba(120, 90, 40, .12), 0 12px 32px rgba(40, 30, 15, .14); }
:root[data-theme="light"] .gw-title { background: linear-gradient(180deg, #eadfc4 0%, #dccba4 48%, #d0bd90 52%, #d9c89e 100%); border-bottom: 1px solid #8b6f37;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 rgba(255, 255, 255, .4); color: #3b2d10; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
:root[data-theme="light"] .gw-title::before, :root[data-theme="light"] .gw-title::after { box-shadow: 0 0 0 1px #7a6030; }
:root[data-theme="light"] .gw-who b { color: #1e5aa0; text-shadow: none; }
:root[data-theme="light"] .gw-who small { color: #8a6a2a; }
:root[data-theme="light"] .gw-bar { border-color: #8b6f37; background: linear-gradient(180deg, #e2d9c5, #ece5d5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 1px 0 rgba(255, 255, 255, .5); }
:root[data-theme="light"] .gw .gw-sec { background: linear-gradient(180deg, #e6dcc3, #d9cdae); border-top: 1px solid rgba(255, 255, 255, .7); border-bottom: 1px solid #b59a5e; color: #3b2d10; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
:root[data-theme="light"] .gw-btn { border-color: #8b6f37; color: #3b2d10; text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  background: linear-gradient(180deg, #f3ecdc 0%, #e3d7bb 48%, #d6c7a3 52%, #dfd1b1 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 0 1px rgba(255, 255, 255, .5); }
:root[data-theme="light"] .gw-btn-p { color: #7c3a06; }
:root[data-theme="light"] .gw .gw-btn:focus-visible { outline-color: #a8520a; }
:root[data-theme="light"] .gw-note { color: #6f6963; }
:root[data-theme="light"] .gw .lc2-d.is-up { color: #1d5a2a; background: rgba(47, 125, 59, .14); box-shadow: 0 0 0 1px rgba(47, 125, 59, .35); }
:root[data-theme="light"] .gw .lc2-d.is-down { color: #8a2419; background: rgba(192, 57, 43, .12); box-shadow: 0 0 0 1px rgba(192, 57, 43, .35); }

.lc2:not(.w680) .gw { width: 100%; max-width: 440px; margin: 0 auto; }
.lc2-d { font-style: normal; font-size: 11px; font-weight: 700; line-height: 16px; padding: 0 5px; border-radius: 6px; opacity: 0; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc2-d.is-up { color: var(--up); background: var(--up2); }
.lc2-d.is-down { color: var(--down); background: var(--down2); }
.lc2-d.is-show { animation: lc2-delta 2.4s ease-out forwards; }
@keyframes lc2-delta { 0% { opacity: 0; transform: translateY(3px); } 8% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- buttons and fields */
.lc2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--bd); border-radius: 9px; background: var(--ctl); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.lc2-btn:hover { border-color: var(--bdh); background: var(--soft); }
.lc2 .lc2-btn-p { background: var(--acc); border-color: var(--acc); color: var(--on); }
.lc2 .lc2-btn-p:hover { background: var(--acc-h); border-color: var(--acc-h); }
.lc2 select { text-align: left; text-align-last: left; height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--bd); border-radius: 9px; color: var(--ink); max-width: 100%; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: var(--ctl) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a8a29e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
.lc2 select:hover { border-color: var(--bdh); }
.lc2 select:disabled { opacity: .5; cursor: default; }

/* ---------- sections */
.lc2-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.lc2-nav a { padding: 5px 11px; border-radius: 999px; background: var(--seg); color: var(--txt); font-size: 13px; font-weight: 600; text-decoration: none !important; transition: background .15s, color .15s; }
.lc2-nav a:hover { background: var(--acc3); color: var(--acc); }
.lc2-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--sh); padding: 14px 16px 16px; scroll-margin-top: 12px; }
.lc2-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.lc2-h h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.lc2-cnt { padding: 1px 8px; border-radius: 999px; background: var(--acc2); color: var(--acc); font-size: 12px; font-weight: 600; }
.lc2-h [data-clear] { margin-left: auto; }
.lc2 .lc2-btn-s { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; color: var(--mut); }
.lc2 .lc2-btn-s:hover { color: var(--down); border-color: rgba(239, 68, 68, .5); background: var(--down2); }
.lc2-empty { margin: 0; color: var(--mut); font-size: 13px; }

.lc2-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.lc2-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lc2-sw > span, .lc2-tog { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: #57514b; transition: background .18s; }
.lc2-sw > span::after, .lc2-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.lc2-sw input:checked + span, .is-on .lc2-tog { background: var(--acc); }
.lc2-sw input:checked + span::after, .is-on .lc2-tog::after { transform: translateX(14px); }
.lc2-sw input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.lc2-sw em { font-style: normal; font-size: 12.5px; color: var(--mut); }

/* ---------- character */
#lc2-char .lc2-body { display: flex; flex-direction: column; gap: 14px; }
.lc2-row2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lc2-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lc2-lb { font-size: 12.5px; font-weight: 700; color: var(--mut); }
.lc2-lb small { font-weight: 400; color: var(--mut2); margin-left: 4px; }
.lc2-pk { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px 6px 8px; border: 1px solid var(--bd); border-radius: var(--r); background: var(--ctl); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.lc2-pk:hover:not(:disabled) { border-color: var(--bdh); box-shadow: 0 2px 8px rgba(20, 40, 60, .07); }
.lc2-pk:disabled { cursor: default; background: var(--soft); }
.lc2-pk-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.lc2-pk-t b { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-pk-t small { font-size: 11.5px; color: var(--mut2); }
.lc2-chev { flex: none; width: 8px; height: 8px; margin-right: 2px; border-right: 1.6px solid var(--mut); border-bottom: 1.6px solid var(--mut); transform: rotate(45deg) translateY(-2px); }
.lc2-ic { flex: none; width: 32px; height: 32px; border-radius: 7px; object-fit: cover; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(20, 40, 60, .12); }
.lc2-ic-cls { width: 36px; height: 36px; image-rendering: auto; }
.lc2-ic-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--seg); color: var(--mut); font-size: 11px; font-weight: 700; text-transform: uppercase; box-shadow: none; }
.lc2-lvl { display: flex; align-items: center; gap: 12px; }
.lc2-step { display: inline-flex; flex: none; height: 38px; border: 1px solid var(--bd); border-radius: var(--r); overflow: hidden; background: var(--ctl); }
.lc2-step:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--focus); }
.lc2-step button { width: 36px; border: 0; background: var(--soft); font-size: 18px; color: var(--txt); cursor: pointer; }
.lc2-step button:hover { background: var(--acc2); color: var(--acc); }
.lc2-step input { width: 52px; border: 0; text-align: center; font-size: 17px; font-weight: 700; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.lc2-step input::-webkit-inner-spin-button, .lc2-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lc2-step input:focus { outline: 0; }
.lc2-lvl input[type=range] { flex: 1 1 auto; min-width: 80px; accent-color: var(--acc); }
.lc2-marks { display: flex; flex-wrap: wrap; gap: 3px; }
.lc2-marks button, .lc2-dlg-chips button { height: 26px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 7px; background: var(--seg); color: var(--txt); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.lc2-marks button:hover, .lc2-dlg-chips button:hover { background: var(--acc3); color: var(--acc); }
.lc2-marks button[aria-pressed="true"], .lc2-dlg-chips button[aria-pressed="true"] { background: var(--acc); color: var(--on); }
.lc2-seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 11px; background: var(--seg); }
.lc2-seg button { height: 30px; padding: 0 16px; border: 0; border-radius: 8px; background: none; font-weight: 600; color: var(--txt); cursor: pointer; }
.lc2-seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.lc2-seg button[aria-checked="true"] { background: var(--soft); color: var(--acc); box-shadow: 0 0 0 1px var(--bd); }
.lc2-tats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lc2-pk-tat { min-height: 44px; padding-left: 12px; }
.lc2-pk-tat.is-empty b { color: var(--mut2); font-weight: 400; }

/* ---------- equipment */
.lc2-sets { display: flex; gap: 6px; margin: 0 0 12px; }
.lc2-sets .lc2-btn { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lc2-slots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lc2-slot { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ctl); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.lc2-slot:hover:not(.is-dis) { border-color: var(--bdh); box-shadow: 0 2px 10px rgba(20, 40, 60, .07); }
.lc2-slot.is-empty { border-style: dashed; background: var(--seg); }
.lc2-slot.is-dis { background: var(--soft); }
.lc2-slot-w { flex-wrap: wrap; }
.lc2-slot-b { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.lc2-slot-b:disabled { cursor: default; }
.lc2 .lc2-slot-b:focus-visible { outline: 0; }
.lc2-slot:has(.lc2-slot-b:focus-visible) { outline: 2px solid var(--acc); outline-offset: 1px; }
.lc2-slot-ic { position: relative; flex: none; width: 40px; height: 40px; }
.lc2-slot-ic img, .lc2-slot-ic .lc2-ic-ph { display: block; width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(20, 40, 60, .14); }
.is-empty .lc2-slot-ic img { filter: grayscale(1); opacity: .32; }
.lc2-slot-ic .lc2-gr { position: absolute; right: -5px; bottom: -5px; }
.lc2-slot-t { display: flex; flex-direction: column; min-width: 0; }
.lc2-slot-t small { font-size: 11.5px; color: var(--mut2); line-height: 1.2; }
.lc2-slot-t b { font-weight: 600; color: var(--ink); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.lc2-slot-t em { font-style: normal; font-size: 12px; color: var(--mut); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lc2-slot-t em:empty { display: none; }
.is-empty .lc2-slot-t b, .is-dis .lc2-slot-t b { color: var(--mut); font-weight: 400; }
.lc2-ench { flex: none; position: relative; }
.lc2-ench select { width: 66px; height: 32px; padding: 0 22px 0 9px; font-weight: 700; background-position: right 8px center; }
.lc2-ench.is-up select { color: var(--acc); border-color: var(--acc); background-color: var(--acc2); }
.lc2-sa { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; padding: 6px 0 0 50px; }
.lc2-sa span { font-size: 11.5px; font-weight: 700; color: var(--mut); }
.lc2-sa select { flex: 1 1 auto; height: 32px; min-width: 0; }

.lc2-gr { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 5px; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--g); box-shadow: 0 0 0 2px #fff; flex: none; }
.g-N { --g: #8d98a4; } .g-D { --g: #3f7fbf; } .g-C { --g: #2b9466; } .g-B { --g: #b07d12; } .g-A { --g: #c4561a; } .g-S { --g: #9338b0; } .g-H { --g: #b3261e; }

.lc2-auto { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 14px; border-radius: var(--r); background: var(--acc2); cursor: pointer; }
.lc2-auto b { display: block; color: var(--ink); }
.lc2-auto small { display: block; font-size: 12px; color: var(--mut); }
.lc2-preset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 0 0 14px; border-radius: var(--r); background: var(--soft); }
.lc2-preset label { margin: 0; font-weight: 700; font-size: 13px; color: var(--ink); }
.lc2-preset select { flex: 1 1 220px; }
.lc2-tgs { display: flex; flex-direction: column; gap: 14px; }
.lc2-tg h3 { margin: 0 0 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }
.lc2-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 6px; }
.lc2-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--ctl); overflow: hidden; transition: border-color .15s, background .15s, box-shadow .15s; }
.lc2-tile:hover { border-color: var(--bdh); }
.lc2-tile.is-on { border-color: var(--acc); background: var(--acc2); box-shadow: inset 0 0 0 1px #8fb0d6; }
.lc2-tile-r { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px; cursor: pointer; }
.lc2-tile.is-dis .lc2-tile-r { cursor: default; opacity: .5; }
.lc2-tile-ic { flex: none; width: 28px; height: 28px; }
.lc2-tile-ic img, .lc2-tile-ic .lc2-ic-ph { display: flex; width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; }
.lc2-tile:not(.is-on) .lc2-tile-ic img { filter: saturate(.55); opacity: .8; }
.lc2-tile-n { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; user-select: none; }
.lc2 .lc2-tile-x { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 20px 0 0; border: 0; border-radius: 0; background-color: transparent; background-position: right 4px center; font-size: 13px; font-weight: 600; text-overflow: ellipsis; }
.lc2 .lc2-tile-x:hover:not(:disabled) { color: var(--acc); }
.lc2 .lc2-tog { padding: 0; border: 0; cursor: pointer; width: 30px; height: 18px; }
.lc2 .lc2-tog:disabled { cursor: default; }
.lc2-tile .lc2-tog::after { width: 14px; height: 14px; }
.lc2-tile.is-on .lc2-tog::after { transform: translateX(12px); }
.lc2 .lc2-tile-v { height: 28px; margin: -2px 8px 7px 44px; width: auto; font-size: 12.5px; border-radius: 7px; padding-left: 8px; background-position: right 8px center; background-color: var(--ctl); }

/* ---------- the line of stats (phone) */
.lc2-strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 8px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); background: rgba(32, 30, 28, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--bd); box-shadow: 0 -4px 18px rgba(20, 40, 60, .12); cursor: pointer; }
.lc2-strip span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.lc2-strip small { font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-strip b { font-size: 14px; color: var(--acc); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-toast { position: fixed; left: 50%; bottom: 84px; z-index: 1001; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 9px 16px; border-radius: 10px; background: #3a3633; color: #fff; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.lc2-toast.is-show { animation: lc2-toast 2.6s ease forwards; }
@keyframes lc2-toast { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

.lc2-dlg { color: var(--txt); width: min(560px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 48px)); padding: 0; border: 0; border-radius: 16px; background: var(--ctl); color: var(--txt); box-shadow: 0 24px 64px rgba(15, 30, 50, .3); overflow: hidden; }
.lc2-dlg::backdrop { background: rgba(18, 28, 40, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.lc2-dlg[open] { display: flex; animation: lc2-in .16s ease-out; }
@keyframes lc2-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.lc2-dlg-in { display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0; }
.lc2-dlg-in > * { flex: none; }
.lc2-dlg header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.lc2-dlg h3 { margin: 0; flex: 1 1 auto; font-size: 17px; font-weight: 700; color: var(--ink); }
.lc2-x { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--soft); font-size: 22px; line-height: 1; color: var(--mut); cursor: pointer; }
.lc2-x:hover { background: var(--seg); color: var(--ink); }
.lc2-dlg .lc2-dlg-q { display: block; width: auto; margin: 0 14px 8px; height: 40px; line-height: normal; box-shadow: none; outline: 0; padding: 0 12px 0 36px; border: 1px solid var(--bd); border-radius: 10px; font-size: 15px; color: var(--ink);
  background: var(--ctl) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a8a29e' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px center; }
.lc2-dlg .lc2-dlg-q:focus { outline: 0; border-color: var(--acc); box-shadow: 0 0 0 3px var(--focus); }
.lc2-dlg-chips { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 14px 8px; }
.lc2-dlg-l { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--line2); }
.lc2-dlg-l ul { list-style: none; margin: 0; padding: 0; }
.lc2-dlg-l li { list-style: none !important; margin: 0; }
.lc2-dg-h { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 1; padding: 10px 8px 5px; background: rgba(41, 38, 36, .97); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.lc2-dg-h .lc2-gr { box-shadow: none; }
.lc2-pi { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.lc2-pi:hover, .lc2-pi.is-act { background: var(--soft); }
.lc2-pi.is-cur { background: var(--acc2); }
.lc2-pi.is-cur b { color: var(--acc); }
.lc2-pi-t { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.lc2-pi-t b { font-weight: 600; color: var(--ink); line-height: 1.3; }
.lc2-pi-t small { font-size: 12px; color: var(--mut); }
.lc2-pi .lc2-gr { box-shadow: none; }
.lc2-dlg-e { margin: 0; padding: 18px; color: var(--mut); text-align: center; }

.lc2.w520 .lc2-row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.lc2.w520 .lc2-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lc2.w520 .lc2-slot-w { grid-column: 1 / -1; }

.lc2.w680 .lc2-grid { grid-template-columns: minmax(0, 1fr) 252px; align-items: start; }
.lc2.w680 .lc2-side { order: 2; position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow-y: auto; scrollbar-width: thin; }
.lc2.w680 .lc2-main { order: 1; }
.lc2.w680 .lc2-row2 { grid-template-columns: minmax(0, 1fr); }
.lc2.w680 .lc2-slots { grid-template-columns: minmax(0, 1fr); }

.lc2.w820 .lc2-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lc2.w820 .lc2-row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }

.lc2:not(.w520) .lc2-sets .lc2-btn { flex: 1 1 0; padding: 0 8px; }

@media (max-width: 600px) {
  .lc2-card { padding: 12px; border-radius: 12px; }
  .lc2-tats { grid-template-columns: minmax(0, 1fr); }
  .lc2-dlg { width: 100vw; max-width: 100vw; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .lc2-dlg[open] { animation: lc2-up .2s ease-out; }
  @keyframes lc2-up { from { transform: translateY(40px); opacity: .6; } }
  .lc2-dlg-l { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .lc2-sa { padding-left: 0; }
  body:has(.lc2-strip:not([hidden])) { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc2 *, .lc2-dlg, .lc2-dlg * { animation-duration: .01ms !important; transition: none !important; }
}
