:root { color-scheme: light; font-family: "Nunito", "PingFang SC", ui-rounded, system-ui, sans-serif; color: #31534b; --ink:#31534b; --mint:#bdebd8; --mint-dark:#66bda1; --cream:#fffdf5; --yellow:#ffd879; --pink:#ffb6bd; --blue:#9bd8e7; }
* { box-sizing: border-box; }
[hidden] { display:none !important; }
body { margin:0; min-height:100vh; overflow-x:hidden; background-color:#f3fbf7; background-image:radial-gradient(#a7d8c5 1.2px, transparent 1.2px); background-size:22px 22px; }
body::before, body::after { content:""; position:fixed; z-index:-1; width:240px; height:240px; border:3px solid var(--ink); border-radius:55% 45% 60% 40%; opacity:.08; }
body::before { left:-100px; top:8%; background:var(--yellow); transform:rotate(20deg); }
body::after { right:-110px; bottom:5%; background:var(--pink); transform:rotate(-12deg); }
button,input { font:inherit; }
button { cursor:pointer; }
main { width:min(1080px, calc(100% - 32px)); margin:0 auto; padding:25px 0 50px; transition:margin .3s ease; }
.topbar { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:18px; }
.eyebrow,.section-label { margin:0 0 5px; color:#599b87; font-size:11px; font-weight:900; letter-spacing:.16em; text-transform:uppercase; }
h1 { margin:0; color:var(--ink); font-size:clamp(32px,6vw,52px); line-height:1; font-weight:950; letter-spacing:-.05em; }
h1 span { display:inline-block; color:#77bea7; transform:rotate(12deg); }
.hand-counter { padding:8px 14px; border:2px solid var(--ink); border-radius:99px; background:var(--cream); box-shadow:3px 3px 0 var(--ink); }
.table-shell { padding:12px; border:3px solid var(--ink); border-radius:170px; background:#ffdd91; box-shadow:7px 8px 0 #31534b2b; transform:rotate(-.15deg); }
.felt { position:relative; min-height:500px; overflow:hidden; border:3px solid var(--ink); border-radius:155px; background-color:#bdebd8; background-image:radial-gradient(#82cbb3 1px, transparent 1px); background-size:18px 18px; }
.felt::after { content:""; position:absolute; inset:9%; border:2px dashed #559e8980; border-radius:inherit; pointer-events:none; }
.center { position:absolute; z-index:2; left:50%; top:50%; width:70%; text-align:center; transform:translate(-50%,-50%); }
.street { margin:0 0 13px; color:#4b8b78; font-size:13px; font-weight:900; letter-spacing:.12em; }
.cards { display:flex; justify-content:center; gap:8px; min-height:88px; }
.card { display:grid; place-items:center; width:clamp(45px,8vw,65px); aspect-ratio:.7; border:2px solid var(--ink); border-radius:11px 9px 12px 8px; background:var(--cream); color:var(--ink); font:900 clamp(18px,3vw,25px) Georgia,serif; box-shadow:3px 4px 0 #31534b2d; transform:rotate(-1deg); }
.card:nth-child(even) { transform:rotate(1deg) translateY(-2px); }
.card.red { color:#e86472; }
.card.back { color:transparent; background:repeating-linear-gradient(45deg,#fff7d8 0 5px,#ffd879 5px 10px); }
.pot { display:inline-flex; align-items:center; gap:6px; margin-top:14px; padding:8px 14px; border:2px solid var(--ink); border-radius:99px; background:var(--cream); font-weight:800; box-shadow:2px 3px 0 #31534b2b; }
.mini-chip,.flying-chip { display:inline-block; width:16px; height:16px; border:3px dashed white; border-radius:50%; background:#ff7181; box-shadow:0 0 0 2px var(--ink); }
.pot-chips { display:flex; flex-wrap:wrap-reverse; justify-content:center; align-content:flex-end; gap:0; width:125px; min-height:26px; margin:8px auto -7px; padding:0 8px; }
.table-chip { width:18px; height:8px; margin:0 -2px -2px; border:1.5px solid var(--ink); border-radius:50%; background:#ff7884; box-shadow:inset 0 -2px 0 #c5525e; transform:translateY(calc(var(--chip-index) * -.1px)) rotate(calc(var(--chip-index) * 7deg)); }
.table-chip.chip-1 { background:#ffd465; box-shadow:inset 0 -2px 0 #d7a93d; }.table-chip.chip-2 { background:#77d1dc; box-shadow:inset 0 -2px 0 #4aa7b3; }
.pot strong { color:#e66d57; }
.players { position:absolute; z-index:3; inset:0; }
.player { position:absolute; width:max-content; min-width:168px; max-width:220px; padding:8px 10px; border:2px solid var(--ink); border-radius:15px 12px 16px 11px; background:var(--cream); box-shadow:4px 5px 0 #31534b38; text-align:left; transform:translate(-50%,-50%) rotate(-1deg); }
.player-info { display:flex; align-items:center; gap:8px; min-width:0; }
.player-copy { display:flex; flex:1; min-width:0; flex-direction:column; line-height:1.25; }
.cat-avatar { position:relative; flex:0 0 54px; width:54px; height:43px; filter:drop-shadow(1px 2px 0 #31534b25); }
.cat-avatar-png { flex-basis:48px; width:48px; }
.cat-avatar-png img { position:absolute; left:0; top:-3px; width:48px; height:48px; object-fit:contain; }
.cat-tail { position:absolute; z-index:0; right:0; bottom:3px; width:22px; height:12px; border:2px solid #293a37; border-left:0; border-radius:0 10px 10px 0; background:var(--cat); }
.cat-body { position:absolute; z-index:1; left:16px; bottom:2px; width:33px; height:31px; border:2px solid #293a37; border-radius:48% 55% 38% 34%; background:var(--cat); }
.cat-head { position:absolute; z-index:3; left:1px; top:5px; width:32px; height:31px; border:2px solid #293a37; border-radius:45% 45% 42% 42%; background:var(--face,var(--cat)); }
.cat-ear { position:absolute; z-index:-1; top:-8px; width:14px; height:14px; background:#293a37; clip-path:polygon(50% 0,100% 100%,0 100%); }
.cat-ear::after { content:""; position:absolute; inset:3px 3px 1px; background:var(--ear,#f3b5ad); clip-path:inherit; }
.cat-ear-left { left:1px; transform:rotate(-5deg); }.cat-ear-right { right:1px; transform:rotate(5deg); }
.cat-eye { position:absolute; top:12px; width:2px; height:7px; border-radius:2px; background:#293a37; }
.cat-eye-left { left:9px; }.cat-eye-right { right:9px; }
.cat-nose { position:absolute; left:50%; top:17px; width:2px; height:2px; border-radius:50%; background:#e48b82; transform:translateX(-50%); }
.cat-head::before,.cat-head::after { content:""; position:absolute; top:19px; width:10px; height:7px; border-top:1px solid #647772; border-bottom:1px solid #647772; opacity:.55; }
.cat-head::before { left:-7px; transform:rotate(7deg); }.cat-head::after { right:-7px; transform:rotate(-7deg); }
.cat-belly { position:absolute; z-index:2; left:17px; bottom:3px; width:18px; height:24px; border-radius:55% 55% 30% 30%; background:var(--belly,transparent); }
.cat-0 { --cat:#efb768; --face:#f5c87d; --belly:#fff8e9; --ear:#eda18f; }.cat-1 { --cat:#f7f5ec; --face:#f7f5ec; --belly:#fff; --ear:#efb6b3; }.cat-2 { --cat:#aeb0aa; --face:#aeb0aa; --belly:#f8f6ed; --ear:#dca8a5; }.cat-3 { --cat:#3e4141; --face:#3e4141; --belly:#eee9dc; --ear:#9d7d82; }.cat-4 { --cat:#aebac7; --face:#f6f5ec; --belly:#fff; --ear:#e3aaa8; }.cat-5 { --cat:#d8c6b1; --face:#f7f1e6; --belly:#fff; --ear:#e7aba4; }
.player-hand-button { position:absolute; z-index:5; left:50%; bottom:-27px; width:max-content; padding:4px 9px; border-width:1.5px; border-radius:99px; background:#fffdf5; box-shadow:2px 2px 0 var(--ink); font-size:10px; transform:translateX(-50%); }
.player-hand-button:hover:not(:disabled) { transform:translate(calc(-50% + 2px),2px); }
.blind-icon { position:absolute; z-index:4; right:-10px; top:1px; display:grid; place-items:center; width:29px; height:29px; border:2px solid var(--ink); border-radius:50%; background:white; font-style:normal; font-size:12px; font-weight:950; box-shadow:2px 2px 0 var(--ink); }
.small-blind { background:#aee2f0; }.big-blind { background:#ffd36f; }
.player.current { z-index:6; border-color:#e55f55; background:#fff1a9; box-shadow:0 0 0 6px #ff8b7e55,0 0 0 11px #fff4a766,5px 6px 0 #31534b38; animation:turn-pulse 1.1s ease-in-out infinite; }
.turn-badge { position:absolute; z-index:8; left:50%; top:-38px; width:max-content; padding:5px 9px; border:2px solid var(--ink); border-radius:10px 10px 10px 2px; background:#ff786f; color:white; font-size:11px; font-weight:950; box-shadow:2px 3px 0 var(--ink); transform:translateX(-50%) rotate(-2deg); }
.player.thinking { background:#fff5c8; animation:bot-think-pulse 1s ease-in-out infinite; }
.bot-thinking-badge { display:flex; align-items:center; gap:5px; background:#65af9a; }
.thinking-dots { display:inline-flex; align-items:center; gap:2px; }
.thinking-dots i { width:4px; height:4px; border-radius:50%; background:#fff; animation:thinking-dot .8s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay:.14s; }.thinking-dots i:nth-child(3) { animation-delay:.28s; }
.player.folded { opacity:.42; filter:grayscale(.5); }
.allin-badge { position:absolute; z-index:5; left:-14px; top:-12px; padding:3px 6px; border:1.5px solid var(--ink); border-radius:99px; background:#ff9ea8; color:#7e303b; font-size:9px; font-weight:950; box-shadow:1px 2px 0 var(--ink); transform:rotate(-8deg); }
.player strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chips { color:#e56d58; font-size:13px; font-weight:850; }
.bet { color:#78a99a; font-size:12px; white-space:nowrap; }
.player-invested { color:#c47745; font-weight:900; }
.control-panel { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:18px; margin-top:20px; padding:18px 20px; border:2px solid var(--ink); border-radius:18px 15px 20px 14px; background:#fffdf5; box-shadow:5px 6px 0 #31534b26; }
.allin-choice { grid-template-columns:1fr auto; border-color:#dc6c70; background:#fff4c9; box-shadow:5px 6px 0 #dc6c7040; }
.allin-choice h2 { margin:0 0 5px; font-size:22px; }
.run-buttons { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.run-buttons button { min-width:85px; background:#ff9da4; }
.actions { grid-template-columns:minmax(170px,.7fr) minmax(420px,1.6fr); align-items:stretch; }
.turn-info { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; }
.compact { margin-top:12px; padding:7px 10px; font-size:12px; }
.lobby-wrap { position:relative; padding-top:20px; }
.lobby-wrap .control-panel { margin-top:0; }
.lobby-toggle { display:block; margin:0 0 8px auto; padding:7px 11px; border-style:dashed; background:#fffdf5; box-shadow:2px 2px 0 var(--ink); font-size:12px; }
.hint { margin:0; color:#75978e; font-size:14px; }
.join-form,.action-buttons,.raise-group,.result-actions,.basic-actions,.wager-actions { display:flex; gap:8px; }
.action-buttons { display:grid; grid-template-columns:170px minmax(0,1fr); align-items:stretch; gap:10px; }
.basic-actions,.wager-actions { position:relative; display:grid; align-items:center; gap:8px; padding:27px 11px 11px; border:2px dashed #9bcbbb; border-radius:14px; background:#f3fbf7; }
.basic-actions { grid-template-columns:1fr 1fr; }
.wager-actions { grid-template-columns:110px 110px minmax(250px,1fr); border-style:solid; background:#fff3ba; box-shadow:3px 3px 0 #e7b351; }
.action-label { position:absolute; left:11px; top:6px; color:#6d9f90; font-size:10px; font-weight:950; letter-spacing:.12em; }
.call-action,.allin-action { min-width:0; height:58px; padding:8px; font-size:15px; }
.call-action { background:#aee6d3; }.allin-action { background:#ff9fa9; color:#75323b; }
.raise-group { flex-direction:column; align-items:stretch; padding-left:10px; border-left:2px dashed #d7aa51; }
.raise-group label { color:#8d7440; font-size:11px; font-weight:900; }
.raise-shortcuts,.raise-confirm { display:grid; grid-template-columns:repeat(3,1fr); align-items:center; gap:6px; }
.raise-confirm { grid-template-columns:auto 70px minmax(96px,1fr); }
.raise-shortcuts button { padding:5px 9px; border-width:1.5px; background:#fffdf5; box-shadow:2px 2px 0 var(--ink); font-size:11px; }
.raise-shortcuts button:focus { background:#aee6d3; }
.raise-confirm button { background:#ffd369; }
input { min-width:0; padding:10px 12px; border:2px solid var(--ink); border-radius:10px; outline:none; background:white; color:var(--ink); box-shadow:2px 2px 0 #31534b22; }
input:focus { box-shadow:0 0 0 4px #bdebd880; }
button { padding:10px 15px; border:2px solid var(--ink); border-radius:11px 9px 12px 8px; background:#dff5ec; color:var(--ink); font-weight:900; box-shadow:3px 3px 0 var(--ink); transition:transform .15s,box-shadow .15s; }
button:hover:not(:disabled) { transform:translate(2px,2px); box-shadow:1px 1px 0 var(--ink); }
button:disabled { opacity:.35; cursor:not-allowed; }
.primary { background:var(--yellow); }
.secondary { background:#dff6ee; }
.danger { background:#ffd8d8; color:#a64d57; }
.raise-group input { width:70px; }
.message { min-height:22px; margin:13px 4px; color:#dd675d; font-weight:800; }
.result h2 { margin:0 0 5px; font-size:26px; }
.showdown { grid-column:1/-1; margin-top:4px; padding-top:20px; border-top:2px dashed #9ccdbd; }
.showdown-title { display:flex; justify-content:center; align-items:center; gap:12px; text-align:center; }
.showdown-title h3 { margin:0; font-size:20px; }
.showdown-hands { display:grid; gap:18px; margin-top:16px; }
.showdown-board { padding:14px; border:2px dashed #8ec6b4; border-radius:16px; background:#ffffff80; }
.showdown-board h4 { margin:0 0 10px; color:#5d9483; text-align:center; }
.showdown-community { min-height:70px; margin-bottom:12px; }.showdown-community .card { width:45px; }
.showdown-board-players { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; }
.showdown-player { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 14px; border:2px solid var(--ink); border-radius:14px 11px 16px 10px; background:#f3fbf7; box-shadow:3px 3px 0 #31534b22; opacity:0; animation:showdown-row .35s ease forwards; animation-delay:var(--row-delay); }
.showdown-winner { background:#fff3b9; box-shadow:4px 4px 0 #e4a949; }
.showdown-name strong,.showdown-name span { display:block; }
.showdown-name span { margin-top:4px; color:#e06f5c; font-size:13px; font-weight:900; }
.showdown-cards { min-height:70px; }
.showdown-cards .card { width:47px; }
.reveal-card { position:relative; overflow:hidden; transform:rotateY(90deg); animation:reveal-card .48s cubic-bezier(.2,.8,.2,1) forwards; animation-delay:var(--reveal-delay); }
.card-face { font-style:normal; }
@keyframes showdown-row { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:translateY(0); } }
@keyframes reveal-card { 0% { transform:rotateY(90deg) scale(.88); background:#ffd879; } 65% { transform:rotateY(-8deg) scale(1.05); } 100% { transform:rotateY(0) scale(1); } }
@keyframes turn-pulse { 50% { box-shadow:0 0 0 9px #ff8b7e35,0 0 0 14px #fff4a744,5px 6px 0 #31534b38; transform:translate(-50%,-53%) rotate(1deg); } }
@keyframes bot-think-pulse { 50% { box-shadow:0 0 0 8px #69b9a24d,0 0 0 13px #fff4a744,5px 6px 0 #31534b38; transform:translate(-50%,-52%) rotate(1deg); } }
@keyframes thinking-dot { 50% { opacity:.25; transform:translateY(-2px); } }
dialog { width:min(420px,calc(100% - 32px)); padding:28px; border:3px solid var(--ink); border-radius:25px 20px 27px 18px; background:#fffdf5; color:var(--ink); text-align:center; box-shadow:9px 10px 0 #31534b48; }
dialog::backdrop { background:#5f9c8988; backdrop-filter:blur(5px); }
.private-cards { margin:23px 0; }
.history-toggle { background:#ffcad0; }
.history-panel,.rules-panel { position:fixed; z-index:30; right:0; top:0; width:min(380px,92vw); height:100vh; padding:25px 22px; overflow-y:auto; border-left:3px solid var(--ink); background:#fffdf5; box-shadow:-10px 0 0 #31534b1e; transform:translateX(calc(100% + 12px)); transition:transform .3s cubic-bezier(.2,.9,.2,1); }
.history-panel.open,.rules-panel.open { transform:translateX(0); }
.history-head { display:flex; justify-content:space-between; align-items:flex-start; padding-bottom:18px; border-bottom:2px dashed #9ccdbd; }
.history-head h2 { margin:0; font-size:25px; }
.icon-button { width:38px; height:38px; padding:0; background:#ffd8dc; font-size:24px; }
.empty-history { margin-top:60px; color:#79a295; text-align:center; line-height:1.8; }
.empty-history span { font-size:12px; }
.history-list { margin:20px 0; padding:0; list-style:none; }
.history-list li { display:grid; grid-template-columns:auto 1fr; gap:3px 10px; margin-bottom:14px; padding:14px; border:2px solid var(--ink); border-radius:14px 11px 16px 10px; background:#f3fbf7; box-shadow:3px 3px 0 #31534b22; }
.history-list li strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.history-list li > span:nth-of-type(2) { color:#e06f5c; font-size:13px; text-align:right; }
.history-list small { grid-column:1/-1; color:#7b9d93; }
.history-matchup { grid-column:1/-1; margin:7px 0 3px; padding:8px 10px; border:1.5px dashed #8fbdaf; border-radius:9px; background:#fffdf5; color:#955f42; font-size:12px; font-weight:900; line-height:1.6; }
.history-matchup i { margin:0 4px; color:#e06f5c; font-style:normal; text-transform:uppercase; }
.history-round { color:#5f9f8c; font-size:12px; font-weight:900; }
.final-result { margin-top:25px; padding-top:20px; border-top:2px dashed #9ccdbd; }
.rank-row { display:grid; grid-template-columns:34px 1fr auto; align-items:center; padding:10px 4px; border-bottom:1px dashed #b7d8cd; }
.rank-row strong { color:#e26e58; }
.flying-chip { position:fixed; z-index:99; left:0; top:0; pointer-events:none; animation:chip-flight .65s cubic-bezier(.3,.7,.4,1) forwards; transform:translate(var(--from-x),var(--from-y)) scale(1.15); }
.chip-1 { background:#ffd464; }.chip-2 { background:#7bd5df; }
@keyframes chip-flight { 55% { transform:translate(calc((var(--from-x) + var(--to-x))/2),calc(var(--from-y) - 85px)) rotate(280deg) scale(1); } 100% { transform:translate(var(--to-x),var(--to-y)) rotate(620deg) scale(.6); opacity:.2; } }
@keyframes bob { 50% { transform:translate(-50%,-53%) rotate(1deg); } }

@media (max-width:760px) {
  main { width:min(100% - 20px,620px); padding-top:70px; }
  .topbar { align-items:center; }.table-shell { border-radius:82px; padding:8px; }.felt { min-height:510px; border-radius:70px; }
  .player { width:max-content; min-width:128px; max-width:160px; padding:6px; font-size:12px; }.player-info { gap:5px; }.cat-avatar { flex-basis:45px; width:45px; transform:scale(.84); transform-origin:left center; margin-right:-7px; }.player-hand-button { bottom:-24px; }.bet { font-size:9px; }.center { width:92%; }.cards { gap:4px; }.card { width:44px; }
  .control-panel,.actions,.allin-choice { grid-template-columns:1fr; }.join-form { flex-wrap:wrap; }.join-form input { flex:1; }.action-buttons { grid-template-columns:1fr; }.basic-actions,.wager-actions { width:100%; }.wager-actions { grid-template-columns:1fr 1fr; }.raise-group { grid-column:1/-1; border-left:0; border-top:2px dashed #d7aa51; padding:9px 0 0; }.raise-confirm { grid-template-columns:auto 70px 1fr; }.run-buttons button { min-width:0; padding:9px 5px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
