*{box-sizing:border-box}body{margin:0;color:#fff1da;background:#2b1d18;font:15px system-ui,-apple-system,sans-serif}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #efcf9b;background:#b47c43;border-radius:12px;color:#201207;font-weight:850;padding:11px 13px}button:disabled{opacity:.45;cursor:not-allowed}header{position:relative;z-index:3;display:flex;align-items:center;justify-content:space-between;padding:16px clamp(12px,3vw,35px);background:#1d1513e5;gap:6px}header a{color:#ffe0a8;text-decoration:none}header b{letter-spacing:.6px;font-size:clamp(13px,3vw,18px)}header span{font-size:11px;color:#d7b58d}.room{min-height:100vh;background:linear-gradient(180deg,#3a2a23 5%,#785339 63%,#241713)}.wall{position:absolute;top:52px;left:0;right:0;height:43vh;background:repeating-linear-gradient(90deg,#38241b11 0 4px,transparent 5px 90px),linear-gradient(110deg,#554035,#70503a,#453027);box-shadow:inset 0 -22px 35px #26150a99}.window{position:absolute;right:9%;top:16%;width:130px;height:110px;border:10px solid #63422a;background:linear-gradient(120deg,#87a0a0,#d4ae79);box-shadow:inset 0 0 25px #4f2d20}.frame{position:absolute;left:8%;top:15%;padding:22px;border:9px ridge #976b3a;background:#b71c2b;font-size:28px}main{position:relative;z-index:2;max-width:1150px;margin:auto;padding:18px 14px 125px}.lobby{text-align:center;padding:35px 0}.lobby h1{font-size:clamp(35px,7vw,62px);margin:6px}.lobby p{color:#f8dabb}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:800px;margin:30px auto}.grid article{background:#241a16eb;border:1px solid #b9894f;padding:26px;border-radius:22px;box-shadow:0 24px 45px #140a0666}.grid article button{margin:8px}.grid input,.grid select{border-radius:10px;background:#fff4df;border:0;padding:11px;max-width:160px}.auth a{color:#ffe2aa}.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;text-shadow:0 3px 7px #000}.game-top h2{font-size:clamp(16px,3vw,25px);margin:5px 0}.scene{width:min(96vw,1000px);height:clamp(400px,58vh,650px);margin:0 auto;position:relative;perspective:1000px}.table{position:absolute;inset:2% 1% 1%;border:22px solid #603d26;border-radius:49% / 37%;box-shadow:0 20px 0 #321e12,0 45px 60px #000a,inset 0 0 0 4px #c09359;transform:rotateX(12deg);overflow:hidden;background:#794a28}.wood{position:absolute;inset:0;background:repeating-linear-gradient(8deg,#81512e 0px,#98643c 5px,#754829 16px,#9a6841 22px);box-shadow:inset 0 0 100px #1b100cc7}.mat{position:absolute;inset:13% 10%;border-radius:48%;background:radial-gradient(ellipse,#376952,#153e34 90%);border:5px double #dbc09088;box-shadow:inset 0 0 70px #0d1e19}.glass,.drink,.chips,.snack{position:absolute;z-index:2;font-size:clamp(25px,5vw,52px);filter:drop-shadow(7px 9px 4px #0009)}.glass{top:37%;left:5%}.drink{right:8%;top:31%}.chips{right:9%;bottom:19%}.snack{left:10%;bottom:24%}.brandtable{position:absolute;top:38%;left:50%;transform:translateX(-50%);font-family:Georgia,serif;color:#eddb9c;letter-spacing:3px;font-weight:900;white-space:nowrap;text-shadow:1px 4px 7px #000}#opponents{position:absolute;top:9%;width:90%;left:5%;display:flex;gap:5px;justify-content:center;flex-wrap:wrap;z-index:3}.seat{font-size:11px;color:#fcdbab;background:#1d241fc7;border:1px solid #cca36c;border-radius:20px;padding:5px 9px}.seat.active{box-shadow:0 0 13px #f8bf65}.table-message{position:absolute;top:48%;left:50%;transform:translateX(-50%);width:max-content;max-width:76%;text-align:center;background:#152820df;border:1px solid #ba9868;border-radius:13px;padding:8px 12px;font-size:clamp(11px,2vw,14px);z-index:2}#backs{position:absolute;top:22%;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;width:78%;height:84px;z-index:3}.cardback{width:clamp(32px,7.2vw,58px);height:clamp(52px,10vw,83px);border:2px solid #f7e6c5;background:#b90925;border-radius:7px;margin-left:clamp(-18px,-1.5vw,-5px);padding:2px;box-shadow:4px 7px 9px #0009;transform:rotate(var(--angle));flex:none;transition:transform .18s}.cardback:hover:not(:disabled){transform:translateY(-14px) rotate(var(--angle))}.cardback svg{width:100%;height:100%}.hand-area{position:absolute;bottom:8%;left:5%;width:90%;z-index:4;text-align:center;font-size:12px;font-weight:900}.hand-area b{text-shadow:0 3px 7px #000}#hand{display:flex;align-items:flex-end;justify-content:center;min-height:110px;overflow-x:auto;scrollbar-width:thin;padding-top:12px}.face{height:clamp(72px,14vw,122px);width:clamp(46px,9vw,78px);min-width:38px;flex:none;border:2px solid #e9d9b9;border-radius:8px;background:linear-gradient(125deg,#fffef9,#f4eee1 75%,#d8c5a5);box-shadow:4px 6px 10px #0008;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#191c1d;font:900 clamp(16px,3vw,22px) Georgia,serif;transform:rotate(var(--angle)) translateY(var(--lift));transition:transform .2s;padding:3px;margin-left:clamp(-18px,-1.6vw,-6px)}.face.red{color:#c32233}.face span{font-size:clamp(25px,5vw,45px)}.face.selected{outline:3px solid #f4bb6e;transform:rotate(var(--angle)) translateY(-24px)}.actionbar{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:9px;margin:21px 0}.instructions{text-align:center;font-size:13px;color:#f2d9b3}.hidden{display:none!important}#toast{position:fixed;z-index:100;top:15%;left:50%;transform:translateX(-50%);background:#17211cf4;border:1px solid #d4a567;border-radius:14px;padding:13px 20px;display:none;max-width:85%;text-align:center}#toast.show{display:block}@media(max-width:630px){.grid{grid-template-columns:1fr}.scene{height:clamp(365px,52vh,500px)}.table{border-width:12px}.mat{inset:11% 5%}.hand-area{bottom:11%}.brandtable{font-size:10px}.actionbar{gap:6px}.actionbar button{font-size:12px;padding:10px}.frame{left:3%;top:16%}.window{right:3%;top:16%}}

/* KERRI_AVATAR_VISUAL_V1: characters and card-draw animation */
.avatar-selector{max-width:500px;margin:25px auto;background:#201811dc;border:1px solid #b68b61;border-radius:22px;padding:18px}.avatar-selector h3{margin:0 0 12px}.avatar-choices{display:flex;gap:14px;justify-content:center}.avatar-choice{min-width:125px;border:2px solid #7f6249;background:#36271f;color:#fff3dc;display:flex;flex-direction:column;align-items:center;gap:6px;border-radius:15px;padding:10px}.avatar-choice.chosen{border-color:#f8d290;box-shadow:0 0 0 3px #eabf7b33}.avatar-thumb{font-size:48px}.avatar-selector small{display:block;margin-top:10px;color:#dbbfa2}
#opponents{top:0;left:0;width:100%;height:34%;align-items:start;justify-content:space-around;gap:0;flex-wrap:nowrap;pointer-events:none;overflow:visible;z-index:5}.seat-person{position:relative;flex:1;min-width:0;max-width:140px;text-align:center;filter:drop-shadow(3px 10px 5px #0b120dbb);display:flex;align-items:center;flex-direction:column}.seat-person.active .figure{filter:drop-shadow(0 0 11px #f8c577)}.seat-plate{max-width:98%;background:#161e1bdc;border:1px solid #a9895f;padding:3px 5px;border-radius:9px;color:#fff2dd;text-shadow:0 1px 2px #000;font-size:clamp(9px,2vw,12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.seat-plate small{display:block;color:#cbb69a}.figure{width:clamp(48px,12vw,100px);height:clamp(80px,17vw,138px);position:relative;flex:none;transform:translateY(-11%)}.figure .head{position:absolute;z-index:4;top:12%;left:31%;height:35%;width:40%;border-radius:47% 47% 45% 45%;background:linear-gradient(100deg,#a96947,#f1c3a0 55%,#b87d5d);box-shadow:inset -5px -4px 6px #643e2a44}.figure.girl .head{background:linear-gradient(90deg,#ae704c,#efb998 60%,#a96c46)}.figure .hair{position:absolute;z-index:5;top:5%;left:27%;width:47%;height:23%;border-radius:60% 60% 18% 18%;background:linear-gradient(110deg,#22160f,#6e452d)}.figure.girl .hair{height:49%;left:23%;width:56%;border-radius:46% 46% 30% 30%;background:linear-gradient(100deg,#1b1411,#55352b 70%,#241611);z-index:3}.figure .torso{position:absolute;z-index:2;top:43%;left:14%;width:73%;height:54%;border-radius:34% 34% 9% 9%;background:linear-gradient(100deg,#192c42,#3e6b85 60%,#152334);box-shadow:inset -12px -5px 12px #0b17264f}.figure.girl .torso{background:linear-gradient(100deg,#6d2333,#b65467 62%,#551727)}.figure .arm{position:absolute;z-index:6;top:51%;width:18%;height:41%;border-radius:15px;background:linear-gradient(90deg,#c28b68,#f0b790);transform-origin:top center}.figure .arm-l{left:18%;transform:rotate(-34deg)}.figure .arm-r{right:18%;transform:rotate(34deg)}.figure .fan{position:absolute;z-index:8;left:34%;top:71%;width:34%;height:22%;display:flex;justify-content:center}.figure .fan i{height:85%;width:33%;background:linear-gradient(135deg,#a00d28,#d92f42);border:1px solid #edc3a0;border-radius:3px;transform:rotate(calc((var(--i) - 1)*18deg));margin-left:-4px;box-shadow:1px 3px 2px #0005}.figure .fan i:nth-child(1){--i:0}.figure .fan i:nth-child(2){--i:1}.figure .fan i:nth-child(3){--i:2}.figure .eye{position:absolute;top:43%;height:3px;width:3px;background:#241814;border-radius:50%}.figure .eye-l{left:28%}.figure .eye-r{right:28%}.figure .nose{position:absolute;top:59%;left:47%;height:6px;width:3px;border-radius:80%;background:#9b624a88}.me-avatar{position:absolute;bottom:-7%;left:50%;transform:translateX(-50%);z-index:1;pointer-events:none}.me-avatar .figure{transform:scale(1.15)}.figure-back .head{background:linear-gradient(#b88564,#c8936a)}.figure-back .eye,.figure-back .nose{display:none}.figure-back .hair{z-index:6}.draw-visual{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:15;pointer-events:none;opacity:0;transition:opacity .18s}.draw-visual.show{opacity:1}.draw-card{animation:card-flight 3s ease-out both;display:flex;align-items:center;flex-direction:column;gap:9px;filter:drop-shadow(5px 13px 12px #000a)}.draw-card small{background:#1b2520ed;border:1px solid #a48453;padding:7px 12px;border-radius:18px;font-weight:800}.flying-face,.flying-back{height:clamp(105px,22vw,165px);width:clamp(70px,14vw,108px);background:#fff8e7;border:3px solid #e5d4b5;border-radius:10px;color:#1e1a1b;display:flex;align-items:center;justify-content:center;font:bold 40px Georgia;box-shadow:5px 12px 17px #000b}.flying-back{background:#ba1630}.flying-back svg{width:83%;height:83%}@keyframes card-flight{0%{opacity:0;transform:translateY(-70px) rotate(-24deg) scale(.5)}18%{opacity:1;transform:translateY(0) rotate(0) scale(1.1)}76%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(30px) scale(.88)}}
@media(max-width:630px){#opponents{top:-3%}.seat-person{max-width:85px}.seat-plate{font-size:9px}.figure{width:clamp(43px,11vw,65px);height:clamp(75px,18vw,99px)}.hand-area{bottom:9%;z-index:7}.me-avatar{bottom:-12%}.me-avatar .figure{transform:scale(.82)}.table-message{top:46%;z-index:6}.avatar-choices{gap:10px}}
