:root{font-family:ui-rounded,'Pretendard','Noto Sans KR',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#292c32;background:#fff;font-synthesis:none;font-size:16px;--ink:#292c32;--muted:#8b8d95;--line:#eeeff1;--accent:#39745c;--tint:#f3f7f5}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;background:none;color:inherit}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #5a967c;outline-offset:4px}a{color:inherit;text-decoration:none}button,input{transition:background .15s,border-color .15s,opacity .15s}input{min-width:0;border:1px solid #e3e5e7;background:#fff;border-radius:12px;padding:14px;width:100%;color:var(--ink)}input:focus{outline:0;border-color:#648d7c;box-shadow:0 0 0 3px #eaf2ed}input::placeholder{color:#a0a2a8}button:hover:not(:disabled){filter:brightness(.96)}[hidden]{display:none!important}.header{height:88px;max-width:1240px;padding:0 40px;margin:auto;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;font-weight:800;font-size:27px;letter-spacing:-1.3px}.brand-period{color:#e7a86d}.brand-mark{position:relative;display:flex;margin-right:11px}.brand-mark i{width:17px;height:17px;background:#89b39c;border-radius:50%;border:2px solid white}.brand-mark i+i{background:#efbe89;margin-left:-5px;transform:translateY(5px)}.header-right{display:flex;gap:22px;align-items:center}.connection{font-size:12px;color:#6f7974;display:flex;gap:7px;align-items:center}.connection:before,.live-dot{content:'';width:6px;height:6px;background:#70a086;border-radius:50%;display:inline-block}.connection.offline:before{background:#d79850}.icon-button{border:1px solid #e5e6e8;border-radius:50%;width:32px;height:32px;font-size:17px;display:grid;place-items:center}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2.2px;color:#93969c}.lobby{max-width:1120px;margin:76px auto 90px;display:grid;grid-template-columns:1.15fr 1fr;gap:100px;padding:0 28px}.intro{padding-top:35px}.intro h1{font-size:clamp(36px,4vw,52px);line-height:1.35;letter-spacing:-2.4px;margin:21px 0}.intro h1 span{color:#e8ae75}.intro>p{color:#858992;line-height:1.85;font-size:16px}.hero-friends{height:210px;position:relative;display:flex;align-items:flex-end;margin:24px 0 12px}.animal{background-image:url('/assets/animals.png');background-size:400% 400%;background-position:calc(var(--col)*100%/3) calc(var(--row)*100%/3);background-repeat:no-repeat;display:block;flex-shrink:0;pointer-events:none}.hero-friends .animal{width:170px;height:170px;position:absolute;bottom:0}.hero-dog{left:-12px;transform:rotate(-8deg);z-index:2}.hero-rabbit{left:123px;bottom:14px!important;transform:rotate(5deg)}.hero-hamster{left:250px;transform:rotate(8deg);width:145px!important;height:145px!important}.intro-meta{display:flex;gap:20px;font-size:12px;color:#83868e;margin-top:30px}.intro-meta span+span:before{content:'·';margin-right:20px;color:#c7c9cc}.lobby-panel{border:1px solid var(--line);border-radius:24px;padding:32px;align-self:start;box-shadow:0 8px 30px #182a2310}.panel-top h2{font-size:24px;letter-spacing:-1px;margin:11px 0}.panel-top p{font-size:14px;color:#90939a;margin:0 0 26px}.lobby-panel label:not(.check){display:block;font-size:14px;font-weight:600;margin:20px 0 9px}.optional{font-weight:400;color:#a0a2a8;margin-left:5px;font-size:12px}.check{display:flex;align-items:center;gap:9px;font-size:12px;color:#81858e;margin:18px 0 24px;cursor:pointer}.check input{width:16px;height:16px;accent-color:var(--accent);margin:0}.primary{background:var(--ink);color:#fff;padding:14px 22px;border-radius:12px;font-weight:650;min-height:48px}.secondary{border:1px solid #e3e5e8;background:#fff;padding:12px 17px;border-radius:12px;min-height:44px;font-size:14px}.wide{width:100%;display:flex;align-items:center;justify-content:center;gap:20px;margin-top:12px}.wide span{margin-left:auto;font-size:20px}.small{padding:9px 13px;min-height:38px}.text-button{color:#838790;font-size:12px;padding:10px 4px;min-height:38px}.form-error,.chat-error{color:#bc5960;font-size:13px;line-height:1.5;min-height:0}.form-error:empty,.chat-error:empty{display:none}.room-list-wrap{border-top:1px solid var(--line);margin-top:27px;padding-top:15px}.section-label{display:flex;justify-content:space-between;align-items:center}.section-label h3{font-size:14px;font-weight:650}.room-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid #f2f3f4}.room-item strong{font-size:14px;font-weight:500;display:block;overflow-wrap:anywhere}.room-item small{font-size:11px;color:#999da4;display:block;margin-top:5px}.room-item button{font-size:12px;border-radius:8px;background:#f4f6f5;padding:9px 12px;white-space:nowrap}.empty-rooms{font-size:13px;color:#a0a4aa;padding:20px 0;line-height:1.8}.privacy-note{font-size:11px;color:#a0a3aa;line-height:1.7;margin:22px 0 0}.page-footer{max-width:1160px;border-top:1px solid var(--line);margin:36px auto 0;padding:23px 0;display:flex;justify-content:space-between;color:#b1b4ba;font-size:11px}.page-footer span:first-child{font-weight:700;letter-spacing:-.3px}.play{max-width:1160px;padding:0 0 10px;margin:30px auto}.room-bar{display:flex;align-items:center;justify-content:space-between;margin:0 0 26px}.room-bar h1{font-size:19px;letter-spacing:-.7px;margin:7px 0 0;max-width:500px;overflow-wrap:anywhere}.room-tools{display:flex;gap:17px;align-items:center}.play-layout{display:grid;grid-template-columns:minmax(0,650px) minmax(270px,1fr);gap:60px}.game-section{max-width:650px;min-width:0}.scoreboard{display:flex;justify-content:space-between;align-items:center;padding:0 8px 24px}.player{display:flex;align-items:center;gap:12px;min-width:0;width:35%}.player .animal{width:57px;height:57px}.player strong{font-size:15px;display:block;overflow-wrap:anywhere}.player small{font-size:11px;display:block;margin-top:6px;color:#9da0a6}.player.right{flex-direction:row-reverse;text-align:right}.player.active strong{color:#39745c}.score-center{text-align:center;flex-shrink:0}.score-center>span{display:block;font-size:10px;letter-spacing:1.8px;color:#a0a3a9}.score-center strong{display:block;font-size:29px;margin-top:5px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.score-center em{font-style:normal;font-weight:400;color:#c6c9cd;margin:0 9px}.score-center small{font-size:10px;color:#a5a9b0;display:block;margin-top:3px}.turn-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;min-height:30px}.turn-bar>div{display:flex;align-items:center;gap:10px}.turn-pill{background:#f1f6f3;color:#4b7962;border-radius:7px;padding:7px 10px;font-size:12px;font-weight:600}.turn-pill.spectating{background:#f5f5f6;color:#81858b}#turn-detail{font-size:11px;color:#a0a3aa}#timer{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:1px;color:#7c8189}#timer.urgent{color:#d1695f}.board-wrap{position:relative;width:100%;aspect-ratio:1;border:1px solid #ebedef;border-radius:17px;overflow:hidden;background:#f7f8f8}.board{position:absolute;inset:0;display:grid;grid-template-columns:repeat(7,1fr);gap:0;touch-action:none;user-select:none;-webkit-user-select:none}.cell{padding:0;position:relative;border-radius:0;border-right:1px solid #e8ebec;border-bottom:1px solid #e8ebec;background:#fafbfb;min-width:0;display:grid;place-items:center}.cell:nth-child(7n){border-right:0}.cell:nth-child(n+43){border-bottom:0}.cell:focus-visible{outline-offset:-4px;z-index:6}.cell .animal{width:90%;height:90%;z-index:3;position:relative;filter:drop-shadow(0 2px 1px #24342a0a)}.cell.has-piece:after{content:'';position:absolute;width:40%;height:5%;bottom:10%;border-radius:50%;background:#24342a09}.cell.selected{background:#f0f5f1}.cell .token-label{position:absolute;bottom:4%;right:6%;font-size:9px;color:#656c71;z-index:4;opacity:.7}.paths{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}.paths polyline{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:15;opacity:.6}.paths .draft{opacity:.85;stroke-width:17}.runners{position:absolute;inset:0;pointer-events:none;z-index:5;overflow:hidden}.runner{position:absolute;width:12.86%;height:12.86%;will-change:left,top}.runner .animal{width:100%;height:100%;animation:hop .28s ease-in-out infinite alternate}.hint{text-align:center;color:#92979f;line-height:1.65;font-size:12px;min-height:20px;margin:18px 0 12px}.palette{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin:0 0 16px}.swatch{position:relative;min-width:0;height:64px;border:1px solid #edefef;background:white;border-radius:11px;display:flex;align-items:center;justify-content:center;padding:4px 4px 13px;transition:box-shadow .15s}.swatch .animal{width:48px;height:48px;max-width:100%;max-height:100%}.swatch .swatch-meta{position:absolute;bottom:3px;font-size:9px;color:#989da4}.swatch.chosen{border-color:var(--piece);box-shadow:0 0 0 1px var(--piece);background:var(--piece-light)}.swatch.completed:after{content:'✓';position:absolute;right:4px;top:3px;color:#54886a;font-size:11px}.swatch:disabled .animal{filter:grayscale(.4)}.actions{display:flex;gap:8px;flex-wrap:wrap}.actions>button{flex:1;min-height:46px;white-space:nowrap;font-size:13px;padding:12px 10px}.danger{background:white;border:1px solid #efdedd;color:#b36e68;border-radius:12px}.game-footer{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.game-footer>span{font-size:11px;color:#a4a8ae}.board-overlay{position:absolute;inset:0;z-index:7;background:#ffffffdf;backdrop-filter:blur(3px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px}.board-overlay .animal{width:140px;height:140px}.board-overlay h2{font-size:22px;margin:12px 0;letter-spacing:-.8px}.board-overlay p{font-size:13px;color:#92979e;line-height:1.8;max-width:300px}.board-overlay button{margin-top:12px;min-width:190px}.chat-panel{border-left:1px solid var(--line);padding-left:30px;min-width:0}.chat-heading{display:flex;justify-content:space-between;align-items:flex-start;padding:5px 0 15px}.chat-heading h2{font-size:15px;font-weight:650;margin:0;display:flex;align-items:center;gap:9px}.chat-heading p{font-size:11px;color:#999fa6;margin:8px 0 0}.people{display:flex;gap:6px;flex-wrap:wrap;padding:0 0 18px;border-bottom:1px solid var(--line)}.person{font-size:10px;border:1px solid #e8edeb;padding:5px 8px;border-radius:20px;color:#8b9590;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-note{font-size:11px;line-height:1.7;background:#f7f9f8;padding:10px 12px;border-radius:9px;color:#95a198;margin:16px 0 6px}.messages{height:480px;overflow-y:auto;overscroll-behavior:contain;padding:10px 0 20px;scrollbar-width:thin;scrollbar-color:#e0e4e1 transparent;display:flex;flex-direction:column;gap:19px}.message{font-size:13px;overflow-wrap:anywhere;line-height:1.6}.message-head{display:flex;gap:8px;align-items:baseline;margin-bottom:3px}.message strong{font-size:11px;font-weight:650;color:#727c75}.message.mine strong{color:#3f7960}.message time{font-size:9px;color:#b6bbc0}.message p{margin:0;color:#697078;white-space:pre-wrap}.message .role-tag{font-size:9px;background:#eef4f0;color:#7b9987;padding:0 4px;border-radius:3px}.chat-empty{margin:auto;text-align:center;color:#afb4ba;font-size:13px;line-height:1.8}.chat-empty .animal{width:80px;height:80px;margin:0 auto 10px}.chat-form{display:flex;gap:7px;border:1px solid #e7eae8;border-radius:12px;padding:5px}.chat-form input{border:none;box-shadow:none;background:none;padding:10px 7px;font-size:12px}.chat-form button{border-radius:8px;background:#edf3ef;color:#59826a;font-size:11px;white-space:nowrap;padding:10px}.chat-error{font-size:11px}.chat-toggle{display:none}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#2e3430;color:white;border-radius:12px;padding:13px 22px;font-size:13px;max-width:90vw;z-index:30;box-shadow:0 4px 20px #0002}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:20px}.dialog-top h2{font-size:21px;letter-spacing:-.5px}dialog{border:1px solid #ecefed;border-radius:22px;width:min(480px,calc(100vw - 36px));padding:24px;color:var(--ink);max-height:85dvh;overflow:auto}dialog::backdrop{background:#17251d45;backdrop-filter:blur(3px)}.rules{line-height:1.85;font-size:14px;color:#788079;padding-left:20px}.rules li{margin:13px 0}.rules strong{color:#353f38}.rules-note{font-size:12px;line-height:1.8;color:#9aa19a;padding:12px;background:#f8f9f8;border-radius:10px}.manage-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:10px 0;font-size:13px}.invite-box{display:flex;gap:6px;margin:16px 0}.invite-box input{font-size:12px}#join-info{font-size:13px;color:#7c8981;margin:18px 0;line-height:1.8}.selected .animal{animation:idle 1.7s ease-in-out infinite}.motion-off .animal,.motion-off .runner .animal{animation:none!important}@keyframes hop{from{transform:translateY(0) scale(1.04,.96)}to{transform:translateY(-10%) scale(.97,1.03)}}@keyframes idle{0%,100%{transform:translateY(0)}50%{transform:translateY(-4%)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:1400px){.play-layout{gap:75px}.messages{height:510px}}@media(max-width:1200px){.play{margin:25px 32px}.page-footer{margin-left:32px;margin-right:32px}.play-layout{gap:32px;grid-template-columns:minmax(0,600px) minmax(250px,1fr)}.lobby{gap:60px}.hero-hamster{left:210px}.hero-rabbit{left:100px}.hero-friends .animal{width:155px;height:155px}.chat-panel{padding-left:24px}.messages{height:400px}}@media(max-width:850px){.header{height:72px;padding:0 24px}.lobby{margin:38px auto 60px;gap:35px;grid-template-columns:1fr 1fr}.intro h1{font-size:36px}.intro>p{font-size:14px}.hero-friends{height:155px}.hero-friends .animal{width:120px;height:120px}.hero-rabbit{left:70px}.hero-hamster{left:150px;width:110px!important;height:110px!important}.intro-meta{gap:9px;font-size:10px}.intro-meta span+span:before{margin-right:9px}.lobby-panel{padding:22px}.play-layout{grid-template-columns:1fr;gap:26px}.game-section{width:100%;margin:auto}.chat-panel{border:1px solid var(--line);border-radius:15px;padding:0;max-width:650px;width:100%;margin:auto;overflow:hidden}.chat-toggle{display:flex;width:100%;justify-content:space-between;align-items:center;padding:16px;font-size:13px}.chat-toggle #chat-count{margin-left:8px;margin-right:auto;background:#eff4f0;border-radius:20px;padding:3px 7px;font-size:10px;color:#6d8e79}.chat-chevron{transform:rotate(180deg)}.chat-panel.open .chat-chevron{transform:none}.chat-content{display:none;padding:4px 18px 15px}.chat-panel.open .chat-content{display:block}.messages{height:300px}.room-bar{max-width:650px;margin-left:auto;margin-right:auto}.room-tools{gap:10px}.chat-heading{padding-top:10px}}
@media(max-width:600px){.header{height:64px;padding:0 20px}.brand{font-size:24px}.header-right{gap:15px}.connection{font-size:10px}.lobby{grid-template-columns:1fr;gap:15px;margin:24px auto 40px;padding:0 22px;max-width:460px}.intro{padding-top:5px;position:relative;min-height:190px}.intro>.eyebrow{font-size:8px;letter-spacing:1.4px}.intro h1{font-size:30px;line-height:1.35;letter-spacing:-1.4px;margin:12px 0}.intro>p{font-size:12px;line-height:1.7;margin:0}.hero-friends{position:absolute;right:-8px;bottom:5px;width:185px;height:130px;margin:0}.hero-friends .animal{width:100px;height:100px}.hero-dog{left:-4px;bottom:0}.hero-rabbit{left:65px;bottom:30px!important}.hero-hamster{left:112px;width:88px!important;height:88px!important;bottom:0}.intro-meta{display:none}.lobby-panel{padding:24px;border-radius:20px}.panel-top h2{font-size:21px}.panel-top p{font-size:12px}.privacy-note{font-size:10px}.play{margin:22px 16px 0}.room-bar{align-items:flex-start;margin-bottom:23px;gap:10px}.room-bar .eyebrow{font-size:8px;letter-spacing:1.5px}.room-bar h1{font-size:16px;max-width:190px}.room-tools{gap:7px;flex-wrap:wrap;justify-content:flex-end;max-width:160px}.room-tools .secondary{font-size:11px;min-height:32px;padding:7px 10px;border-radius:9px}.room-tools .text-button{font-size:10px;padding:6px 1px;min-height:27px}.scoreboard{padding:0 0 18px}.player{gap:5px}.player .animal{width:42px;height:42px}.player strong{font-size:12px}.player small{font-size:9px}.score-center strong{font-size:26px}.score-center small{font-size:8px}.score-center>span{font-size:8px}.turn-pill{font-size:11px;padding:6px 8px}#turn-detail{font-size:10px}.turn-bar>div{gap:6px}#timer{font-size:14px}.board-wrap{border-radius:12px}.cell .token-label{font-size:7px}.palette{gap:5px}.swatch{height:54px;border-radius:9px;padding:2px 2px 10px}.swatch .animal{width:38px;height:38px}.swatch .swatch-meta{font-size:8px;bottom:2px}.hint{font-size:11px;margin:13px 0 12px}.actions{gap:6px}.actions>button{font-size:11px;padding:11px 8px;border-radius:10px}.game-footer .text-button{font-size:10px}.game-footer>span{font-size:10px}.page-footer{margin:24px 20px 0;padding:18px 0;font-size:9px}.board-overlay .animal{width:100px;height:100px}.board-overlay h2{font-size:19px}.board-overlay p{font-size:12px}.board-overlay button{font-size:13px;min-height:44px}.chat-form input{font-size:16px}.lobby input{font-size:16px}.messages{height:260px}.toast{bottom:18px;font-size:12px;width:max-content;max-width:90vw}.page-footer{padding-bottom:calc(18px + env(safe-area-inset-bottom))}}

/* Compact play controls: keep the next action next to the board. */
.control-dock{position:sticky;top:0;z-index:10;background:#fffffff5;backdrop-filter:blur(12px);padding:8px 0 12px;border-bottom:1px solid var(--line);margin-bottom:9px}
.control-dock .hint{margin:0 0 8px;min-height:20px;text-align:left;color:#597365;font-size:12px}
.control-dock .actions{flex-wrap:nowrap;gap:7px}
.control-dock .actions>button{min-height:44px;padding:10px 8px;font-size:12px}
.control-dock .actions:empty{display:none}
.board-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin:0 2px 5px;font-size:10px;color:#89948d}
#path-status{font-size:11px;text-align:right;color:#897859;max-width:75%}
#path-status.valid{color:#39745c;font-weight:650}
.board{grid-template-columns:repeat(var(--size,7),1fr);grid-template-rows:repeat(var(--size,7),1fr)}
.board-wrap{background:#fff;border-color:#e4ebe6}
.cell,.cell:nth-child(7n),.cell:nth-child(n+43){border:1px solid #edf0ed}
.cell.blocked{background:#fff;border-color:transparent;opacity:1}
.cell.available{background:#f3f8f3}
.cell.available:before{content:'';width:4px;height:4px;border-radius:50%;background:#91ac9370;position:absolute}
.cell.available:hover{background:#e2eee3}
.paths polyline{stroke-width:20;opacity:.82}
.paths polyline.draft{stroke-width:23;opacity:1}
.paths polyline.path-halo{stroke:white;stroke-width:30;opacity:.95}
.paths polyline.path-halo.draft{stroke-width:33}
.palette-label{display:flex;justify-content:space-between;color:#818e84;font-size:10px;margin:12px 1px 6px}
.palette{display:flex;overflow-x:auto;gap:7px;padding:3px 2px 8px;margin:0;scrollbar-width:thin;scrollbar-color:#dce6de transparent;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
.swatch{flex:0 0 57px;height:60px;scroll-snap-align:start}
.cell.has-piece .animal{animation:quiet-hop 7s ease-in-out infinite;animation-delay:var(--idle-delay,0s)}
.cell.selected .animal{animation:quiet-hop 4.5s ease-in-out infinite;animation-delay:var(--idle-delay,0s)}
.cell .animal.on-journey{opacity:.15}
@keyframes quiet-hop{0%,83%,100%{transform:translateY(0)}87%{transform:translateY(-6%) scale(.98,1.02)}91%{transform:translateY(0) scale(1.03,.97)}95%{transform:translateY(-2%)}}
.game-section{width:100%}.game-footer{margin-top:3px}
@media(min-width:851px){.play-layout{grid-template-columns:minmax(0,560px) minmax(270px,1fr);gap:48px}.play{max-width:1050px}.board-wrap{max-width:560px}.scoreboard{padding-bottom:16px}.chat-panel{position:sticky;top:20px;align-self:start}.messages{height:min(52vh,470px)}}
@media(max-width:850px){
 .play{padding-bottom:64px}.play-layout{gap:0}
 .chat-panel{position:fixed;right:18px;bottom:calc(var(--chat-bottom,0px) + 18px + env(safe-area-inset-bottom));z-index:25;width:auto;max-width:none;min-width:0;margin:0;border-radius:24px;background:#fff;box-shadow:0 4px 25px #24432c20;border:1px solid #e0e8e2;overflow:hidden}
 .chat-toggle{padding:12px 17px;width:auto;min-height:46px;gap:8px;color:#426f53;font-weight:650}
 .chat-toggle #chat-count{margin:0;background:#39745c;color:#fff;min-width:22px;text-align:center}
 .chat-panel:not(.open) .chat-chevron{display:none}
 .chat-panel.open{left:12px;right:12px;bottom:calc(var(--chat-bottom,0px) + 8px);width:auto;height:var(--chat-height,70dvh);border-radius:20px;max-width:600px;margin-left:auto;margin-right:auto;display:flex;flex-direction:column;box-shadow:0 0 0 100vmax #1a2c1726,0 4px 25px #24432c20}
 .chat-panel.open .chat-toggle{width:100%;flex:0 0 auto;border-bottom:1px solid var(--line)}
 .chat-panel.open .chat-content{display:flex;flex-direction:column;min-height:0;flex:1;padding:10px 16px max(12px,env(safe-area-inset-bottom))}
 .chat-panel.open .messages{flex:1;height:auto;min-height:60px;padding:8px 0}
 .chat-panel.open .chat-heading{padding:0 0 8px}.chat-panel.open .people{padding-bottom:8px;max-height:52px;overflow:auto}.chat-panel.open .chat-note{display:none}.chat-panel.open .chat-form{flex-shrink:0;margin-top:8px}.chat-panel.open .chat-heading h2{font-size:13px}
 .toast{bottom:82px}.chat-panel.open~.toast{bottom:82px}
}
@media(max-width:600px){.play{margin:12px 12px 0}.room-bar{margin-bottom:12px}.scoreboard{padding-bottom:10px}.player .animal{width:36px;height:36px}.turn-bar{margin-bottom:2px}.control-dock{padding:7px 0 8px}.control-dock .hint{font-size:10px;line-height:1.5;margin-bottom:6px}.control-dock .actions>button{font-size:10px;min-height:42px;padding:8px 5px}.board-meta{font-size:9px;min-height:23px;margin-bottom:3px}#path-status{font-size:9px}.swatch{flex-basis:48px;height:52px}.palette-label{margin-top:8px;font-size:9px}.cell .token-label{font-size:6px}.game-footer{margin-bottom:0}.header{height:54px}.board-overlay{padding:14px}.board-overlay p{margin:5px 0}.board-overlay h2{margin:7px 0}.board-overlay .animal{width:76px;height:76px}}
@media(prefers-reduced-motion:reduce){.cell.has-piece .animal,.cell.selected .animal{animation:none!important}}
@media(min-width:851px){.in-game .header{height:56px}.in-game .play{margin-top:14px}.in-game .room-bar{margin-bottom:14px}.in-game .room-bar .eyebrow{display:none}.in-game .room-bar h1{margin:0}.in-game .scoreboard{padding-bottom:10px}.in-game .turn-bar{margin-bottom:3px}.in-game .messages{height:min(52vh,470px)}}
.in-game .player{gap:5px}.in-game .player>div{min-width:0}.in-game .player .animal{width:42px;height:42px}.in-game .player small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}.in-game .player strong{font-size:13px}
@media(max-width:600px){.in-game .player .animal{width:36px;height:36px}.in-game .player strong{font-size:12px}.in-game .player small{font-size:9px}}

/* Desktop prioritizes the board; chat has a bounded, user-adjustable width. */
.chat-resize{display:none}
@media(min-width:851px){
 .in-game .play{max-width:1280px;margin:18px auto;padding:0 24px}
 .in-game .play-layout{grid-template-columns:minmax(0,1fr) 12px var(--chat-width,280px);gap:14px;align-items:start}
 .in-game .game-section{max-width:none;width:100%;min-width:0}
 .in-game .board-stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:12px}
 .in-game .board-wrap{grid-column:1;width:100%;max-width:none}
 .in-game .palette-shell{position:absolute;right:0;top:0;bottom:0;width:80px;display:flex;flex-direction:column;min-height:0;border:1px solid var(--line);border-radius:14px;background:#fff;padding:8px 5px}
 .in-game .palette-label{flex-shrink:0;justify-content:center;font-size:11px;margin:2px 0 8px}
 .in-game .palette-label span+span{display:none}
 .in-game .palette{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0;padding:3px 4px;gap:8px;scroll-snap-type:y proximity;scrollbar-width:thin;scrollbar-gutter:stable}
 .in-game .swatch{flex:0 0 62px;width:100%;height:62px;min-height:62px}
 .in-game .swatch .animal{width:48px;height:48px}
 .in-game .chat-panel{width:100%;min-width:0;padding-left:14px;border-left:1px solid var(--line);position:sticky;top:16px}
 .in-game .chat-heading h2{font-size:14px}.in-game .chat-note{font-size:10px;padding:8px}
 .in-game .messages{height:clamp(280px,calc(100dvh - 300px),560px)}
 .chat-resize{display:block;position:sticky;top:140px;height:120px;cursor:ew-resize;touch-action:none;border-radius:8px;align-self:start;margin-top:120px}
 .chat-resize:before{content:'';position:absolute;top:35px;bottom:35px;left:5px;width:3px;border-radius:4px;background:#dce5de}
 .chat-resize:hover,.chat-resize:focus-visible{background:#edf4ef}.chat-resize:focus-visible{outline:2px solid #65977a}
 body.resizing-chat,body.resizing-chat *{cursor:ew-resize!important;user-select:none!important}
}
@media(max-width:850px){.board-stage{display:block}.palette-shell{position:static;width:auto}.chat-resize{display:none!important}}
@media(min-width:851px){
 .in-game .play{max-width:min(1280px,calc(100dvh + 110px))}
 .in-game .score-center strong{font-size:25px;line-height:1.1;margin-top:2px}.in-game .score-center small{margin-top:2px}.in-game .scoreboard{padding-bottom:8px}
 .in-game .control-dock{display:flex;align-items:center;gap:14px;padding:6px 0 8px}
 .in-game .control-dock .hint{flex:1;min-width:0;margin:0;font-size:11px;line-height:1.5}
 .in-game .control-dock .actions{flex:0 1 55%;min-width:230px}.in-game .control-dock .actions:empty{display:none}
 .in-game .control-dock .actions>button{font-size:11px;padding:8px 5px}
}
