
:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff1d8;background:#241913}
*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 46% 20%,#714536 0%,#422720 49%,#231715 100%)}[hidden]{display:none!important}
.shell{max-width:1100px;margin:0 auto;padding:10px 18px 18px}
header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 5px 11px}h1{font-family:Georgia,serif;font-size:clamp(26px,4.1vw,39px);margin:0;color:#ffdb9e;letter-spacing:.02em;text-shadow:0 2px 4px #120c09}h1 small{font-size:.5em}header p{font-size:12px;margin:2px 0 0;color:#dfc9af}a{color:inherit}
button{font:750 14px system-ui,sans-serif;background:linear-gradient(180deg,#ffe19a,#efa935);color:#3e261b;border:1px solid #f8c36d;border-radius:12px;padding:10px 15px;cursor:pointer;box-shadow:0 3px 0 #9b642f;min-height:42px;touch-action:manipulation}button:hover:not(:disabled){filter:brightness(1.07)}button:disabled{opacity:.42;cursor:default}button.ghost{background:#fff2d510;color:#fff1d8;border-color:#ac8458;box-shadow:none}button:focus-visible,.domtile:focus-visible{outline:3px solid #ffe174;outline-offset:3px}
.card{background:#3e2520;border:2px solid #c69754;box-shadow:0 10px 24px #0005;border-radius:20px;padding:22px}.menu{max-width:570px;margin:26px auto;text-align:center}.menu h2{margin:0 0 14px}.menu label{display:block;margin:10px}.menu input,.menu select{border:1px solid #dbb16b;background:#fff9ee;color:#281912;border-radius:9px;padding:12px;font-size:16px;max-width:100%}#name{width:100%}.menuActions,.join,.row{display:flex;gap:12px;justify-content:center;align-items:center;margin-top:15px}.menuActions button{flex:1}.join input{width:190px;text-transform:uppercase}.muted{color:#dec5a5;font-size:13px}.row label{margin:0}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:2px 0 10px;font-size:13px}#roominfo{font-weight:700;color:#ffdc99}
.board{background:radial-gradient(ellipse at 52% 32%,#297c5d,#165843 75%,#0d3a2d);border:9px solid #956035;outline:2px solid #e0b67c;outline-offset:-13px;border-radius:22px;box-shadow:inset 0 0 48px #04261c75,0 14px 30px #0005;padding:13px 16px 15px}
.topline{display:flex;gap:9px}.playerbox{background:#092f29b8;border:1px solid #b5ceb37a;border-radius:11px;padding:9px 13px;flex:1;min-width:0}.playerbox small,.handtitle small{display:block;color:#c8dec3;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.playerbox div{font-size:14px;font-weight:750;overflow-wrap:anywhere}.playerbox.stock{flex:0 0 86px;text-align:center}.stock strong{font-size:21px;color:#ffde98}
.backtiles{display:flex;justify-content:center;gap:4px;height:22px;margin:6px 0 2px}.backtile{width:12px;height:21px;background:linear-gradient(130deg,#f5dfb0,#a36535);border-radius:3px;border:1px solid #f4dfac;box-shadow:1px 2px 2px #0005}
.chainwrap{height:150px;min-height:95px;max-height:300px;margin:0 auto;display:flex;justify-content:center;align-items:center}.chainwrap svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(1px 3px 2px #092b2170)}.ends{text-align:center;color:#bdf6d1;font-size:12px;margin:0 0 8px;min-height:17px}
.handbox{background:#062c25c7;border:1px solid #d5e3cf66;border-radius:13px;padding:11px 12px 7px}.handtitle{display:flex;justify-content:space-between;gap:12px;align-items:center}.handtitle strong{display:block;color:#fff7e6;font-size:15px}.hand{display:flex;gap:11px;align-items:center;justify-content:center;flex-wrap:wrap;min-height:94px;padding:12px 0 8px}.domtile{background:linear-gradient(#fffef3,#f4ecd8);border:1px solid #c7b899;box-shadow:1px 4px 0 #b8a88b,2px 6px 6px #0005;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-direction:column;width:43px;height:76px;padding:3px;transition:transform .17s,opacity .15s;cursor:pointer;flex-shrink:0}.domtile .half{width:32px;height:32px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);place-items:center}.domtile .pip{width:6px;height:6px;background:#20313b;border-radius:50%}.domtile .split{height:1px;width:32px;background:#9e9683}.domtile.selected{transform:translateY(-9px);outline:3px solid #ffd161;outline-offset:2px}.domtile.unplayable{opacity:.44}.domtile:focus-visible{outline:3px solid #ffdc7a}
.control{margin-top:10px;background:#07291faa;border:1px solid #d3c49b65;border-radius:13px;text-align:center;padding:12px 10px}#message{min-height:20px;font-size:15px;font-weight:750;color:#ffe3a5;margin:0 0 9px}.buttons{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.buttons button{min-width:110px}.buttons button:first-child,.buttons button:nth-child(2){background:linear-gradient(#ffe5a0,#f2b542)}
footer{text-align:center;color:#dfbf94;font-size:11px;padding:13px 5px 0}
@media(min-width:800px) and (max-height:820px){.shell{padding-top:4px}header{padding:2px 5px 6px}.board{padding:9px 14px 10px}.chainwrap{max-height:215px}.hand{min-height:79px;padding:7px 0}.domtile{height:66px;width:39px}.domtile .half{width:29px;height:28px}.control{padding:8px}}
@media(max-width:600px){.shell{padding:8px}header{padding:7px 3px 10px}.board{border-width:6px;padding:8px;outline-offset:-9px}.chainwrap{max-height:245px}.playerbox{padding:8px}.playerbox.stock{flex-basis:68px}.hand{gap:7px;min-height:85px}.domtile{width:37px;height:68px}.domtile .half{width:29px;height:29px}.domtile .split{width:29px}.buttons button{flex:1 1 calc(50% - 8px);min-width:0;padding:10px 6px}.menuActions{flex-direction:column}.menuActions button{width:100%}.join{flex-wrap:wrap}.toolbar{padding-bottom:9px}}
@media(max-width:420px){.hand{gap:9px}.domtile{width:48px;height:84px;padding:4px}.domtile .half{width:35px;height:35px}.domtile .pip{width:7px;height:7px}.domtile .split{width:35px}}
