/* tac-jobs.css — สายอาชีพ + หน้าจัดทีม (FAA.jobs) · โหลดหลัง game.css
   ภาษาภาพเดียวกับ tac-ui: กระดาษ parchment ขอบน้ำตาลสองชั้น แถบหัวน้ำเงินเข้ม เส้นทอง · เงาตันไม่ฟุ้ง */
.tj {
  --tj-ink: #2b1a0c; --tj-ink2: #5a3d22; --tj-brown: #3a2312; --tj-tan: #a9824c;
  --tj-gold: #e2b54a; --tj-gold2: #f7dc8a; --tj-blue: #0d3a78; --tj-blue2: #1a56a6; --tj-night: #0a2147;
  --tj-paper: #fbf3dd; --tj-paper2: #ecdcb3; --tj-red: #c42c22; --tj-green: #1d7a43;
  --tj-fh: var(--fh, Kanit, "Noto Sans Thai", sans-serif);
  color: var(--tj-ink); font-family: var(--f, "Noto Sans Thai", sans-serif);
  display: flex; flex-direction: column; gap: 12px; min-width: 0; box-sizing: border-box;
}
.tj *, .tj *::before, .tj *::after { box-sizing: border-box; }

/* ---------- หน้าต่าง ---------- */
.tj-win {
  position: relative; min-width: 0;
  border: 2px solid var(--tj-brown); border-radius: 6px;
  background-color: var(--tj-paper);
  background-image:
    radial-gradient(circle at 3px 3px, var(--tj-gold) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 3px) 3px, var(--tj-gold) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 3px calc(100% - 3px), var(--tj-gold) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 3px) calc(100% - 3px), var(--tj-gold) 0 1.6px, transparent 2.2px),
    repeating-radial-gradient(circle at 17% 23%, rgba(120,80,30,.045) 0 1px, transparent 1px 5px),
    repeating-radial-gradient(circle at 81% 67%, rgba(120,80,30,.04) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, var(--tj-paper) 0%, #f3e6c4 55%, var(--tj-paper2) 100%);
  box-shadow: inset 0 0 0 1px #fffaea, inset 0 0 0 2px var(--tj-tan), 0 3px 0 rgba(32,16,4,.45);
}
.tj-wtitle {
  margin: 0; display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 9px; min-height: 28px;
  font: 600 .86rem/1.2 var(--tj-fh); letter-spacing: .02em; color: #fff;
  background: linear-gradient(180deg, #2a66b8 0%, var(--tj-blue) 48%, var(--tj-night) 100%);
  border-bottom: 1px solid var(--tj-gold); border-radius: 3px 3px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 0 #6b4a20; text-shadow: 0 1px 0 #041633;
}
.tj-wtitle > span { white-space: nowrap; }
.tj-wtitle::after { content: ""; flex: 1; height: 1px; margin-left: 4px; background: linear-gradient(90deg, var(--tj-gold), transparent); opacity: .75; order: 5; }
.tj-wtitle .draft { order: 6; font-size: .68rem; }
.tj-gem { width: 8px; height: 8px; transform: rotate(45deg); background: linear-gradient(135deg, var(--tj-gold2), #b9821f); box-shadow: 0 0 0 1px #3a2312; flex: 0 0 auto; }
.tj-wbody { padding: 10px; }

.tj-crest { display: block; overflow: visible; }
.tj-lv { display: inline-flex; align-items: baseline; gap: 2px; margin-left: 8px; padding: 1px 7px; border-radius: 3px; vertical-align: 2px;
  font: 700 .95rem/1.2 var(--tj-fh); color: #fff;
  background: linear-gradient(180deg, #164f9e, var(--tj-night)); border: 1px solid var(--tj-brown); box-shadow: inset 0 0 0 1px rgba(226,181,74,.7); }
.tj-lv small { font: 600 .62rem/1 var(--tj-fh); color: var(--tj-gold2); }

/* ---------- JP ---------- */
.tj-jp { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tj-jprow { display: flex; align-items: center; gap: 7px; }
.tj-jprow > b { font: 700 .78rem/1 var(--tj-fh); color: #6b4300; letter-spacing: .04em; }
.tj-jpbar { position: relative; flex: 1; height: 10px; border-radius: 2px; overflow: hidden; background: #3a2312; border: 1px solid #241406; box-shadow: inset 0 1px 0 rgba(0,0,0,.4); }
.tj-jpbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #fff0a8 0%, #ffcf33 45%, #d79a10 100%); box-shadow: inset 0 -1px 0 rgba(120,70,0,.5); }
.tj-jpbar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9%, rgba(36,20,6,.35) 9% calc(9% + 1px)); }
.tj-jpnum { font: 700 .95rem/1 var(--tj-fh); color: var(--tj-ink); font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }
.tj-jp small { font-size: .74rem; line-height: 1.3; color: var(--tj-ink2); }

/* ---------- หัวแผง: อาชีพปัจจุบัน ---------- */
.tj-head, .tj-hrow { display: flex; align-items: center; gap: 12px; }
.tj-hcrest { flex: 0 0 auto; position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,214,102,.55), rgba(255,214,102,0) 100%); }
.tj-hcrest.sm { width: 50px; height: 50px; }
.tj-hmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tj-kick { font: 600 .7rem/1.2 var(--tj-fh); color: var(--tj-ink2); letter-spacing: .06em; }
.tj-hname { font: 700 1.2rem/1.25 var(--tj-fh); color: #0b2f66; }
.tj-hname.sm { font-size: 1rem; }

/* ---------- กระดานสายอาชีพ ---------- */
.tj-board {
  position: relative; margin-top: 10px; padding: 10px 8px 10px 34px; border-radius: 5px;
  border: 2px solid #1a0f05; box-shadow: inset 0 0 0 1px rgba(226,181,74,.55), 0 2px 0 rgba(32,16,4,.35);
  background:
    repeating-linear-gradient(30deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-30deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px),
    radial-gradient(120% 90% at 50% 0%, #1d4c8f 0%, #0d2d5e 55%, #071a3a 100%);
}
.tj-tree { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
/* ลำต้นของสายอาชีพ: เส้นตรงแนวตั้งผ่านกลางตรา (เส้นตั้งฉาก ไม่โค้ง) */
.tj-li { position: relative; }
.tj-li + .tj-li::before {
  content: ""; position: absolute; left: 34px; top: -16px; width: 4px; height: 18px; margin-left: -2px; z-index: 0;
  background: linear-gradient(180deg, #f7dc8a, #b9821f); box-shadow: 0 0 0 1px #1a0f05;
}
.tj-li.is-locked + .tj-li::before, .tj-li.is-current + .tj-li.is-locked::before { background: #5b6b80; box-shadow: 0 0 0 1px #1a0f05; }

.tj-node {
  position: relative; z-index: 1; width: 100%; min-height: 64px; margin: 0; padding: 6px 10px 6px 6px;
  display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  border: 2px solid #2a1a0a; border-radius: 6px; color: var(--tj-ink);
  background: linear-gradient(180deg, #fbf3dd 0%, #efe0b8 100%);
  box-shadow: inset 0 0 0 1px #fffaea, inset 0 0 0 2px var(--tj-tan), 0 3px 0 #04102a;
  transition: transform .12s ease;
}
.tj-node:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tj-node[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #fffaea, inset 0 0 0 2px var(--tj-gold), 0 0 0 2px var(--tj-gold2), 0 3px 0 #04102a; }
.tj-node.is-current { background: linear-gradient(180deg, #fff7d6 0%, #f6dd94 100%); border-color: #5a3a0c; }
.tj-node.is-current::after { content: ""; position: absolute; inset: -5px; border-radius: 9px; border: 2px solid rgba(255,214,102,.85); animation: tjGlow 1.8s ease-in-out infinite; pointer-events: none; }
.tj-node.is-locked { background: linear-gradient(180deg, #cfc6b4 0%, #b7ad99 100%); color: #33291d; border-color: #2a2218; box-shadow: inset 0 0 0 1px #e6dfcf, inset 0 0 0 2px #8b8270, 0 3px 0 #04102a; }
.tj-node.is-locked[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #e6dfcf, inset 0 0 0 2px #8b8270, 0 0 0 2px #e7ecf3, 0 3px 0 #04102a; }
.tj-node.is-locked .tj-crest { filter: grayscale(1) brightness(.78) contrast(.9); }
.tj-ncrest { position: relative; display: grid; place-items: center; width: 52px; height: 52px; }
.tj-lockb { position: absolute; right: -3px; bottom: -2px; width: 22px; height: 22px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }
.tj-star { position: absolute; right: -4px; top: -4px; width: 18px; height: 18px; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%);
  background: linear-gradient(180deg, #fff3b0, #e2a91c); filter: drop-shadow(0 0 0 #24140a); }
.tj-ntext { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tj-nname { font: 700 1rem/1.25 var(--tj-fh); color: #0b2f66; }
.tj-node.is-locked .tj-nname { color: #2e2a26; }
.tj-nlv { font: 600 .74rem/1.3 var(--tj-fh); color: var(--tj-ink2); }
.tj-node.is-locked .tj-nlv { color: #3d362d; }
.tj-nreq { font-size: .76rem; line-height: 1.3; color: #4a2f14; }
.tj-node.is-current .tj-nreq { color: #7a2a00; font-weight: 600; }
.tj-node.is-locked .tj-nreq { color: #3a3128; }
.tj-npips { display: inline-grid; grid-template-columns: repeat(2, 12px); gap: 5px; }
.tj-pip { display: block; width: 11px; height: 11px; transform: rotate(45deg); border: 1.5px solid #3a2312; background: #f4ead2; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.tj-pip.on { background: linear-gradient(135deg, #fff3b0, #e2a91c 60%, #a86d0e); border-color: #3a2312; box-shadow: 0 0 4px rgba(255,200,60,.7); }
.tj-node.is-locked .tj-pip { background: #a49a86; border-color: #3d362d; box-shadow: none; }
.tj-node.is-locked .tj-pip.on { background: linear-gradient(135deg, #fff3b0, #e2a91c 60%, #a86d0e); }
.tj-glove { width: 30px; height: 22px; display: block; overflow: visible; filter: drop-shadow(1px 1.5px 0 rgba(30,15,4,.55)); }
.tj-npoint { position: absolute; left: -33px; top: 50%; margin-top: -11px; animation: tjPoint .9s ease-in-out infinite; }

/* ---------- รายละเอียดอาชีพ ---------- */
.tj-detwin { padding: 12px; }
.tj-dhead { display: flex; gap: 12px; align-items: center; }
.tj-dcrest { position: relative; flex: 0 0 auto; }
.tj-dwrap.is-locked .tj-dcrest .tj-crest { filter: grayscale(1) brightness(.8); }
.tj-dname { margin: 0; font: 700 1.15rem/1.25 var(--tj-fh); color: #0b2f66; }
.tj-dmeta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tj-chip { display: inline-block; padding: 2px 8px; border-radius: 3px; font: 600 .74rem/1.35 var(--tj-fh); color: #2b1a0c; background: #e8d6a8; border: 1px solid #8a6a3a; }
.tj-chip.cur { background: linear-gradient(180deg, #2a66b8, var(--tj-blue)); color: #fff; border-color: #071a3a; }
.tj-chip.ok { background: #d5efdc; color: #0f5a2f; border-color: #2f7a4a; }
.tj-chip.lock { background: #d9d3c6; color: #2e2a26; border-color: #6b6254; }
.tj-chip.gold { background: linear-gradient(180deg, #fff0a8, #e2b54a); color: #4a2a00; border-color: #7a5410; }
.tj-desc { margin: 10px 0 8px; font-size: .9rem; line-height: 1.6; color: var(--tj-ink); }
.tj-abhead { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 2px 4px; border-bottom: 1px solid #b99b66; }
.tj-abhead b { font: 700 .86rem/1.2 var(--tj-fh); color: #0b2f66; }
.tj-abhead span { font: 600 .78rem/1.2 var(--tj-fh); color: var(--tj-ink2); }
.tj-ablist { list-style: none; margin: 0; padding: 0; }
.tj-ablist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; min-height: 48px; padding: 6px 2px; border-bottom: 1px dashed #c9ad7a; }
.tj-ablist li:last-child { border-bottom: 0; }
.tj-pip.lg { width: 13px; height: 13px; margin-left: 4px; }
.tj-abtext { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tj-abtext b { font: 600 .92rem/1.3 var(--tj-fh); color: #6a5a48; }
.tj-ablist li.on .tj-abtext b { color: var(--tj-ink); }
.tj-abtext small { font-size: .76rem; color: var(--tj-ink2); }
.tj-abst { font: 600 .72rem/1 var(--tj-fh); padding: 4px 7px; border-radius: 3px; color: #4a3f33; background: #e3d8c0; border: 1px solid #a8977a; white-space: nowrap; }
.tj-ablist li.on .tj-abst { color: #fff; background: linear-gradient(180deg, #2a8a52, #156b3a); border-color: #0c4424; }

/* ---------- หน้าจัดทีม ---------- */
.tj-form { gap: 12px; }
.tj-fhead {
  position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 6px; color: #fff;
  border: 2px solid #1a0f05;
  background:
    repeating-linear-gradient(30deg, rgba(255,255,255,.04) 0 1px, transparent 1px 20px),
    linear-gradient(180deg, #2a66b8 0%, var(--tj-blue) 45%, var(--tj-night) 100%);
  box-shadow: inset 0 0 0 1px rgba(226,181,74,.7), inset 0 1px 0 rgba(255,255,255,.3), 0 3px 0 rgba(32,16,4,.45);
}
.tj-mnum { flex: 0 0 auto; width: 58px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  font: 700 1.55rem/1 var(--tj-fh); color: #3a2312; }
.tj-mnum::before { content: ""; position: absolute; inset: 6px; transform: rotate(45deg); border-radius: 4px; z-index: 0;
  background: linear-gradient(135deg, #fff3c4, #e2b54a 55%, #9c6914); box-shadow: 0 0 0 2px #1a0f05, inset 0 0 0 2px rgba(255,255,255,.5); }
.tj-mnum > * , .tj-mnum { z-index: 1; }
.tj-mnum small { position: relative; font: 600 .56rem/1 var(--tj-fh); color: #4a2c08; margin-bottom: 1px; }
.tj-mnum { isolation: isolate; }
.tj-mnum::before { z-index: -1; }
.tj-fhmain { min-width: 0; }
.tj-fhmain small { font: 600 .72rem/1.2 var(--tj-fh); color: var(--tj-gold2); letter-spacing: .06em; }
.tj-fhmain h2 { margin: 2px 0 0; font: 700 1.12rem/1.3 var(--tj-fh); color: #fff; text-shadow: 0 1px 0 #041633; }
.tj-fhmain p { margin: 2px 0 0; font-size: .82rem; line-height: 1.4; color: #dbe7fb; }

.tj-fgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tj-fcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.tj-lineup {
  position: relative; height: 196px; border-radius: 5px; overflow: hidden;
  border: 2px solid #4a2f14; box-shadow: inset 0 0 0 1px rgba(255,240,200,.6);
  background: linear-gradient(180deg, #d9c49a 0%, #c9ae7c 58%, #b39463 100%);
  display: flex; justify-content: center; align-items: flex-end; gap: 6%; padding-bottom: 8px;
}
/* พื้นกระเบื้อง isometric (เส้น 2:1) + แสงกลางเวที */
.tj-floor { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 70% at 50% 62%, rgba(255,246,214,.55), rgba(255,246,214,0) 70%),
    repeating-linear-gradient(26.565deg, rgba(74,47,20,.22) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-26.565deg, rgba(74,47,20,.22) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, rgba(58,35,18,.35) 0%, rgba(58,35,18,0) 34%); }
.tj-floor::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 28px rgba(58,35,18,.45); }
.tj-slot { position: relative; z-index: 1; width: 44%; max-width: 190px; display: flex; flex-direction: column; align-items: center; }
.tj-pad { position: relative; width: 100%; height: 118px; }
.tj-padring { position: absolute; left: 50%; bottom: 0; width: 96px; height: 48px; margin-left: -48px;
  background: radial-gradient(closest-side, rgba(40,110,220,.55), rgba(40,110,220,.15) 70%, transparent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.tj-padring::before { content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%, 50% 0, 50% 6%, 6% 50%, 50% 94%, 94% 50%, 50% 6%); background: #6fb1ff; opacity: .9; }
.tj-slot.lead .tj-padring { background: radial-gradient(closest-side, rgba(255,205,70,.7), rgba(255,205,70,.2) 70%, transparent); }
.tj-slot.lead .tj-padring::before { background: #ffd966; animation: tjRing 1.6s ease-in-out infinite; }
.tj-sp { position: absolute; left: 50%; bottom: 22px; width: 0; height: 0; transform: scale(var(--tj-sc, 1)); transform-origin: 0 0; }
.tj-sp::before { content: ""; position: absolute; left: -26px; top: -7px; width: 52px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(30,18,6,.5), rgba(30,18,6,0)); }
.walker.tj-walker { left: 0; top: 0; z-index: 2; }
.tj-plate { position: relative; width: 100%; margin-top: 2px; padding: 12px 6px 5px; text-align: center; border-radius: 4px;
  background: linear-gradient(180deg, #fbf3dd, #ecdcb3); border: 2px solid #3a2312; box-shadow: inset 0 0 0 1px var(--tj-tan), 0 2px 0 rgba(32,16,4,.4); }
.tj-plate b { display: block; font: 700 .9rem/1.2 var(--tj-fh); color: #0b2f66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-plate small { display: block; font-size: .72rem; line-height: 1.3; color: var(--tj-ink2); }
.tj-ptag { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 3px; white-space: nowrap;
  font: 700 .66rem/1.35 var(--tj-fh); color: #3a2312; background: linear-gradient(180deg, #fff0a8, #e2b54a); border: 1px solid #3a2312; }
.tj-ptag.sup { color: #fff; background: linear-gradient(180deg, #2a66b8, var(--tj-blue)); border-color: #071a3a; }
.tj-partywin .tj-hrow { margin-top: 10px; padding-top: 10px; border-top: 1px solid #c9ad7a; gap: 10px; }
.tj-abmini { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tj-abmini small { font: 600 .68rem/1.2 var(--tj-fh); color: var(--tj-ink2); white-space: nowrap; }
.tj-jp.sm small { font-size: .72rem; }

.tj-obj { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tj-obj li { display: flex; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 4px; background: rgba(255,255,255,.5); border: 1px solid #c9ad7a; }
.tj-obj li b { display: block; font: 700 .95rem/1.3 var(--tj-fh); color: var(--tj-ink); }
.tj-obj li small { display: block; font-size: .78rem; line-height: 1.35; color: var(--tj-ink2); }
.tj-objic { flex: 0 0 auto; width: 26px; height: 26px; position: relative; }
.tj-obj .win .tj-objic::before { content: ""; position: absolute; inset: 3px; transform: rotate(45deg); background: linear-gradient(135deg, #8fe0ad, #1d7a43); border: 2px solid #0c3d20; }
.tj-obj .win .tj-objic::after { content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.tj-obj .warn .tj-objic::before { content: ""; position: absolute; inset: 1px 0 2px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #3a2312; }
.tj-obj .warn .tj-objic::after { content: "!"; position: absolute; inset: 4px 3px 4px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, #ffd23f, #e0362d); color: #2b1a0c;
  font: 800 13px/22px var(--tj-fh); text-align: center; }
.tj-facts { margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tj-facts > div { padding: 6px 7px; border-radius: 4px; background: linear-gradient(180deg, #123a78, #0a2147); border: 1px solid #1a0f05; box-shadow: inset 0 0 0 1px rgba(226,181,74,.45); min-width: 0; }
.tj-facts dt { display: flex; align-items: center; gap: 4px; font: 600 .68rem/1.2 var(--tj-fh); color: var(--tj-gold2); }
.tj-facts dt .ic { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tj-facts dd { margin: 3px 0 0; font: 600 .82rem/1.3 var(--tj-fh); color: #fff; }
.tj-expic { width: 10px; height: 10px; transform: rotate(45deg); background: linear-gradient(135deg, #fff0a8, #ffcf33 50%, #c28a0a); box-shadow: 0 0 0 1px #1a0f05; margin: 0 2px; }

.tj-eqsum { margin: 0 0 8px; font-size: .82rem; line-height: 1.5; color: var(--tj-ink2); }
.tj-eqsum b { font: 700 .88rem/1.3 var(--tj-fh); color: var(--tj-ink); }
.tj-eqgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.tj-eqgrid li { aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px;
  background: linear-gradient(180deg, #d8c59a, #c4ab78); border: 1px solid #8a6a3a; box-shadow: inset 0 2px 3px rgba(74,47,20,.35); }
.tj-eqgrid li.on { background: radial-gradient(closest-side, #fffbe9, #f1e2b6); border-color: #3a2312; box-shadow: inset 0 0 0 1px var(--tj-gold), 0 2px 0 rgba(32,16,4,.35); }
.tj-eqgrid canvas { image-rendering: pixelated; }

.tj-actions { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 10px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  margin: 0; padding-left: 10px; padding-right: 10px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #123a78, #071a3a); border-top: 2px solid var(--tj-gold);
  box-shadow: 0 -2px 0 #1a0f05; }
.tj-btn { min-height: 56px; border-radius: 8px; font: 700 1.1rem/1.2 var(--tj-fh); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .08s, box-shadow .08s; }
.tj-start { color: #fff; border: 2px solid #4a0d08; background: linear-gradient(180deg, #f2594f 0%, #e0362d 45%, #b4241c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,190,150,.35), 0 4px 0 #7a1510; text-shadow: 0 1px 0 #5a0e09; font-size: 1.2rem; }
.tj-start:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 #7a1510; }
.tj-back { color: #0b2f66; border: 2px solid #3a2312; background: linear-gradient(180deg, #fbf3dd, #e6d3a4); box-shadow: inset 0 0 0 1px #fffaea, 0 4px 0 #6b4a20; }
.tj-back:active { transform: translateY(3px); box-shadow: inset 0 0 0 1px #fffaea, 0 1px 0 #6b4a20; }
.tj-btn:focus-visible { outline: 3px solid #0755ad; outline-offset: 3px; }
.tj-bglove { animation: tjPoint .9s ease-in-out infinite; }

@keyframes tjGlow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes tjPoint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes tjRing { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- จอกว้าง ---------- */
@media (min-width: 640px) {
  .tj-board { padding: 30px 12px 14px; }
  .tj-tree { flex-direction: row; gap: 10px; }
  .tj-li { flex: 1; min-width: 0; }
  .tj-li + .tj-li::before { left: -12px; top: 44px; width: 14px; height: 4px; margin: -2px 0 0; }
  .tj-node { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 10px 6px 8px; gap: 6px; min-height: 0; height: 100%; align-content: start; }
  .tj-ntext { align-items: center; }
  .tj-nname { font-size: .92rem; }
  .tj-npips { grid-template-columns: repeat(4, 12px); }
  .tj-npoint { left: 50%; top: -27px; margin: 0 0 0 -15px; transform: rotate(90deg); animation: tjPointDown .9s ease-in-out infinite; }
  .tj-panel { display: grid; grid-template-columns: 1fr; }
  .tj-fgrid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .tj-lineup { height: 230px; }
  .tj-actions { position: static; grid-template-columns: 1fr 2fr; max-width: 520px; margin-left: auto; width: 100%; padding: 4px 0 0; background: none; border: 0; box-shadow: none; }
}
@keyframes tjPointDown { 0%, 100% { transform: rotate(90deg) translateX(0); } 50% { transform: rotate(90deg) translateX(4px); } }
@media (max-width: 359px) {
  .tj-wbody { padding: 8px; }
  .tj-board { padding-left: 30px; }
  .tj-node { grid-template-columns: 50px 1fr auto; }
  .tj-ncrest { width: 46px; height: 46px; }
  .tj-ncrest .tj-crest { width: 42px; height: 42px; }
  .tj-li + .tj-li::before { left: 31px; }
  .tj-facts { grid-template-columns: 1fr 1fr; }
  .tj-facts > div:nth-child(3) { grid-column: span 2; }
  .tj-lineup { height: 184px; }
  .tj-sp { --tj-sc: .8; }
  .tj-pad { height: 104px; }
  .tj-hrow { flex-wrap: wrap; }
  .tj-abmini { flex-direction: row; width: 100%; justify-content: flex-start; gap: 8px; padding-left: 60px; }
  .tj-abmini .tj-npips { grid-template-columns: repeat(4, 12px); }
}
@media (prefers-reduced-motion: reduce) {
  .tj-node.is-current::after, .tj-npoint, .tj-bglove, .tj-slot.lead .tj-padring::before { animation: none; }
  .tj-node.is-current::after { opacity: .9; }
  .tj-btn, .tj-node { transition: none; }
}
.tacspr.tj-3d { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); z-index: 2; }

/* รอบ 14c: เลือกพกไอเทม 1 ชิ้น · เป้ากด ≥ 44px */
.tj-eqgrid.pick { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.tj-eqgrid.pick li { box-sizing: border-box; min-width: 0; }
.tj-eqbtn { position: relative; width: 100%; height: 100%; min-height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; border-radius: 4px; cursor: pointer; }
.tj-eqbtn[aria-pressed="true"] { box-shadow: inset 0 0 0 3px #c62828; background: rgba(255, 230, 160, .7); }
.tj-eqbtn[aria-pressed="true"]::after { content: ''; position: absolute; right: 3px; top: 3px; width: 10px; height: 10px; background: #c62828; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); }
.tj-eqbtn:focus-visible { outline: 3px solid #0755ad; outline-offset: 1px; }
.tj-eqnote { margin: 8px 0 0; font-size: .8rem; color: #7f4d00; }
