:root{--bg:#14100c;--bg-2:#1f1913;--panel:#241d16;--edge:#3d3125;--text:#f4ecdf;--muted:#b9a98f;--accent:#f5b83d;--accent-text:#1e1400;--bad:#f07a6a;--wood:#a8743f;--wood-dark:#6f4622;--wood-line:#4a2d14;--radius:14px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;touch-action:manipulation;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}tg-bar:not(:defined){background:#0b0b0e;height:40px;display:block}.app-shell{background:radial-gradient(ellipse at top, #2a2017 0%, var(--bg) 62%);min-height:calc(100dvh - 40px)}.page-banner{max-width:728px;margin:24px auto 0;padding:0 16px;display:block}tg-footer{margin-top:24px;display:block}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.game{max-width:940px;margin:0 auto;padding:8px 16px 32px}@media (width>=1200px) and (height>=672px){.game{margin-right:max(192px,50% - 470px)}}.game-header{padding:6px 0 12px}.header-top{justify-content:space-between;align-items:center;gap:12px;display:flex}.modes{background:var(--bg-2);border:1px solid var(--edge);border-radius:999px;gap:4px;width:fit-content;max-width:100%;margin-top:10px;padding:4px;display:flex}.mode{color:var(--muted);white-space:nowrap;border-radius:999px;padding:7px 16px;font-size:.92rem;font-weight:700;text-decoration:none}.mode:hover{color:var(--text)}.mode.active{background:var(--accent);color:var(--accent-text)}.mode:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.title-block{min-width:0;position:relative}.game-header h1{letter-spacing:.04em;text-shadow:0 0 18px #ff8c0059,0 1px #0009;margin:0;font-size:1.6rem;position:relative}.title-runes{letter-spacing:.18em;white-space:nowrap;color:#f5b83d1a;filter:drop-shadow(0 0 10px #ff8c0040);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:2.2rem;line-height:1;position:absolute;top:-1px;left:-2px}.game-header h1 a{color:inherit;text-decoration:none}.subtitle{color:var(--muted);margin:2px 0 0;font-size:.95rem;position:relative}.header-actions{gap:8px;display:flex}.icon-btn{border:1px solid var(--edge);background:var(--bg-2);border-radius:50%;flex-shrink:0;place-items:center;width:40px;height:40px;font-size:1.05rem;font-weight:700;display:grid}.icon-btn:hover{background:var(--panel)}@media (width<=400px){.game{padding:4px 8px 24px}.game-header{padding:4px 4px 8px}.modes{width:100%}.mode{text-align:center;flex:1;padding:7px 6px;font-size:.85rem}.game-header h1{font-size:1.3rem}.subtitle{font-size:.85rem}.header-actions{gap:6px}.header-actions .icon-btn{width:36px;height:36px}}.inline-icon{vertical-align:-4px;color:var(--accent);display:inline-flex}.workspace{grid-template-columns:minmax(0,1fr) minmax(0,290px);align-items:start;gap:20px;display:grid}@media (width<=760px){.workspace{grid-template-columns:minmax(0,1fr);gap:12px}}.side{flex-direction:column;gap:12px;display:flex}.status-card,.moves-card,.result{background:var(--panel);border:1px solid var(--edge);border-radius:var(--radius);padding:14px 16px}h2{margin:0 0 8px;font-size:1.2rem}.muted{color:var(--muted)}.board-wrap{width:min(100%,100dvh - 188px);min-width:min(100%,300px);margin:0 auto}.board{aspect-ratio:1;background:linear-gradient(135deg, #ffffff0d, #00000026), var(--wood-line);border-radius:10px;flex-direction:column;gap:.35%;padding:1.2%;display:flex;box-shadow:0 14px 34px #00000073,inset 0 0 0 2px #00000059}.board-row{flex:1;gap:.35%;display:flex}.sq{background:radial-gradient(circle at 30% 20%, #ffffff12, transparent 70%), var(--wood);touch-action:manipulation;-webkit-user-select:none;user-select:none;border:0;border-radius:2px;flex:1;place-items:center;min-width:0;padding:0;display:grid;position:relative}.sq:nth-child(odd){filter:brightness(1.03)}.sq:focus-visible{outline-offset:-3px;z-index:2;outline:3px solid #fff}.sq-corner,.sq-throne{background:repeating-linear-gradient(45deg, #0000002e 0 3px, transparent 3px 7px), var(--wood-dark)}.sq-corner:before,.sq-throne:before{content:"";border:2px solid #f5b83d8c;position:absolute;inset:22%;transform:rotate(45deg)}.sq.last{background:linear-gradient(#f5b83d6b, #f5b83d6b), var(--wood)}.sq.selected{background:linear-gradient(#ffecaa8c, #ffecaa8c), var(--wood)}.sq.target:after{content:"";pointer-events:none;background:#1e120680;border-radius:50%;width:30%;height:30%;position:absolute}.sq-corner.target:after{background:#f5b83dd9;width:50%;height:50%;box-shadow:0 0 12px #f5b83de6}.board:not(.locked) .sq.target{cursor:pointer}.board.locked .sq{cursor:default}.coord{color:#1c0d02;pointer-events:none;z-index:2;font-size:clamp(9px,1.9vmin,12px);font-weight:800;line-height:1;position:absolute}.sq-corner .coord,.sq-throne .coord{color:#f4e3c4}.coord-rank{top:1px;left:2px}.coord-file{bottom:1px;right:2px}.sq.road-cut{background:linear-gradient(#e5484d52, #e5484d52), var(--wood)}.sq-corner.road-cut{background:linear-gradient(#e5484d73, #e5484d73), repeating-linear-gradient(45deg, #0000002e 0 3px, transparent 3px 7px), var(--wood-dark)}.sq.culprit:after{content:"";z-index:2;pointer-events:none;border:3px solid #e5484d;border-radius:50%;position:absolute;inset:6%;box-shadow:0 0 10px #e5484d99}.sq.hint .piece{box-shadow:0 0 0 3px var(--accent), 0 0 18px 4px #f5b83dbf}.board.mood-escaped .piece-attacker{opacity:.45;transition:opacity .6s ease-out}.sq.home{z-index:3;background:radial-gradient(circle,#ffd678f2 0%,#f59628d9 45%,#783c0ae6 100%);box-shadow:0 0 24px 6px #ffa028a6}.sq.home:before{display:none}@media (prefers-reduced-motion:no-preference){.sq.home{animation:1.4s cubic-bezier(.16,1,.3,1) homecoming}.sq.home .piece-king{animation:1.4s cubic-bezier(.16,1,.3,1) crowned}}@keyframes homecoming{0%{box-shadow:0 0 #ffa028e6}40%{box-shadow:0 0 46px 18px #ffa028bf}to{box-shadow:0 0 24px 6px #ffa028a6}}@keyframes crowned{0%{transform:scale(1)}35%{transform:scale(1.22)}to{transform:scale(1)}}.piece{z-index:1;pointer-events:none;border-radius:50%;grid-area:1/1;place-items:center;width:76%;height:76%;display:grid;position:relative}.piece-attacker{background:radial-gradient(circle at 35% 30%,#6c6c78 0%,#2a2a31 45%,#121216 100%);box-shadow:0 2px 3px #0000008c,inset 0 -2px 3px #0009,inset 0 0 0 1px #ffffff14}.piece-defender,.piece-king{background:radial-gradient(circle at 35% 30%,#fffdf6 0%,#efe3c8 45%,#c9b38a 100%);box-shadow:0 2px 3px #00000080,inset 0 -2px 3px #5a3c1473}.piece-king{color:#b07a12;width:86%;height:86%;box-shadow:0 2px 4px #0000008c, inset 0 -2px 3px #5a3c1473, 0 0 0 2px var(--accent)}.piece-king svg{width:62%;height:62%}.piece.captured{animation:.45s ease-in forwards captured}@keyframes captured{to{opacity:0;transform:scale(.4)}}.status-top{justify-content:space-between;align-items:center;gap:8px;display:flex}.prompt{margin:0;font-weight:700}.message{margin:8px 0 0;line-height:1.45}.prompt.bad{color:var(--bad)}.message,.legend,.result-line,.about p,.about li{text-wrap:pretty}.legend.nudge{color:var(--accent);font-weight:600}.legend{margin:6px 0 0;font-size:.85rem}.tries{gap:5px;display:flex}.try{width:26px;height:26px;color:var(--muted);background:radial-gradient(circle at 50% 50%, var(--bg-2) 52%, transparent 54%), conic-gradient(from 200deg, #5b5f68, #2b2d33, #8a8e98, #2b2d33, #5b5f68);border-radius:50%;place-items:center;font-size:.75rem;font-weight:700;display:grid;box-shadow:inset 0 1px 1px #ffffff26,0 1px 2px #00000080}.try svg{width:14px;height:14px}.try-current{color:var(--accent);background:radial-gradient(circle at 50% 50%, var(--bg-2) 52%, transparent 54%), conic-gradient(from 200deg, #f5b83d, #8a5a12, #ffd98a, #8a5a12, #f5b83d)}.try-lost{color:var(--bad)}.try-won{color:#6b4404;background:radial-gradient(circle at 35% 30%,#ffe3a1,#f5b83d 60%,#b9801c)}.moves-card h2{margin:0 0 6px;font-size:.95rem}.move-list{font-variant-numeric:tabular-nums;margin:0;padding-left:26px;line-height:1.7}.move-list li.empty{margin-left:-26px;font-size:.9rem;list-style:none}.mv{min-width:6.2em;display:inline-block}.mv-a{color:var(--muted)}.mv:before{content:"";vertical-align:.02em;border-radius:50%;width:.62em;height:.62em;margin-right:.4em;display:inline-block}.mv-d:before{background:radial-gradient(circle at 35% 30%,#fffdf6,#c9b38a)}.mv-a:before{background:radial-gradient(circle at 35% 30%,#8a8a96,#121216);box-shadow:0 0 0 1px #ffffff40}@media (width<=760px){.workspace.setting-up .side{order:-1}.moves-card{order:2}}.actions{flex-wrap:wrap;justify-content:center;gap:10px;margin-top:12px;display:flex}.btn{border:1px solid #0000;border-radius:999px;min-height:44px;padding:11px 22px;font-weight:700}.btn-primary{background:var(--accent);color:var(--accent-text)}.btn-primary:hover{filter:brightness(1.08)}.btn-ghost{border-color:var(--edge);background:0 0}.btn-ghost:hover{background:var(--bg-2)}.label{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:12px 0 6px;font-size:.75rem;font-weight:700}.choices{flex-direction:column;gap:8px;display:flex}.choice{text-align:left;background:var(--bg-2);border:1px solid var(--edge);border-radius:12px;align-items:center;gap:12px;padding:10px 12px;display:flex}.choice[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.choice-piece{flex-shrink:0;width:30px;height:30px}.choice-piece.piece-king:after{content:"";clip-path:polygon(0 100%,0 25%,25% 55%,50% 0,75% 55%,100% 25%,100% 100%);background:#b07a12;width:46%;height:46%}.choice-text{flex-direction:column;gap:2px;display:flex}.choice-text span{color:var(--muted);font-size:.85rem}.segmented{background:var(--bg-2);border:1px solid var(--edge);border-radius:999px;gap:3px;padding:3px;display:flex}.seg{min-height:40px;color:var(--muted);background:0 0;border:0;border-radius:999px;flex:1;padding:8px 0;font-weight:700}.seg[aria-pressed=true]{background:var(--accent);color:var(--accent-text)}.side-badge{color:var(--muted);white-space:nowrap;font-size:.78rem;font-weight:700}.btn-link{color:var(--accent);font:inherit;background:0 0;border:0;padding:0;text-decoration:underline}.btn.danger{border-color:var(--bad);color:var(--bad)}.btn:disabled{opacity:.45;cursor:default}.moves-card[hidden]{display:none}.move-list{max-height:260px;overflow-y:auto}.record-head{margin-top:18px!important}.record{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.record th,.record td{text-align:center;padding:4px 6px;font-size:.9rem}.record th[scope=row]{text-align:left;font-weight:600}.record thead th{color:var(--muted);font-size:.75rem}.result{text-align:center;flex-direction:column;align-items:center;gap:6px;display:flex}.result-top{flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;display:flex}.result h2{outline:none;margin:0;font-size:1.35rem}.result-line{margin:2px 0 0;line-height:1.45}.result.won h2{color:var(--accent)}.result .actions{margin-top:6px}.share-preview{white-space:pre-wrap;margin:4px 0 0;font-family:inherit;font-size:.95rem;line-height:1.4}.countdown{font-variant-numeric:tabular-nums;margin:4px 0 0}.finish-extras{flex-direction:column;gap:16px;margin-top:12px;display:flex}.finish-extras tg-more-games{display:block}.finish-ad{min-width:300px;margin:8px auto 0;display:block}.modal{background:var(--panel);width:min(480px,100vw - 32px);max-height:calc(100dvh - 48px);color:var(--text);border:1px solid var(--edge);border-radius:var(--radius);padding:18px 20px;overflow:auto}.modal::backdrop{background:#080502b8}.modal-head{justify-content:space-between;align-items:center;display:flex}.modal-head h2{margin:0}.modal p{line-height:1.5}.modal h2{outline:none}.modal .actions{margin-top:16px}.more-rules{border-top:1px solid var(--edge);margin:4px 0 0;padding-top:10px}.more-rules summary{cursor:pointer;color:var(--accent);align-items:center;min-height:32px;font-weight:700;display:flex}.more-rules ul{color:#ddd2bf;margin:6px 0 0;padding-left:20px;line-height:1.5}.more-rules li+li{margin-top:6px}::selection{color:#fff;background:#f5b83d59}.mini-fig{align-items:center;gap:14px;margin:8px 0 12px;display:flex}.mini{background:var(--wood-line);border-radius:6px;flex-shrink:0;gap:2px;padding:3px;display:grid}.mini .sq{width:28px;height:28px}.mini .sq-gone .piece{opacity:.35;outline:2px dashed var(--bad);outline-offset:1px}.mini-fig figcaption{color:var(--muted);font-size:.9rem}.stats-grid{text-align:center;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0 18px;display:grid}.stat strong{font-size:1.6rem;display:block}.stat span{color:var(--muted);font-size:.75rem}.modal h3{margin:0 0 8px;font-size:.95rem}.dist{flex-direction:column;gap:4px;display:flex}.dist-row{align-items:center;gap:8px;display:flex}.dist-n{text-align:right;font-variant-numeric:tabular-nums;width:18px}.dist-bar{background:var(--edge);text-align:right;border-radius:4px;min-width:22px;padding:1px 6px;font-size:.8rem;font-weight:700}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.about{color:#ddd2bf;max-width:68ch;margin:0 auto;padding:40px 16px 8px;line-height:1.6}.about h2{color:var(--text);margin:0 0 12px;scroll-margin-top:56px;font-size:1.35rem}.about h2:not(:first-child){margin-top:36px}.about h3{color:var(--text);margin:20px 0 4px;font-size:1.15rem}.about h3+p{margin-top:0}.about ul{padding-left:20px}.about li{margin-bottom:6px}.about strong{color:var(--text)}.noscript{text-align:center;padding:40px 16px}.status-card[hidden]{display:none}.taken{color:var(--muted);margin:6px 0 0;font-size:.88rem}
