/* 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)}

/* Dominoes: ivory tiles with coloured pips on a blue felt table. The computer's hand lies face down at the top with the boneyard,
   the line is in the middle (each tile is placed by the script, --u is half a tile) and the player's hand is at the bottom. */
.dm-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,270px);gap:18px;padding:16px;align-items:start;background:radial-gradient(130% 120% at 50% 0%,#eef3f9 0%,#dfe7f1 100%)}
.dm-left{min-width:0}
.dm-score{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px}
.dm-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:baseline;gap:2px 5px;padding:8px 12px;border:1px solid #cfd8e5;border-radius:12px;background:#fff;min-width:0;transition:box-shadow .2s,border-color .2s}
.dm-card.is-turn{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.2)}
.dm-cname{font-size:.74rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#334155;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-card b{font-size:1.45rem;line-height:1;font-variant-numeric:tabular-nums}
.dm-card small{font-size:.74rem;font-weight:600;color:var(--mut)}
.dm-card .wct-meter{grid-column:1/-1;margin-top:5px}
.dm-skip{position:absolute;right:8px;top:-10px;display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#dc2626;color:#fff;opacity:0;transform:scale(.5);transition:opacity .2s,transform .3s;pointer-events:none}
.dm-skip svg{width:15px;height:15px}
.dm-card.is-skip .dm-skip{opacity:1;transform:none}
.dm-area{padding:9px 6px 10px;border-radius:16px;background:radial-gradient(120% 90% at 50% 40%,#2c5f92 0%,#1f4a73 55%,#173a5c 100%);box-shadow:0 18px 34px -18px rgba(15,35,60,.8),inset 0 0 0 3px rgba(255,255,255,.07),inset 0 2px 12px rgba(0,0,0,.35);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.dm-opp{display:flex;align-items:center;gap:10px;min-height:40px;padding:0 6px 8px}
.dm-backs{flex:1 1 auto;display:flex;flex-wrap:wrap;gap:3px;min-width:0}
.dm-back{display:block;flex:0 0 auto;width:15px;height:28px;border:2.5px solid #f6eedc;border-radius:3.5px;background:#b9ab8c;box-shadow:0 1px 2px rgba(0,0,0,.45)}
.dm-backs.is-open .dm-t{width:20px;height:40px;border-radius:4px}
.dm-stock{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:4px 10px 4px 6px;border-radius:99px;background:rgba(0,0,0,.28);color:#e8eef6;font-size:.92rem;font-weight:800;font-variant-numeric:tabular-nums}
.dm-stock .dm-back,.dm-act .dm-back{width:12px;height:22px;border-width:2px}
.dm-stock.is-shut{opacity:.5}
.dm-table{position:relative;height:190px;border-radius:10px;background:rgba(0,0,0,.15);box-shadow:inset 0 1px 6px rgba(0,0,0,.35);overflow:hidden;transition:height .3s ease}
.dm-t{display:flex;background:linear-gradient(160deg,#fffdf6,#f1e8d3);border-radius:5px;box-shadow:0 1.5px 0 #b7a988,0 3px 5px rgba(0,0,0,.4);overflow:hidden}
.dm-t.is-v{flex-direction:column}
.dm-h{display:block;flex:1 1 0;min-width:0;min-height:0;--pip:radial-gradient(circle,var(--c) 0 56%,rgba(0,0,0,0) 62%)}
.dm-t.is-h .dm-h+.dm-h{box-shadow:inset 1px 0 0 rgba(90,78,50,.6)}
.dm-t.is-v .dm-h+.dm-h{box-shadow:inset 0 1px 0 rgba(90,78,50,.6)}
.dm-h.p1{--c:#0369a1;background:var(--pip) 50% 50%/27% 27% no-repeat}
.dm-h.p2{--c:#15803d;background:var(--pip) 16% 16%/27% 27% no-repeat,var(--pip) 84% 84%/27% 27% no-repeat}
.dm-h.p3{--c:#dc2626;background:var(--pip) 16% 16%/27% 27% no-repeat,var(--pip) 50% 50%/27% 27% no-repeat,var(--pip) 84% 84%/27% 27% no-repeat}
.dm-h.p4{--c:#7e22ce;background:var(--pip) 16% 16%/27% 27% no-repeat,var(--pip) 84% 16%/27% 27% no-repeat,var(--pip) 16% 84%/27% 27% no-repeat,var(--pip) 84% 84%/27% 27% no-repeat}
.dm-h.p5{--c:#b45309;background:var(--pip) 16% 16%/27% 27% no-repeat,var(--pip) 84% 16%/27% 27% no-repeat,var(--pip) 50% 50%/27% 27% no-repeat,var(--pip) 16% 84%/27% 27% no-repeat,var(--pip) 84% 84%/27% 27% no-repeat}
.dm-h.p6{--c:#0f172a;background:var(--pip) 16% 14%/27% 27% no-repeat,var(--pip) 84% 14%/27% 27% no-repeat,var(--pip) 16% 50%/27% 27% no-repeat,var(--pip) 84% 50%/27% 27% no-repeat,var(--pip) 16% 86%/27% 27% no-repeat,var(--pip) 84% 86%/27% 27% no-repeat}
.dm-ct{position:absolute;border-radius:calc(var(--u)*.2);transition:left .3s ease,top .3s ease,transform .34s cubic-bezier(.3,.8,.35,1)}
.dm-ct.is-last{box-shadow:0 0 0 2px #fde047,0 3px 6px rgba(0,0,0,.45)}
.dm.is-fast .dm-table,.dm.is-fast .dm-ct,.dm.is-fast .dm-end{transition:none}
.wct .dm-end,.wct .dm-end:hover,.wct .dm-end:focus,.wct .dm-end:active{position:absolute;z-index:3;display:flex;align-items:center;justify-content:center;width:46px;height:46px;margin:-23px 0 0 -23px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;cursor:default;pointer-events:none;transition:left .3s ease,top .3s ease;-webkit-tap-highlight-color:transparent}
.dm-end i{display:block;width:calc(var(--u)*1.06);height:calc(var(--u)*1.06);border-radius:24%;opacity:0;transition:opacity .2s}
.dm-end.is-on i{opacity:1;box-shadow:0 0 0 2px rgba(253,224,71,.95),0 0 10px 3px rgba(253,224,71,.5)}
.wct .dm-end.is-pick,.wct .dm-end.is-pick:hover,.wct .dm-end.is-pick:focus{pointer-events:auto;cursor:pointer}
.dm-end.is-pick i{opacity:1;box-shadow:0 0 0 3px #fde047,0 0 0 6px rgba(255,255,255,.95),0 0 18px 8px rgba(253,224,71,.9);animation:dm-pulse .7s ease-in-out infinite alternate}
.wct .dm-end:focus-visible{outline:3px solid #fff;outline-offset:0}
@keyframes dm-pulse{from{transform:scale(.94)}to{transform:scale(1.06)}}
.dm-hand{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 4px;min-height:98px;padding:16px 2px 8px}
.wct .dm-ht,.wct .dm-ht:hover,.wct .dm-ht:focus,.wct .dm-ht:active{flex:0 0 calc((100% - 24px)/7);max-width:50px;aspect-ratio:1/2;padding:0;margin:0;border:0;border-radius:7px;background:transparent;box-shadow:none;cursor:default;transition:transform .15s,opacity .2s;-webkit-tap-highlight-color:transparent}
.dm-ht .dm-t{width:100%;height:100%;border-radius:7px;transition:box-shadow .15s}
.wct .dm-ht.is-can,.wct .dm-ht.is-can:hover,.wct .dm-ht.is-can:focus{cursor:pointer;transform:translateY(-6px)}
.dm-ht.is-can .dm-t{box-shadow:0 0 0 2.5px #fde047,0 0 12px 2px rgba(253,224,71,.65),0 4px 8px rgba(0,0,0,.45)}
.wct .dm-ht.is-off,.wct .dm-ht.is-off:hover,.wct .dm-ht.is-off:focus{opacity:.6}
.wct .dm-ht.is-sel,.wct .dm-ht.is-sel:hover,.wct .dm-ht.is-sel:focus{transform:translateY(-12px)}
.dm-ht.is-sel .dm-t{box-shadow:0 0 0 3px #fff,0 0 14px 4px rgba(255,255,255,.75),0 6px 10px rgba(0,0,0,.5)}
.wct .dm-ht:focus-visible{outline:3px solid #fff;outline-offset:3px}
.dm-ht.is-no .dm-t{animation:dm-no .3s}
@keyframes dm-no{0%,100%{transform:none}30%{transform:translateX(-3px)}70%{transform:translateX(3px)}}
.dm-ctl{display:flex;justify-content:center;padding:2px 4px 0}
.wct .dm-act,.wct .dm-act:focus{display:flex;align-items:center;justify-content:center;gap:9px;min-width:190px;min-height:46px;padding:8px 18px;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.1);color:#e8eef6;font-size:.95rem;font-weight:700;font-variant-numeric:tabular-nums}
.wct .dm-act:hover{background:rgba(255,255,255,.17);color:#fff}
.wct .dm-act:disabled,.wct .dm-act:disabled:hover{opacity:.55;background:rgba(255,255,255,.08);color:#e8eef6;cursor:default}
.wct .dm-act.is-on,.wct .dm-act.is-on:focus{background:linear-gradient(180deg,#fbbf24,#f59e0b);border-color:#b45309;color:#422006;box-shadow:0 0 0 3px rgba(253,224,71,.35),0 6px 14px -4px rgba(0,0,0,.5);animation:dm-pulse .8s ease-in-out infinite alternate}
.wct .dm-act.is-on:hover{background:linear-gradient(180deg,#fcd34d,#fbbf24);border-color:#b45309;color:#422006}
.wct .dm-act.is-on:active{background:#e08a0a;color:#422006}
.dm-act.is-pass .dm-back{display:none}
.dm-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.dm-status{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #cfd8e5;border-radius:12px;background:#fff;font-weight:650;color:#0f172a}
.dm-status i{flex:0 0 14px;width:14px;height:14px;border-radius:50%;background:#2563eb;box-shadow:0 0 0 3px #dbeafe}
.dm-status.is-cpu i{background:#64748b;box-shadow:0 0 0 3px #e2e8f0;animation:dm-think .7s ease-in-out infinite alternate}
.dm-status.is-end i{background:#15803d;box-shadow:0 0 0 3px #dcfce7}
@keyframes dm-think{from{opacity:.35}to{opacity:1}}
.dm-opt{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px;font-size:.86rem;font-weight:600;color:#334155}
.wct .dm-opt .wct-seg button{min-width:40px;padding:7px 11px}
.dm-tip{margin:0;font-size:.82rem;line-height:1.5;color:var(--mut)}
.wct .dm-icon{padding:7px 9px}.dm-icon[aria-pressed="false"]{opacity:.55}
.dm-result{padding:4px 0 2px;animation:dm-in .35s ease}
@keyframes dm-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.dm-res-top{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 16px 0}
.dm-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}
.dm-res-top.is-win .dm-medal{background:linear-gradient(135deg,#1d4ed8,#1e3a8a);box-shadow:0 6px 16px -6px rgba(30,64,175,.7)}
.dm-medal svg{width:26px;height:26px}
.dm-res-top>div{flex:1 1 200px;min-width:0}
.dm-res-top strong{display:block;font-size:1.2rem}.dm-res-top p{margin:0;font-size:.92rem;color:var(--mut)}
.dm-res-acts{display:flex;flex-wrap:wrap;gap:10px;padding:2px 14px 12px}
.dm-how{position:absolute;inset:0;z-index:12;display:flex;align-items:flex-start;justify-content:center;padding:70px 14px 14px;background:rgba(12,28,48,.6);backdrop-filter:blur(2px)}
.dm-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:dm-in .3s ease}
.dm-how-card small{font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mut)}
.dm-how-card h3{margin:2px 0 12px;font-size:1.15rem;text-align:center;color:#0f172a}
.dm-how-pic{display:flex;justify-content:center;padding:12px;border-radius:12px;background:#e6edf5}
.dm-how-pic svg{width:240px;max-width:100%;height:auto}
.dm-how-card p{margin:12px 0 14px;font-size:.95rem;line-height:1.5;color:#1e293b;min-height:5.6em}
.dm-how-acts{display:flex;justify-content:center;gap:10px}
@media (max-width:760px){.dm-main{grid-template-columns:1fr;padding:10px 8px;gap:12px}.dm .wct-bar{padding:10px;gap:8px}.dm .wct-bar>.wct-seg{flex:1 1 auto}.dm .wct-bar>.wct-seg button{flex:1 1 auto}.dm .wct-bar .wct-btn.is-primary span{display:none}.dm .wct-bar>.wct-seg button{padding:6px 8px}.wct .dm-icon,.dm .wct-bar .wct-btn.is-primary{padding:7px 8px}.dm-card{padding:8px 10px}.dm-cname{letter-spacing:0;text-transform:none}.dm.is-over .dm-opt,.dm.is-over .dm-tip{display:none}}
@media (prefers-reduced-motion:reduce){.dm-ct,.dm-ht,.dm-table{transition:none}.dm-end.is-pick i,.dm-act.is-on,.dm-status.is-cpu i,.dm-ht.is-no .dm-t{animation:none}}
