/* v0.1.6 correctness + motion fixes */
.sidebar nav{overflow-y:auto!important;overflow-x:hidden!important;padding-right:5px;scrollbar-gutter:stable}
.nav{max-width:100%;box-sizing:border-box}.nav:hover{transform:translateX(1px)}
.status-offline{border-color:#56616b;color:#87939d;background:#111820}

/* Correct 9x9 go geometry: 9 lines, 8 equal gaps, stones on intersections. */
.go-board-pro{position:relative!important;width:380px!important;height:380px!important;aspect-ratio:auto!important;box-sizing:border-box!important;padding:0!important;background:#d5a45f!important;border:10px solid #6d4828!important;box-shadow:6px 6px 0 #070a0e!important;overflow:hidden!important}
.go-board-pro:before{content:"";position:absolute;left:22px;top:22px;width:336px;height:336px;background-image:linear-gradient(to right,#553a20 1.5px,transparent 1.5px),linear-gradient(to bottom,#553a20 1.5px,transparent 1.5px);background-size:42px 42px;border-right:1.5px solid #553a20;border-bottom:1.5px solid #553a20;pointer-events:none}
.go-board-pro .go-lines{display:none!important}
.go-board-pro>.go-intersection{position:absolute!important;width:34px!important;height:34px!important;margin:0!important;padding:0!important;transform:none!important;background:transparent!important;border:0!important;box-shadow:none!important;z-index:4}
.go-board-pro>.go-intersection:hover{background:rgba(255,235,184,.14)!important;border-radius:50%;transform:none!important}
.go-board-pro>.go-star{position:absolute!important;width:8px!important;height:8px!important;margin:0!important;transform:none!important;border-radius:50%;background:#54381d;z-index:2}
.go-board-pro .go-stone{position:absolute!important;inset:2px!important}
@media(max-width:520px){.go-board-pro{transform:scale(.84);transform-origin:top left;margin-right:-61px;margin-bottom:-61px}}

/* Strongly separated international-chess pieces. */
.ccell{position:relative;display:grid;place-items:center;overflow:visible}
.chpiece{width:100%;height:100%;display:grid;place-items:center;font-family:"Segoe UI Symbol","Noto Sans Symbols 2",serif;font-size:40px;line-height:1;position:relative;z-index:2;will-change:transform}
.chpiece.white{color:#fff8dc;text-shadow:-1px -1px 0 #26313b,1px -1px 0 #26313b,-1px 1px 0 #26313b,1px 1px 0 #26313b,0 3px 3px #0007}
.chpiece.black{color:#171b20;text-shadow:-1px -1px 0 #d6d9d7,1px -1px 0 #d6d9d7,-1px 1px 0 #d6d9d7,1px 1px 0 #d6d9d7,0 3px 3px #0007}
@media(max-width:760px){.chpiece{font-size:34px}}

/* Real piece translation instead of destination pop-in. */
.move-slide{animation:boardPieceSlide 360ms cubic-bezier(.2,.82,.25,1) both!important}
@keyframes boardPieceSlide{from{transform:translate(var(--move-x),var(--move-y)) scale(.98);filter:brightness(1.15)}to{transform:translate(0,0) scale(1);filter:none}}
.xpoint.last-move .xpiece.move-slide,.ccell.last-move .chpiece.move-slide{animation:boardPieceSlide 360ms cubic-bezier(.2,.82,.25,1) both!important}

/* Four-player play/discard motion. */
.play-flight{will-change:transform,opacity;z-index:5!important}
.play-flight.from-top{animation:cardFromTop 420ms var(--ease-ios) both}
.play-flight.from-bottom{animation:cardFromBottom 420ms var(--ease-ios) both}
.play-flight.from-left{animation:cardFromLeft 420ms var(--ease-ios) both}
.play-flight.from-right{animation:cardFromRight 420ms var(--ease-ios) both}
@keyframes cardFromTop{from{transform:translate(-50%,-150px) scale(.72);opacity:.2}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
@keyframes cardFromBottom{from{transform:translate(-50%,150px) scale(.72);opacity:.2}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
@keyframes cardFromLeft{from{transform:translate(-220px,-50%) scale(.72);opacity:.2}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
@keyframes cardFromRight{from{transform:translate(120px,-50%) scale(.72);opacity:.2}to{transform:translate(-50%,-50%) scale(1);opacity:1}}

.mj-discard-flight{position:absolute;left:50%;top:50%;z-index:9;pointer-events:none;transform:translate(-50%,-50%)}
.mj-discard-flight.from-top{animation:mjFromTop 430ms var(--ease-ios) both}.mj-discard-flight.from-bottom{animation:mjFromBottom 430ms var(--ease-ios) both}.mj-discard-flight.from-left{animation:mjFromLeft 430ms var(--ease-ios) both}.mj-discard-flight.from-right{animation:mjFromRight 430ms var(--ease-ios) both}
@keyframes mjFromTop{0%{transform:translate(-50%,-250px) rotate(180deg);opacity:.35}75%{opacity:1}100%{transform:translate(-50%,-50%);opacity:0}}
@keyframes mjFromBottom{0%{transform:translate(-50%,250px);opacity:.35}75%{opacity:1}100%{transform:translate(-50%,-50%);opacity:0}}
@keyframes mjFromLeft{0%{transform:translate(-330px,-50%) rotate(90deg);opacity:.35}75%{opacity:1}100%{transform:translate(-50%,-50%);opacity:0}}
@keyframes mjFromRight{0%{transform:translate(230px,-50%) rotate(-90deg);opacity:.35}75%{opacity:1}100%{transform:translate(-50%,-50%);opacity:0}}


/* v0.1.6: stable Go board. 9x9 CSS grid; every stone is centered on a line intersection. */
.go-board-pro.go-grid-board{display:grid!important;grid-template-columns:repeat(9,42px)!important;grid-template-rows:repeat(9,42px)!important;width:max-content!important;height:max-content!important;aspect-ratio:auto!important;padding:16px!important;background:#d5a45f!important;border:10px solid #6d4828!important;overflow:visible!important;transform:none!important;margin:0!important;box-sizing:content-box!important}
.go-board-pro.go-grid-board:before{display:none!important}
.go-grid-point{position:relative!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:linear-gradient(to right,transparent calc(50% - 1px),#553a20 calc(50% - 1px),#553a20 calc(50% + 1px),transparent calc(50% + 1px)),linear-gradient(to bottom,transparent calc(50% - 1px),#553a20 calc(50% - 1px),#553a20 calc(50% + 1px),transparent calc(50% + 1px))!important;overflow:visible;z-index:1}
.go-grid-point:hover{transform:none!important;background:linear-gradient(to right,transparent calc(50% - 1px),#553a20 calc(50% - 1px),#553a20 calc(50% + 1px),transparent calc(50% + 1px)),linear-gradient(to bottom,transparent calc(50% - 1px),#553a20 calc(50% - 1px),#553a20 calc(50% + 1px),transparent calc(50% + 1px)),radial-gradient(circle at center,#ffe9a544 0 14px,transparent 15px)!important}
.go-grid-point .go-star-dot{position:absolute;width:7px;height:7px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%;background:#553a20;z-index:1}
.go-grid-point .go-stone{position:absolute!important;width:34px!important;height:34px!important;left:4px!important;top:4px!important;inset:auto!important;z-index:3}
.go-grid-point.last-move .go-stone{animation:pieceLand 260ms var(--ease-ios) both}
@media(max-width:520px){.go-board-pro.go-grid-board{transform:scale(.82)!important;transform-origin:top left!important;margin-right:-82px!important;margin-bottom:-82px!important}}

/* v0.1.6 sidebar/chess polish */
.sidebar nav{min-width:0;width:100%;overflow-x:hidden!important;overscroll-behavior:contain}
.nav{width:100%;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.chpiece.white{color:#fff3cf!important;text-shadow:-1px -1px 0 #4a3d2f,1px -1px 0 #4a3d2f,-1px 1px 0 #4a3d2f,1px 1px 0 #4a3d2f,0 3px 4px #0008!important;filter:drop-shadow(0 1px 0 #fff8)}
.chpiece.black{color:#101316!important;text-shadow:-1px -1px 0 #eef1e9,1px -1px 0 #eef1e9,-1px 1px 0 #eef1e9,1px 1px 0 #eef1e9,0 3px 4px #0009!important}

/* v0.1.6 — Go shares Gomoku geometry; Mahjong/UNO interaction refresh */
.go-gomoku-board{width:308px;height:308px}
.go-gomoku-board:before{width:272px;height:272px;background-size:34px 34px}
.go-gomoku-board .gpoint{transition:transform .16s cubic-bezier(.2,.8,.2,1),background .16s ease}
.go-gomoku-board .gpoint:hover{background:rgba(255,235,184,.2)}
.go-legend{max-width:660px;color:var(--muted);font-size:12px;text-align:center;line-height:1.7}
@media(max-width:650px){.go-gomoku-board{transform:scale(.92);transform-origin:top left;margin-right:-25px;margin-bottom:-25px}}

.uno-current-color{justify-self:center;min-width:180px;display:grid;grid-template-columns:auto auto;gap:2px 10px;align-items:center;padding:8px 14px;border:2px solid #ffffff44;border-radius:14px;box-shadow:0 5px 15px #0005;color:#fff;transition:background .2s ease,box-shadow .2s ease}.uno-current-color span{font-size:11px;opacity:.78}.uno-current-color b{font-size:18px}.uno-current-color small{grid-column:1/-1;opacity:.82}.uno-current-color.c-R{background:#b93245}.uno-current-color.c-Y{background:#a38318}.uno-current-color.c-G{background:#237a42}.uno-current-color.c-B{background:#286ca8}.uno-current-color.c-W{background:#555}
.uno-color-picker{width:min(520px,96%);justify-self:center;padding:14px;border:2px solid #52677c;background:#111c27;border-radius:16px;box-shadow:0 14px 30px #0008;display:grid;gap:10px;animation:panelIn .18s ease}.uno-color-options{display:grid;grid-template-columns:repeat(4,1fr) auto;gap:8px}.uno-color-choice{min-width:72px;height:62px;display:grid;place-items:center;gap:3px;color:#fff;border:2px solid #ffffff55}.uno-color-choice i{display:block;width:24px;height:24px;border-radius:50%;background:#fff6;box-shadow:inset 0 0 0 2px #fff8}.uno-color-choice.c-R{background:#b93245}.uno-color-choice.c-Y{background:#a38318}.uno-color-choice.c-G{background:#237a42}.uno-color-choice.c-B{background:#286ca8}
@media(max-width:600px){.uno-color-options{grid-template-columns:repeat(2,1fr)}.uno-color-options>[data-uno-color-cancel]{grid-column:1/-1}}

/* Original riichi tile skin. Layout follows standard four-player digital table geometry without copying third-party art assets. */
.mahjong-area{--mj-tile-w:40px;--mj-tile-h:56px;--mj-river-w:29px;--mj-river-h:40px}
.mj-table-scroll{overflow:auto;padding:4px;overscroll-behavior:contain}
.mahjong-table-v2{position:relative;width:760px;height:680px;margin:0 auto;background:radial-gradient(circle at 50% 44%,#237b65 0,#176653 52%,#0e4b3f 100%);border:12px solid #513d2e;border-radius:20px;box-shadow:inset 0 0 0 3px #b79562,inset 0 0 45px #001b1688,8px 10px 0 #080b0e;overflow:hidden}
.mj-tile{position:relative;display:inline-grid;place-items:center;width:var(--mj-tile-w);height:var(--mj-tile-h);min-width:0!important;min-height:0!important;padding:2px!important;border:1px solid #b9b4a9!important;border-radius:4px 4px 6px 6px;background:linear-gradient(105deg,#fffdf4,#eee8d9 68%,#d7cfbb)!important;color:#1b232a!important;box-shadow:inset -3px -3px 0 #cbc2ad,inset 1px 1px 0 #fff,1px 2px 2px #0008;box-sizing:border-box;overflow:hidden;vertical-align:bottom;flex:0 0 auto}
.mj-tile.aka{background:linear-gradient(105deg,#fff8ed,#efe1ce)!important}.mj-tile.back,.mj-back{background:linear-gradient(135deg,#6cc8ad,#277b67 68%,#175748)!important;border:2px solid #e5dcc9!important;box-shadow:inset 0 0 0 2px #1b6656,1px 2px 2px #0009}.mj-tile.back:after,.mj-back:after{content:"";position:absolute;inset:7px;border:1px solid #a9e0cd77;border-radius:3px;background:repeating-linear-gradient(45deg,#ffffff10 0 3px,transparent 3px 6px)}
.mj-corner{position:absolute;left:3px;top:1px;font:700 9px/1 Arial,sans-serif;color:#27323b}.mj-man-num{font:800 24px/1 "Noto Serif CJK SC","Songti SC",serif;color:#182a52;margin-top:-5px}.mj-man-num.red-five{color:#c53442}.mj-man-mark{font:800 16px/1 "Noto Serif CJK SC","Songti SC",serif;color:#b42c35;margin-top:-10px}.mj-pips{width:27px;height:36px;display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;place-items:center;align-content:center;gap:1px}.mj-pips i{width:7px;height:7px;border-radius:50%;background:radial-gradient(circle,#f8e3c0 18%,#236ca6 22% 52%,#173855 56%);box-shadow:0 0 0 1px #1e5274}.mj-pips i:nth-child(3n){background:radial-gradient(circle,#f8e3c0 18%,#c63c43 22% 52%,#72252a 56%)}.mj-pips.p1 i{width:15px;height:15px;background:radial-gradient(circle,#efe4b8 12%,#ca303a 15% 29%,#f4d776 32% 42%,#276b58 45% 62%,#163d32 65%)}
.mj-sou{width:28px;min-height:36px;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:1px}.mj-sou i{display:block;width:5px;height:13px;border-radius:55% 55% 35% 35%;background:linear-gradient(#58ac69,#1e683d);box-shadow:inset 0 0 0 1px #0d4527}.mj-sou i:nth-child(3n){background:linear-gradient(#d85a55,#9b292d)}.mj-sou.red-five i{filter:saturate(1.5)}
.mj-honor{font:900 29px/1 "Noto Serif CJK SC","Songti SC",serif}.mj-honor.h31,.mj-honor.h32{color:#225f3b}.mj-honor.h33{color:#c52d38}.mj-honor.h27,.mj-honor.h28,.mj-honor.h29,.mj-honor.h30{color:#1e2730}.mj-honor i{display:block;width:21px;height:29px;border:2px solid #4e7ca3;border-radius:2px}
.mj-tile.river-tile{width:var(--mj-river-w);height:var(--mj-river-h)}.mj-tile.river-tile .mj-man-num{font-size:18px}.mj-tile.river-tile .mj-man-mark{font-size:11px}.mj-tile.river-tile .mj-honor{font-size:21px}.mj-tile.river-tile .mj-pips{transform:scale(.72)}.mj-tile.river-tile .mj-sou{transform:scale(.72)}.mj-tile.river-last{box-shadow:0 0 0 3px #ffd45d,0 0 12px #ffd45daa!important}.mj-tile.riichi{transform:rotate(90deg);margin-left:6px;margin-right:6px}
.mj-seat-badge{position:absolute;z-index:8;min-width:120px;padding:5px 8px;background:#071d1a99;border:1px solid #9fd0bb55;border-radius:8px;color:#e7f6ef;display:grid;grid-template-columns:auto 1fr;gap:1px 6px;backdrop-filter:blur(3px)}.mj-seat-badge b{font-size:18px;color:#f4d989}.mj-seat-badge span{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mj-seat-badge small{grid-column:1/-1;color:#c3d8cf}.mj-seat-badge.turn{box-shadow:0 0 0 2px #f7d467,0 0 18px #f7d46766}.mj-seat-badge.top{top:6px;left:50%;transform:translateX(-50%)}.mj-seat-badge.bottom{bottom:82px;left:50%;transform:translateX(-50%)}.mj-seat-badge.left{left:6px;top:50%;transform:translateY(-50%)}.mj-seat-badge.right{right:6px;top:50%;transform:translateY(-50%)}
.mj-hidden-hand{position:absolute;z-index:4;display:flex;gap:1px}.mj-hidden-hand .mj-back{position:relative;display:block;width:31px;height:45px;border-radius:3px}.mj-hidden-hand.top{top:58px;left:50%;transform:translateX(-50%) rotate(180deg)}.mj-hidden-hand.left{left:40px;top:50%;transform:translate(-50%,-50%) rotate(90deg)}.mj-hidden-hand.right{right:40px;top:50%;transform:translate(50%,-50%) rotate(-90deg)}
.mj-center-v2{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);width:142px;height:126px;z-index:3;border:2px solid #d2c6a7;background:linear-gradient(#202c32,#121a1f);color:#eef2ef;display:grid;place-items:center;align-content:center;gap:3px;box-shadow:0 5px 15px #0008}.mj-center-v2>b{font-size:22px;color:#f1d075}.mj-center-v2 span,.mj-center-v2 small{font-size:11px;color:#bdc9ca}.mj-dora-v2{display:flex;align-items:center;gap:2px;margin-top:4px}.mj-dora-v2 label{font-size:9px;color:#e6d49c}.mj-dora-v2 .mj-tile{width:22px;height:31px}.mj-dora-v2 .mj-tile>*{transform:scale(.6)}
.mj-river-zone{position:absolute;z-index:2;width:184px;height:126px;display:grid;place-items:center}.mj-river-zone.bottom{left:50%;top:57%;transform:translate(-50%,0)}.mj-river-zone.top{left:50%;top:28%;transform:translate(-50%,-100%) rotate(180deg)}.mj-river-zone.left{left:29%;top:44%;transform:translate(-100%,-50%) rotate(90deg)}.mj-river-zone.right{left:71%;top:44%;transform:translate(0,-50%) rotate(-90deg)}.mj-river-grid{display:grid;grid-template-columns:repeat(6,var(--mj-river-w));grid-auto-rows:var(--mj-river-h);gap:1px;align-content:start;justify-content:center}.mj-called-gap{width:var(--mj-river-w);height:var(--mj-river-h);display:block;opacity:.18;border:1px dashed #b6d2c377}
.mj-meld-zone{position:absolute;z-index:5;display:flex;gap:4px;align-items:flex-end}.mj-meld-zone.bottom{right:14px;bottom:14px}.mj-meld-zone.top{left:14px;top:14px;transform:rotate(180deg)}.mj-meld-zone.left{left:13px;bottom:100px;transform-origin:left bottom;transform:rotate(90deg)}.mj-meld-zone.right{right:13px;top:100px;transform-origin:right top;transform:rotate(-90deg)}.mj-meld{display:flex;align-items:flex-end;gap:1px}.mj-meld .mj-tile{width:30px;height:43px}.mj-meld .mj-tile.called{transform:rotate(90deg);margin:0 7px}.mj-meld.ankan .mj-tile.back{filter:brightness(.8)}
.mj-own-hand-zone{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);z-index:7;width:660px;display:grid;justify-items:center;gap:3px}.mj-own-label{font-size:11px;color:#e4eee9;text-shadow:0 1px 2px #000}.mj-hand-v2{display:flex;align-items:flex-end;justify-content:center;gap:1px;min-height:62px}.mj-own{border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;transition:transform .14s ease}.mj-own:hover{transform:translateY(-7px)!important}.mj-own.riichi-able .mj-tile{box-shadow:0 0 0 3px #f2cc5b,0 0 12px #f2cc5b88}.mj-own.drawn{margin-left:7px}
.mj-reactions{position:sticky;bottom:6px;z-index:12;display:flex;gap:7px;flex-wrap:wrap;align-items:center;justify-content:center;padding:10px;border:2px solid #d4bd75;background:#101c24ee;box-shadow:0 7px 20px #0009}.mj-reactions button{min-width:72px}.mj-actions{justify-content:center}.mj-result{border:2px solid #d7bd72;background:#15231e;padding:12px;box-shadow:4px 4px #070a0e}.mj-rule-note{color:var(--muted);font-size:11px;line-height:1.6;text-align:center}.mj-discard-flight{position:fixed;z-index:60;pointer-events:none;animation:mjFly .48s cubic-bezier(.2,.8,.2,1) both}@keyframes mjFly{0%{opacity:.1;transform:translate(var(--fx,0),var(--fy,0)) scale(1.45)}100%{opacity:1;transform:translate(0,0) scale(.82)}}
@media(max-width:820px){.mj-table-scroll{width:100%}.mahjong-table-v2{transform-origin:top left;transform:scale(.78);margin-right:-167px;margin-bottom:-150px}.mahjong-area{--mj-tile-w:38px;--mj-tile-h:53px}}
@media(max-width:610px){.mahjong-table-v2{transform:scale(.61);margin-right:-300px;margin-bottom:-265px}.mj-reactions{position:relative;bottom:auto}}
.device-link-result{margin-top:10px}.device-link-code{display:inline-block;max-width:100%;overflow-wrap:anywhere;padding:10px 13px;border:2px dashed #75d7a1;background:#0b2118;color:#b9f7d0;font:700 14px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px}.music-account-form{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}.music-account-form input{min-width:0}.ok-text{color:#86e5a6}@media(max-width:680px){.music-account-form{grid-template-columns:1fr}.music-account-form button{width:100%}}
/* v0.1.6 riichi river/meld polish: preserve full tiles and show called/added-kan orientation clearly. */
.mj-river-cell{position:relative;width:var(--mj-river-w);height:var(--mj-river-h);display:grid;place-items:center;overflow:visible}
.mj-river-cell .mj-tile.river-tile{position:relative;margin:0;transform-origin:center;overflow:hidden}
.mj-river-cell.riichi-cell{overflow:visible}
.mj-river-cell.riichi-cell .mj-tile.river-tile{transform:rotate(90deg);z-index:2}
.mj-river-cell.called-gap{opacity:.22;border:1px dashed #b6d2c377;box-sizing:border-box}
.mj-river-cell.called-gap i{width:6px;height:6px;border-radius:50%;background:#d7eadf55}
.mj-called-stack{position:relative;display:inline-grid;place-items:end center;width:44px;height:49px;vertical-align:bottom;overflow:visible}
.mj-called-stack>.mj-tile.called{position:absolute;left:6px;bottom:5px}
.mj-called-stack>.mj-tile.added{position:absolute;left:7px;bottom:20px;transform:rotate(90deg);z-index:2;box-shadow:0 2px 5px #0008}
.mj-meld.added-kan{align-items:flex-end;min-height:50px}


/* v0.2.4 chip administration */
.chip-rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:12px 0}.chip-rule-grid label{display:grid;gap:6px}.chip-user-list{display:grid;gap:8px}.chip-user-list .admin-row{align-items:center}.chip-user-list input{max-width:160px}

/* v0.2.5 poker buy-in */
.poker-buyin{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0;padding:10px 12px;border:1px solid var(--line2);border-radius:14px;background:rgba(255,255,255,.025)}
.poker-buyin>div:first-child{min-width:220px;flex:1}.poker-buyin label{display:flex;align-items:center;gap:6px}.poker-buyin input{width:120px}
@media(max-width:700px){.poker-buyin{align-items:stretch}.poker-buyin>div:first-child{min-width:100%}.poker-buyin label{justify-content:space-between}.poker-buyin input{width:46%}.poker-buyin .game-toolbar{width:100%;display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.poker-buyin .game-toolbar button{min-width:0}}
