/* WiseChecker tools: shared shell. Every rule lives under .wct so the theme is not touched. No images, no web fonts. */
.wct{--ink:#0f172a;--mut:#55627a;--line:#d9dfe8;--bg:#f4f6fa;--card:#fff;--acc:#2563eb;--acc2:#7c3aed;--ok:#15a05a;--warn:#d97706;--bad:#dc2626;--r:14px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--ink);line-height:1.5;margin:0 0 1.6em;-webkit-tap-highlight-color:transparent}
.wct *,.wct *::before,.wct *::after{box-sizing:border-box}
.wct button{font:inherit;color:inherit;cursor:pointer}
.wct [hidden]{display:none!important}
.wct-app{position:relative;border:1px solid var(--line);border-radius:calc(var(--r) + 4px);background:linear-gradient(180deg,#fbfcfe,var(--bg));box-shadow:0 1px 2px rgba(15,23,42,.05),0 12px 32px -18px rgba(15,23,42,.35);overflow:hidden}
.wct-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:12px 14px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.8)}
.wct-bar .wct-sp{flex:1 1 auto}
.wct-seg{display:inline-flex;padding:3px;border-radius:999px;background:#e8ecf3}
.wct-seg button{border:0;background:transparent;padding:6px 13px;border-radius:999px;font-size:.86rem;font-weight:600;color:var(--mut);white-space:nowrap;transition:background .15s,color .15s,box-shadow .15s}
.wct-seg button[aria-pressed="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(15,23,42,.18)}
.wct-btn{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;padding:7px 13px;border-radius:10px;font-size:.88rem;font-weight:600;transition:transform .08s,box-shadow .15s,border-color .15s}
.wct-btn:hover{border-color:#b8c2d3;box-shadow:0 2px 8px rgba(15,23,42,.08)}
.wct-btn:active{transform:translateY(1px)}
.wct-btn.is-primary{background:linear-gradient(180deg,#3b82f6,#2563eb);border-color:#1d4ed8;color:#fff;box-shadow:0 2px 8px rgba(37,99,235,.35)}
.wct-btn[aria-pressed="true"]{background:#eef4ff;border-color:#9dbcf7;color:#1d4ed8}
.wct-btn svg{width:16px;height:16px;flex:0 0 auto}
.wct :focus-visible{outline:3px solid rgba(37,99,235,.55);outline-offset:2px}
.wct-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:10px;padding:14px}
.wct-stat{padding:11px 13px;border:1px solid var(--line);border-radius:var(--r);background:var(--card)}
.wct-stat small{display:block;font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mut)}
.wct-stat b{display:block;margin-top:2px;font-size:1.5rem;line-height:1.2;font-variant-numeric:tabular-nums;font-weight:750}
.wct-stat span{display:block;font-size:.8rem;color:var(--mut);min-height:1.2em}
.wct-meter{height:6px;margin-top:7px;border-radius:99px;background:#e6eaf1;overflow:hidden}
.wct-meter i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,var(--acc),var(--ok));transition:width .25s ease}
.wct-toast{position:absolute;left:50%;bottom:14px;transform:translate(-50%,14px);padding:8px 14px;border-radius:999px;background:#0f172a;color:#fff;font-size:.86rem;font-weight:600;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:5;max-width:90%;text-align:center}
.wct-toast.on{opacity:1;transform:translate(-50%,0)}
.wct-note{margin:0;padding:10px 14px 14px;font-size:.84rem;color:var(--mut)}
@media (prefers-reduced-motion:reduce){.wct *{transition:none!important;animation:none!important}}
/* The site theme paints every button dark grey on hover and focus (button:hover{background:#3f4047;color:#fff}).
   These rules keep the tools' own colours in every state, so text never lands on a dark background. */
.wct button:hover,.wct button:focus,.wct button:active{background-color:transparent;color:inherit}
.wct .wct-btn,.wct .wct-btn:focus{background:#fff;color:var(--ink)}
.wct .wct-btn:hover{background:#f1f5fb;color:var(--ink);border-color:#aebbd0}
.wct .wct-btn:active{background:#e6ecf5}
.wct .wct-btn[aria-pressed="true"],.wct .wct-btn[aria-pressed="true"]:focus{background:#eef4ff;color:#1d4ed8;border-color:#9dbcf7}
.wct .wct-btn[aria-pressed="true"]:hover{background:#e0ebff;color:#1d4ed8;border-color:#7ea6f5}
.wct .wct-btn.is-primary,.wct .wct-btn.is-primary:focus{background:linear-gradient(180deg,#3b82f6,#2563eb);color:#fff;border-color:#1d4ed8}
.wct .wct-btn.is-primary:hover{background:linear-gradient(180deg,#5b9bff,#2f6fed);color:#fff;border-color:#1d4ed8}
.wct .wct-btn:disabled,.wct .wct-btn:disabled:hover{background:#fff;color:var(--ink);border-color:var(--line)}
.wct .wct-seg button,.wct .wct-seg button:focus{background:transparent;color:var(--mut)}
.wct .wct-seg button:hover{background:rgba(255,255,255,.65);color:var(--ink)}
.wct .wct-seg button[aria-pressed="true"],.wct .wct-seg button[aria-pressed="true"]:hover,.wct .wct-seg button[aria-pressed="true"]:focus{background:#fff;color:var(--ink)}

/* Tic-Tac-Toe: a sheet of ruled paper on a desk. Lines and marks are pen strokes: blue ink for X, red ink for O.
   Sizes on the board are in em: 1em is 1% of the board's width. */
.tt-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);gap:18px;padding:16px;align-items:start;background:radial-gradient(130% 120% at 50% 0%,#f4f1e8 0%,#e7e1d2 100%)}
.tt-left{min-width:0}
.tt-score{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:440px;margin:0 auto 12px}
.tt.is-u .tt-score{max-width:560px}
.tt-card{display:flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid #d9d3c3;border-radius:12px;background:#fffdf7;transition:box-shadow .2s,border-color .2s;min-width:0}
.tt-card.is-x.is-turn{border-color:#2456d6;box-shadow:0 0 0 3px rgba(36,86,214,.2)}
.tt-card.is-o.is-turn{border-color:#e2463c;box-shadow:0 0 0 3px rgba(226,70,60,.22)}
.tt-cmark{position:relative;flex:0 0 30px;width:30px;height:30px}
.tt-cmark .tt-m{left:0;top:0;width:100%;height:100%}
.tt-ctext{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.tt-ctext strong{font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tt-ctext small{font-size:.74rem;color:var(--mut)}.tt-ctext small b{font-variant-numeric:tabular-nums;color:#0f172a}
.tt-frame{width:100%;max-width:440px;margin:0 auto 8px;padding:clamp(4px,1.6vw,14px);border-radius:10px;
  background:repeating-linear-gradient(180deg,rgba(255,255,255,0) 0 25px,rgba(96,140,220,.16) 25px 26px),linear-gradient(180deg,#fffef9,#fbf8ee);
  box-shadow:0 0 0 1px #e3dccb,0 3px 0 -1px #fffdf6,0 3px 0 0 #dcd5c2,0 6px 0 -2px #fffdf6,0 6px 0 -1px #dcd5c2,0 22px 34px -22px rgba(70,56,20,.6)}
.tt.is-u .tt-frame{max-width:560px}
.tt-wrap{container-type:inline-size}
.tt-board{position:relative;aspect-ratio:1/1;font-size:1cqw;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
.tt-board.is-u{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:1.6em;padding:.6em}
.tt-sub{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));border-radius:1.8em;transition:background-color .25s,box-shadow .25s}
.tt-board.is-c .tt-sub{position:absolute;inset:0}
.tt-g{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;transition:opacity .3s}
.tt-g path{fill:none;stroke:#3b4558;stroke-width:5;stroke-linecap:round}
.tt-board.is-u .tt-g path{stroke:#8a93a5;stroke-width:4.200}
.tt-lines,.tt-strike,.tt-big{position:absolute;inset:0;pointer-events:none}
.tt-lines svg,.tt-strike svg{display:block;width:100%;height:100%}
.tt-lines path{fill:none;stroke:#2f3848;stroke-width:3.400;stroke-linecap:round}
.wct .tt-cell,.wct .tt-cell:hover,.wct .tt-cell:focus{position:relative;display:block;min-width:0;min-height:0;padding:0;margin:0;border:0;border-radius:18%;background:transparent;box-shadow:none;cursor:default;-webkit-tap-highlight-color:transparent}
.wct .tt-cell.is-free{cursor:pointer}
@media (hover:hover){.wct .tt-board.is-x .tt-cell.is-free:hover{background:rgba(36,86,214,.1)}.wct .tt-board.is-o .tt-cell.is-free:hover{background:rgba(226,70,60,.1)}}
.wct .tt-cell.is-last,.wct .tt-cell.is-last:hover,.wct .tt-cell.is-last:focus{background:radial-gradient(closest-side,rgba(253,224,71,.62),rgba(253,224,71,.4) 62%,rgba(253,224,71,0))}
.wct .tt-cell:focus-visible{outline:.7em solid #f59e0b;outline-offset:-.9em}
.tt-cell.is-hint::after{content:"";position:absolute;inset:14%;border-radius:50%;box-shadow:0 0 0 .7em #0ea5e9,0 0 2.4em .7em rgba(14,165,233,.6);animation:tt-pulse .55s ease-in-out infinite alternate}
@keyframes tt-pulse{from{transform:scale(.82);opacity:.7}to{transform:scale(1);opacity:1}}
.tt-cell.is-win .tt-m{animation:tt-pop .5s ease-in-out .35s 2 alternate}
@keyframes tt-pop{to{transform:scale(1.14)}}
.tt-cell.is-no,.tt-sub.is-no{animation:tt-no .36s}
@keyframes tt-no{0%,100%{transform:none}25%{transform:translateX(-1em)}75%{transform:translateX(1em)}}
/* pen strokes */
.tt-m{position:absolute;left:15%;top:15%;width:70%;height:70%;overflow:visible;pointer-events:none;transition:opacity .3s}
.tt-m path{fill:none;stroke-width:4.600;stroke-linecap:round;stroke-linejoin:round}
.tt-m.is-x path{stroke:#2456d6}.tt-m.is-o path{stroke:#e2463c}
.tt-m.is-new path{stroke-dasharray:1.050;stroke-dashoffset:1.050;animation:tt-draw .19s ease-out forwards}
.tt-m.is-new path+path{animation-delay:.17s}
.tt-m.is-o.is-new path{animation-duration:.36s}
@keyframes tt-draw{to{stroke-dashoffset:0}}
.tt-big .tt-m{left:8%;top:8%;width:84%;height:84%;filter:drop-shadow(0 .5em .5em rgba(40,40,60,.22))}
.tt-big .tt-m path{stroke-width:5.200}
.tt-big .tt-m.is-new path{animation-duration:.26s;animation-delay:.3s}
.tt-big .tt-m.is-new path+path{animation-delay:.52s}
.tt-big .tt-m.is-o.is-new path{animation-duration:.5s}
/* Ultimate: the small board of the next move glows in the colour of the side to move; closed boards fade under a big mark */
.tt-board.is-x .tt-sub.is-open{background-color:rgba(36,86,214,.11);box-shadow:0 0 0 .45em rgba(36,86,214,.5),0 0 2.6em .5em rgba(36,86,214,.3);animation:tt-glow 1s ease-in-out infinite alternate}
.tt-board.is-o .tt-sub.is-open{background-color:rgba(226,70,60,.1);box-shadow:0 0 0 .45em rgba(226,70,60,.5),0 0 2.6em .5em rgba(226,70,60,.3);animation:tt-glow 1s ease-in-out infinite alternate}
@keyframes tt-glow{from{filter:brightness(1)}to{filter:brightness(1.05) saturate(1.5)}}
/* a free choice: every open board is lit, but lightly */
.tt-board.is-any.is-x .tt-sub.is-open{background-color:rgba(36,86,214,.07);box-shadow:0 0 0 .3em rgba(36,86,214,.3)}
.tt-board.is-any.is-o .tt-sub.is-open{background-color:rgba(226,70,60,.06);box-shadow:0 0 0 .3em rgba(226,70,60,.3)}
.tt-sub.is-wx{background-color:rgba(36,86,214,.09)}.tt-sub.is-wo{background-color:rgba(226,70,60,.09)}
.tt-sub.is-draw{background:repeating-linear-gradient(45deg,rgba(100,116,139,.16) 0 .7em,rgba(100,116,139,0) .7em 1.6em)}
.tt-sub.is-wx .tt-cell .tt-m,.tt-sub.is-wo .tt-cell .tt-m{opacity:.16}.tt-sub.is-draw .tt-cell .tt-m{opacity:.4}
.tt-sub.is-wx .tt-g,.tt-sub.is-wo .tt-g,.tt-sub.is-draw .tt-g{opacity:.3}
.tt-board.has-line.is-u .tt-sub:not(.is-line) .tt-big{opacity:.4}
.tt-sub.is-line .tt-big .tt-m{animation:tt-pop .5s ease-in-out .5s 2 alternate}
.tt-strike path{fill:none;stroke-width:8;stroke-linecap:round;opacity:.85;stroke-dasharray:1.050;stroke-dashoffset:1.050;animation:tt-draw .4s ease-out .3s forwards}
.tt-strike path.is-x{stroke:#1e3a8a}.tt-strike path.is-o{stroke:#9f1d15}
.tt-board.is-u .tt-strike path{stroke-width:6;animation-delay:.75s}
.tt-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.tt-status{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #d9d3c3;border-radius:12px;background:#fffdf7;font-weight:650;color:#0f172a}
.tt-status i{flex:0 0 16px;width:16px;height:16px;border-radius:50%;background:#2456d6;box-shadow:0 0 0 3px #dbe6ff}
.tt-status.is-o i{background:#e2463c;box-shadow:0 0 0 3px #fde0dd}
.tt-status.is-cpu i{animation:tt-think .7s ease-in-out infinite alternate}
.tt-status.is-end i{background:#f59e0b;box-shadow:0 0 0 3px #fef3c7}
@keyframes tt-think{from{opacity:.35}to{opacity:1}}
.tt-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.wct .tt-act,.wct .tt-act:focus{display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:8px;border:1px solid #d9d3c3;border-radius:12px;background:#fffdf7;color:#1e293b;font-size:.9rem;font-weight:650}
.wct .tt-act:hover{background:#f6f1e2;color:#1e293b;border-color:#bdb49c}
.wct .tt-act:disabled,.wct .tt-act:disabled:hover{opacity:.45;background:#fffdf7;cursor:default}
.tt-act svg{width:20px;height:20px}
.tt-tip{margin:0;font-size:.82rem;line-height:1.5;color:var(--mut)}
.tt-tools{display:flex;gap:8px}
.wct .tt-icon{padding:7px 9px}.tt-icon[aria-pressed="false"]{opacity:.55}
.tt-result{padding:4px 0 2px;animation:tt-in .35s ease}
@keyframes tt-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.tt-res-top{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 16px 0}
.tt-res-top>div{flex:1 1 200px;min-width:0}
.tt-medal{display:flex;align-items:center;justify-content:center;flex:0 0 46px;width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#94a3b8,#475569);color:#fff}
.tt-res-top.is-win .tt-medal,.tt-res-top.is-x .tt-medal{background:linear-gradient(135deg,#2456d6,#1e3a8a);box-shadow:0 6px 16px -6px rgba(30,58,138,.7)}
.tt-res-top.is-o .tt-medal{background:linear-gradient(135deg,#e2463c,#9f1d15);box-shadow:0 6px 16px -6px rgba(159,29,21,.7)}
.tt-medal svg{width:26px;height:26px}
.tt-res-top strong{display:block;font-size:1.2rem}.tt-res-top p{margin:0;font-size:.92rem;color:var(--mut)}
.tt-res-acts{display:flex;flex-wrap:wrap;gap:10px;padding:2px 14px 12px}
.tt-how{position:absolute;inset:0;z-index:6;display:flex;align-items:flex-start;justify-content:center;padding:70px 14px 14px;background:rgba(41,37,28,.55);backdrop-filter:blur(2px)}
.tt-how-card{width:100%;max-width:380px;padding:18px 18px 16px;border-radius:16px;background:#fff;box-shadow:0 24px 50px -20px rgba(0,0,0,.6);text-align:center;animation:tt-in .3s ease}
.tt-how-card small{font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mut)}
.tt-how-card h3{margin:2px 0 12px;font-size:1.15rem;text-align:center;color:#0f172a}
.tt-how-pic{display:flex;align-items:center;justify-content:center;min-height:150px;padding:8px;border-radius:12px;background:#fbf8ee;box-shadow:inset 0 0 0 1px #ebe5d3}
.tt-how-pic svg{width:136px;max-width:100%;height:auto}
.tt.is-u .tt-how-pic svg{width:172px}
.tt-how-card p{margin:12px 0 14px;font-size:.95rem;line-height:1.5;color:#1e293b;min-height:4.5em}
.tt-how-acts{display:flex;justify-content:center;gap:10px}
@media (max-width:760px){.tt-main{grid-template-columns:1fr;padding:10px 4px;gap:12px}.tt-score{padding:0 4px}.tt-side{max-width:560px;margin:0 auto;width:100%;padding:0 6px}.tt .wct-bar{padding:10px;gap:8px 6px}.tt .wct-bar .wct-btn.is-primary span{display:none}.tt .wct-seg button{padding:6px 9px;font-size:.82rem}.tt .wct-bar .wct-btn{padding:7px 9px}.tt-tools{gap:6px}.tt-card{gap:8px;padding:7px 9px}.tt-frame{padding:4px}}
@media (prefers-reduced-motion:reduce){.tt-m.is-new path,.tt-strike path{stroke-dasharray:none;stroke-dashoffset:0}.tt-cell.is-hint::after,.tt-sub.is-open,.tt-status.is-cpu i,.tt-cell.is-no,.tt-sub.is-no,.tt-cell.is-win .tt-m,.tt-sub.is-line .tt-big .tt-m{animation:none}}
