:root{color-scheme:dark;--bg:#0d1422;--gold:#d7b879;--text:#f3eee6;--muted:#aab5c7;--red:#e99991}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% -15%,#334063 0,transparent 42%),var(--bg);color:var(--text);font:16px/1.48 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.shell{max-width:760px;margin:auto;padding:24px 16px calc(28px + env(safe-area-inset-bottom))}.brand{display:flex;align-items:center;gap:14px;margin-bottom:20px}.brand-title{min-width:0}.orb{display:grid;place-items:center;position:relative;flex:none;width:60px;height:60px;border-radius:50%;border:1px solid var(--gold);box-shadow:0 0 35px #d7b87955,inset 0 0 15px #d7b87933;color:var(--gold);font-size:30px}.orb-five{position:absolute;right:-6px;bottom:-6px;display:grid;place-items:center;width:23px;height:23px;border:1px solid var(--gold);border-radius:50%;background:var(--bg);color:var(--gold);font:700 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.eyebrow{letter-spacing:.2em;font-size:10px;color:var(--gold);font-weight:700}h1{font:44px/1 Georgia,serif;margin:0;color:#fff}.author-credit{color:var(--muted);font-size:11px;line-height:1.3;margin-top:5px;max-width:28ch}.badge{margin-left:auto;color:var(--gold);font-size:11px;text-align:right;max-width:90px}
.card{background:linear-gradient(160deg,#202d45,#152035);border:1px solid #39445b;border-radius:18px;padding:18px;margin:14px 0;box-shadow:0 14px 34px #0002}.card h2{font:25px/1.2 Georgia,serif;color:var(--gold);margin:0 0 12px}.card h3{font-size:15px;margin:0 0 8px}.muted,.hint{color:var(--muted)}.hint{font-size:13px}.notice{display:none;background:#27443c;border:1px solid #438871;border-radius:12px;padding:12px;margin:8px 0;white-space:pre-line}.notice.show{display:block}.notice.error{background:#49302f;border-color:#a56862}button{appearance:none;border:1px solid var(--gold);border-radius:12px;background:#b99757;color:#111827;padding:12px 16px;font:600 15px/1.2 inherit;cursor:pointer;min-height:46px}button:active{transform:scale(.98)}button.secondary{background:transparent;color:var(--gold)}button.danger{background:transparent;color:var(--red);border-color:#9c635f}.actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.actions>*{flex:1 1 auto}textarea,input{width:100%;border:1px solid #54617a;border-radius:12px;background:#0f192a;color:var(--text);padding:12px;font:inherit}textarea{min-height:100px;resize:vertical}textarea:focus,input:focus{border-color:var(--gold)}.player{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid #ffffff1c}.player .state{font-size:12px;color:var(--muted)}.die{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin:14px 0}.die button{padding:10px 0;font-size:19px}
.board-stage{position:relative;margin:18px 0;border:2px solid #a48854;border-radius:12px;overflow:hidden;box-shadow:0 0 25px #d7b87922;background:#142033}.board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));aspect-ratio:9/8;gap:1px}.square{position:relative;display:flex;align-items:flex-start;justify-content:flex-start;padding:3px;background:linear-gradient(145deg,#293650,#1a2940);border:1px solid #685e4b55;font-size:11px;color:#e1d8c3;overflow:visible}.square.arrow{background:linear-gradient(145deg,#49402e,#263344)}.square.snake{background:linear-gradient(145deg,#263f3d,#243345)}.square.here{box-shadow:inset 0 0 0 2px var(--gold);background:#59472c;color:#fff;font-weight:700}.board-links{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.board-link{fill:none;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 2px #000)}.board-link.arrow{stroke:#efd184;stroke-width:5;marker-end:url(#arrow-tip)}.board-link.snake{stroke:#72c3a0;stroke-width:7;stroke-dasharray:14 7}.board-link.active{stroke-width:10;filter:drop-shadow(0 0 10px currentColor)}.snake-head{fill:#a3e4bf;stroke:#133b32;stroke-width:2}.pawn{position:absolute;z-index:2;bottom:2px;right:2px;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;border:1px solid #fff;background:var(--pawn-color);color:#142033;font-size:10px;font-weight:800;box-shadow:0 1px 5px #000}.square .pawn:nth-of-type(2){right:19px}.square .pawn:nth-of-type(3){bottom:19px}.square .pawn:nth-of-type(4){right:19px;bottom:19px}.move-caption{margin:8px 0 0;color:#eed69a;font-size:14px}.celltext{white-space:pre-line}.journal-entry{padding:10px 0;border-top:1px solid #ffffff20;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.brand-bridge{border-top:1px solid #ffffff24;margin-top:18px;padding-top:14px;color:var(--muted);font-size:12px}.brand-bridge p{margin:0}.loading{color:var(--muted);text-align:center;padding:50px 0}a{color:#9ecbd3;word-break:break-all}footer{text-align:center;color:#76839a;font-size:11px;margin-top:26px}@media(max-width:390px){.shell{padding-left:11px;padding-right:11px}.badge{display:none}.card{padding:14px}.square{font-size:9px;padding:1px}.pawn{width:14px;height:14px;font-size:8px;bottom:0;right:0}.square .pawn:nth-of-type(2){right:12px}.square .pawn:nth-of-type(3){bottom:12px}.square .pawn:nth-of-type(4){right:12px;bottom:12px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.token-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.token-option{display:flex;flex-direction:column;align-items:center;justify-content:end;gap:4px;min-width:0;padding:5px 4px 9px;background:#15253b;color:var(--text);font-size:12px}.token-option.selected{border-width:2px;box-shadow:0 0 16px #d7b87966}.token-art{display:block;width:100%;aspect-ratio:3/4;background-image:url('/tokens.png');background-size:400% 100%;background-repeat:no-repeat}.token-ganesha{background-position:0 0}.token-lakshmi{background-position:33.333% 0}.token-saraswati{background-position:66.667% 0}.token-shiva{background-position:100% 0}.moment{position:fixed;z-index:50;inset:0;display:grid;place-items:center;padding:20px;background:#07101ce8;backdrop-filter:blur(5px)}.moment-scene{width:min(100%,330px);padding:18px;text-align:center;border:2px solid var(--gold);border-radius:24px;background:radial-gradient(circle at 50% 30%,#405377,#142033 65%);box-shadow:0 0 45px #d7b87955}.moment-scene .token-art{width:160px;margin:0 auto}.moment-scene h2{font:26px Georgia,serif;color:var(--gold);margin:7px 0}.moment-scene p{margin:5px 0 14px}.serpent-gate{height:72px;display:grid;place-items:center;border:2px solid #6eab91;border-bottom:0;border-radius:90px 90px 0 0;color:#87d4ae;font:32px Georgia,serif;animation:gate-open 1.2s ease-out both}.entry-moment .token-art{animation:enter-token 1.2s ease-out both}@keyframes gate-open{from{opacity:.4;transform:scaleX(.2)}to{opacity:1;transform:scaleX(1)}}@keyframes enter-token{from{opacity:0;transform:translateY(35px) scale(.7)}to{opacity:1;transform:translateY(0) scale(1)}}
.serpent-gate{position:relative;display:block;overflow:hidden;height:92px;margin:0 auto 8px;border:2px solid #9ebc91;border-bottom:4px solid var(--gold);border-radius:90px 90px 5px 5px;background:radial-gradient(circle at 50% 100%,#d5b47655,#102b2c 70%);animation:none}.gate-door{position:absolute;bottom:0;width:50%;height:78%;background:linear-gradient(90deg,#233631,#5b6145,#233631);border:2px solid #c7a868}.gate-door.left{left:0;transform-origin:left;animation:door-left 1.3s .3s ease-out forwards}.gate-door.right{right:0;transform-origin:right;animation:door-right 1.3s .3s ease-out forwards}.gate-snake{position:absolute;z-index:2;top:12px;font-size:34px;filter:drop-shadow(0 1px 3px #000)}.gate-snake.left{left:27%;animation:snake-left 1.3s ease-out forwards}.gate-snake.right{right:27%;transform:scaleX(-1);animation:snake-right 1.3s ease-out forwards}@keyframes door-left{to{transform:perspective(180px) rotateY(-72deg)}}@keyframes door-right{to{transform:perspective(180px) rotateY(72deg)}}@keyframes snake-left{to{left:0;transform:rotate(-25deg)}}@keyframes snake-right{to{right:0;transform:scaleX(-1) rotate(-25deg)}}@media(prefers-reduced-motion:reduce){.gate-door.left{transform:perspective(180px) rotateY(-72deg)}.gate-door.right{transform:perspective(180px) rotateY(72deg)}.gate-snake.left{left:0}.gate-snake.right{right:0}}
.square[role=button]{cursor:pointer}.square[role=button]:focus-visible{outline:3px solid #fff;outline-offset:-3px;z-index:3}.cell-detail{position:fixed;z-index:60;inset:0;display:grid;place-items:center;padding:18px;background:#07101ce8;backdrop-filter:blur(4px)}.cell-detail-panel{width:min(100%,480px);max-height:min(85vh,650px);overflow:auto;padding:22px;border:2px solid var(--gold);border-radius:20px;background:#1b2940;box-shadow:0 0 35px #0008}.cell-detail-panel .celltext{margin:0 0 18px;font-size:17px;line-height:1.55}.cell-detail-panel button{width:100%}

/* Illustrated board: original geometry and labels from the live ruleset. */
.board-stage{overflow-x:auto;overflow-y:hidden;touch-action:pan-x;border:5px solid #bd8d3e;border-radius:8px;background:#d6a84d;box-shadow:inset 0 0 0 2px #5d3c19,0 10px 30px #0006;scrollbar-color:#b58b4e #e7d5ac}
.board-plane{position:relative;width:810px;height:720px;margin:4px;background:#f2ead4}
.board{width:100%;height:100%;gap:0;aspect-ratio:auto}
.square{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;padding:5px 3px;background:radial-gradient(circle at 20% 18%,#f9f8ed 0,#ecf3ed 62%,#dde9e3 100%);border:1px solid #6d6145;color:#252d2a;text-align:center;font-weight:700;line-height:1.1;overflow:hidden}
.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8){background:radial-gradient(circle at 70% 70%,#f9f1df 0,#e6ecdf 100%)}
.square.arrow,.square.snake{background:radial-gradient(circle at 50% 40%,#faf2d6,#dfe9df)}
.square.here{background:#f6d98e;color:#20251e;box-shadow:inset 0 0 0 4px #b3742e}
.square-number{font:700 18px/1 Georgia,serif;position:relative;z-index:1;text-shadow:0 1px #fff}
.square-name{position:relative;z-index:1;max-width:100%;font:600 10px/1.1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow-wrap:anywhere;text-shadow:0 1px 2px #fff,1px 0 2px #fff,-1px 0 2px #fff}
.board-links{width:100%;height:100%}.board-link.arrow{stroke:#342c29;stroke-width:5;marker-end:url(#arrow-tip)}.snake-border{fill:none;stroke:#273f32;stroke-width:19;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(1px 2px 2px #0008)}.board-link.snake{stroke:#8dbd75;stroke-width:14;stroke-dasharray:none;filter:none}.board-link.snake.active{stroke:#e8d36a;stroke-width:17}.snake-head{fill:#90bc71;stroke:#254434;stroke-width:4;filter:drop-shadow(1px 2px 2px #0008)}
.pawn{z-index:3;width:26px;height:26px;font-size:13px;bottom:3px;right:3px;border:2px solid #fff}.square .pawn:nth-of-type(2){right:28px}.square .pawn:nth-of-type(3){bottom:28px}.square .pawn:nth-of-type(4){right:28px;bottom:28px}
.token-art{background-image:url('/tokens.webp');background-color:transparent}.token-option{background:#15253b}.moment-scene{max-height:90vh;overflow-y:auto}.moment-card{padding:14px;margin:12px 0!important;border:1px solid #d7b87966;border-radius:12px;background:#102033;text-align:left;font-size:15px;line-height:1.5}
.board-plane{width:100%;height:auto;aspect-ratio:9/8;margin:0}.board-stage.enlarged .board-plane{width:810px}.square-number{font-size:clamp(8px,2.2vw,18px)}.square-name{font-size:clamp(4px,1.2vw,10px)}.pawn{width:clamp(12px,3vw,26px);height:clamp(12px,3vw,26px);font-size:clamp(7px,1.5vw,13px)}.board-stage.enlarged .square-number{font-size:18px}.board-stage.enlarged .square-name{font-size:10px}.board-stage.enlarged .pawn{width:26px;height:26px;font-size:13px}.board-zoom{display:block;width:100%;margin:8px 0}

/* Original painted frame; the 72 cells and all routes stay generated from live game state. */
.board-stage{border:0;border-radius:3px;background:#192a32;box-shadow:0 12px 32px #0009}
.board-scene{position:relative;width:100%;aspect-ratio:1196/1315;background:#d8c090 url('/board-frame.webp') center/100% 100% no-repeat}
.board-stage.enlarged .board-scene{width:1196px}
.board-plane,.board-stage.enlarged .board-plane{position:absolute;left:21.2%;top:26.5%;width:57.8%;height:auto;aspect-ratio:9/8;margin:0;border:2px solid #68431b;background:#f7edcc;box-shadow:0 0 0 3px #e6bc62,0 2px 14px #24110a88}
.board{position:relative;z-index:0}
.square,.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8),.square.arrow,.square.snake{background:linear-gradient(135deg,#f9f4dfed,#e1e9d9e8);border:1px solid #66543c;color:#2d2d28}
.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8){background:linear-gradient(135deg,#f7edcfea,#e8ead9ed)}
.square-number,.square-name{z-index:2;text-shadow:0 1px 2px #fff,1px 0 2px #fff,-1px 0 2px #fff}
.board-links{z-index:1;overflow:visible}
.board-arrow,.board-snake{filter:drop-shadow(1px 2px 2px #25150ba8)}
.arrow-outline,.arrow-shaft,.snake-outline,.snake-body,.snake-scales{fill:none;stroke-linecap:round;stroke-linejoin:round}
.arrow-outline{stroke:#38251a;stroke-width:10}
.arrow-shaft{stroke:#d5a85a;stroke-width:5}
.arrow-head path,.arrow-feathers path:not(.feather-cut){fill:#4b2d1c;stroke:#d9af67;stroke-width:2}
.arrow-feathers .feather-cut{fill:none;stroke:#dfbf81;stroke-width:2}
.snake-outline{stroke:#203f33;stroke-width:25}
.snake-body{stroke:#699e65;stroke-width:20}
.board-snake:nth-of-type(3n) .snake-body{stroke:#b89958}
.board-snake:nth-of-type(4n) .snake-body{stroke:#598d89}
.snake-scales{stroke:#d5c578;stroke-width:5;stroke-dasharray:3 13;opacity:.8}
.snake-hood{fill:#73a66c;stroke:#244639;stroke-width:3}
.snake-jaw{fill:none;stroke:#244639;stroke-width:2}
.snake-eye{fill:#a82520;stroke:#fae7a8;stroke-width:1}
.snake-tongue{fill:none;stroke:#a6332d;stroke-width:2;stroke-linecap:round}
.board-arrow.active,.board-snake.active{filter:drop-shadow(0 0 10px #ffe075) drop-shadow(1px 2px 2px #25150b)}
.board-arrow.active .arrow-shaft{stroke:#ffe28b;stroke-width:7}
.board-snake.active .snake-body{stroke:#e2cf65;stroke-width:22}
.board-stage.enlarged .square-number{font-size:18px}.board-stage.enlarged .square-name{font-size:10px}.board-stage.enlarged .pawn{width:26px;height:26px;font-size:13px}
@media(max-width:600px){
  .board-scene{background-size:135% 135%}
  .board-plane,.board-stage.enlarged .board-plane{left:11.1%;top:18.3%;width:78%}
}

/* The painting and routes sit below the readable grid labels. */
.board-plane,.board-stage.enlarged .board-plane{background:#f0e3c8 url('/board-surface.webp') center/cover no-repeat}
.board-links{z-index:1}
.board{z-index:2}
.square,.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8),.square.arrow,.square.snake{background:#fff9e138;border-color:#604e3699}
.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8){background:#fff2d52b}
.square.here,.square.here:nth-child(9n+2),.square.here:nth-child(9n+5),.square.here:nth-child(9n+8){background:#f1cf70b8;box-shadow:inset 0 0 0 3px #a86e22}
.square-number,.square-name{z-index:3;text-shadow:0 1px 3px #fff,1px 0 3px #fff,-1px 0 3px #fff}
.board-arrow{opacity:.83;filter:none}
.arrow-outline{stroke:#3a2c26;stroke-width:6}
.arrow-shaft{stroke:#c49a57;stroke-width:2.5}
.board-snake{--snake-body:#5b8f78;opacity:.9;filter:drop-shadow(1px 1px 1px #30231e66)}
.board-snake.variant-1{--snake-body:#a78649}
.board-snake.variant-2{--snake-body:#668e68}
.board-snake.variant-3{--snake-body:#567b83}
.snake-outline{stroke:#30463d;stroke-width:18}
.snake-body,.board-snake:nth-of-type(3n) .snake-body,.board-snake:nth-of-type(4n) .snake-body{stroke:var(--snake-body);stroke-width:14}
.snake-scales{stroke:#e1cc8f;stroke-width:2.5;stroke-dasharray:2 9;opacity:.7}
.snake-hood{fill:var(--snake-body);stroke:#30463d;stroke-width:2.5}
.snake-eye{fill:#7f271d;stroke:#ffe8a8;stroke-width:1}
.board-snake.active .snake-body{stroke:#e0c56c;stroke-width:16}
.chakra-mark{position:absolute;z-index:1;left:18%;top:20%;width:64%;height:64%;overflow:visible;opacity:.75;pointer-events:none;--chakra:#be5d45}
.chakra-1{--chakra:#d18342}.chakra-2{--chakra:#c4a64b}.chakra-3{--chakra:#5e9e75}.chakra-4{--chakra:#4f8f9c}.chakra-5{--chakra:#536da8}.chakra-6{--chakra:#8e74a7}.chakra-7{--chakra:#c1a968}

.chakra-petal{fill:var(--chakra);stroke:#6f523870;stroke-width:2}
.chakra-ring{fill:#f9edc5bf;stroke:var(--chakra);stroke-width:7}
.chakra-core{fill:var(--chakra);opacity:.75}
.chakra-glyph{fill:none;stroke:#fff9e8;stroke-width:5;stroke-linejoin:round}
.square,.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8),.square.arrow,.square.snake{background:#fff9e10c}
.square:nth-child(9n+2),.square:nth-child(9n+5),.square:nth-child(9n+8){background:#fff2d50a}
.board-snake{opacity:1}
.snake-outline{stroke-width:23}
.snake-body,.board-snake:nth-of-type(3n) .snake-body,.board-snake:nth-of-type(4n) .snake-body{stroke-width:18}
.snake-scales{stroke-width:3.5}
.chakra-mark{left:5%;top:13%;width:90%;height:80%;opacity:1;filter:drop-shadow(0 1px 1px #47331d66)}
.chakra-cell .square-number{align-self:flex-start;background:#fff8e9c9;border-radius:50%;padding:0 2px}
.chakra-cell .square-name{position:absolute;left:1px;right:1px;bottom:1px;background:#fff9e9ca;border-radius:3px}
.board-snake{--snake-body:#3b8067;filter:drop-shadow(1px 2px 1px #2719109c)}
.board-snake.variant-1{--snake-body:#9b7135}.board-snake.variant-2{--snake-body:#5a8660}.board-snake.variant-3{--snake-body:#3e7180}
.snake-outline{stroke:#203a30;stroke-width:24}
.snake-body,.board-snake:nth-of-type(3n) .snake-body,.board-snake:nth-of-type(4n) .snake-body{stroke-width:19}
.snake-scales{stroke:#f1d58a;stroke-width:4;opacity:.9}
.arrow-outline{stroke:#33251e;stroke-width:8}
.arrow-shaft{stroke:#c9964b;stroke-width:3}
.chakra-mark{filter:drop-shadow(0 1px 2px #432516a6)}
.chakra-petal{stroke:#684022;stroke-width:4}
.board-snake .snake-body,.board-snake:nth-of-type(3n) .snake-body,.board-snake:nth-of-type(4n) .snake-body{fill:var(--snake-body);stroke:#203a30;stroke-width:3;stroke-linejoin:round}
.board-snake .snake-scales{fill:none;stroke:#e9ca82;stroke-width:4;stroke-dasharray:3 14;stroke-linecap:round;opacity:.95}
.board-snake.active .snake-body{fill:#dfc46e;stroke-width:4}
.snake-scale{fill:none;stroke:#dcc48d;stroke-width:2.3;stroke-linecap:round;opacity:.85}
.snake-brow,.snake-fang{fill:none;stroke:#243e35;stroke-width:2;stroke-linecap:round}
.board-scene{aspect-ratio:1196/1120}
.board-plane,.board-stage.enlarged .board-plane{top:22%}
@media(max-width:600px){.board-plane,.board-stage.enlarged .board-plane{top:12.2%}}
.snake-head-art{filter:brightness(1.22) saturate(1.18) drop-shadow(1px 2px 2px #24150dc0)}
