*{box-sizing:border-box}
:root{color-scheme:dark;--pk-gold:#f4b24c;--pk-text:#f3f1e9;--pk-muted:#b9bdd6;--pk-border:rgba(255,255,255,.14)}
html{min-width:320px;min-height:100%;background:#0a0d22;touch-action:pan-x pan-y}
body{margin:0;min-height:100vh;background-color:#0a0d22;background-image:var(--alibi-page-background,radial-gradient(120% 60% at 50% 0%,#101635 0%,#0a0d22 45%,#06080f 100%));background-attachment:fixed;color:#f3f1e9;font:15px/1.45 system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
[hidden]{display:none!important}
a{color:#f4b24c;text-decoration:none}
a:hover{color:#ffd98a}
button,input,textarea{font:inherit}
button,.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:#12173a;color:#f3f1e9;font-weight:600;line-height:1.25;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s,border-color .15s}
button:hover,.button:hover{background:#1b224a;border-color:rgba(244,178,76,.55);color:#ffd98a}
button:disabled{opacity:.45;cursor:default}
button.primary,.button.primary{background:#f4b24c;color:#1b1420;border-color:#f4b24c;font-weight:750}
button.primary:hover,.button.primary:hover{background:#ffd98a;border-color:#ffd98a;color:#1b1420}
button.quiet,.button.quiet{background:transparent;border-color:rgba(255,255,255,.1)}
:focus-visible{outline:2px solid #ffd98a;outline-offset:3px}
input,textarea{max-width:100%;min-height:44px;padding:10px 12px;border:1px solid rgba(255,255,255,.18);border-radius:10px;background:#090d23;color:#f3f1e9}
input::placeholder,textarea::placeholder{color:#9aa0c0}
h1,h2,h3,p{margin-top:0}
h1{font-size:32px;line-height:1.15;letter-spacing:-.025em}
h2{font-size:18px;line-height:1.3;margin-bottom:12px}
h3{font-size:16px;line-height:1.3}
.page-head{min-height:70px;max-width:1440px;margin:0 auto;padding:18px 28px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid rgba(255,255,255,.08)}
.page-brand{color:#f3f1e9;font-size:17px;font-weight:750;letter-spacing:-.015em}
.head-note,.lobby-link{font-size:13px;color:#b9bdd6}
.lobby-main{max-width:1180px;margin:auto;padding:24px 28px 32px}
.lobby-heading{display:flex;justify-content:space-between;align-items:center;padding:6px 0 22px;gap:18px}
.lobby-heading h1{margin:3px 0 8px}
.lobby-heading p:last-child{margin-bottom:0}
.eyebrow{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:#f4b24c;margin:0}
.heading-suit{font-size:60px;color:#f4b24c;line-height:1;margin-right:12px}
.muted{color:#b9bdd6}
.lobby-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px;align-items:start}
.tables-column{min-width:0;padding:22px;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:rgba(12,16,38,.7)}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.section-head h2{margin:0}
.section-head button{font-size:13px;padding:8px 12px;min-height:36px}
.table-rules{font-size:13px;color:#b9bdd6;margin:14px 0 18px}
.tables-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.table-card{min-width:0;padding:16px 14px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:linear-gradient(160deg,#171d40,#0c1026)}
.table-card-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.table-card-heading h3{margin:0;overflow-wrap:anywhere}
.table-suit{font-size:23px;color:#ffd98a;line-height:1}
.table-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:#b9bdd6}
.table-status:before{content:'';width:5px;height:5px;border-radius:50%;background:#9aa0c0}
.table-status.is-playing{color:#8ae1a9}
.table-status.is-playing:before{background:#5fd08a}
.table-card-info{font-size:13px;color:#b9bdd6;margin:13px 0}
.table-card-actions{display:flex;gap:8px}
.table-card-actions .button{flex:1;white-space:nowrap;font-size:12px;padding:10px 8px}
.empty-tables{grid-column:1/-1;padding:32px 20px;border:1px dashed rgba(255,255,255,.13);border-radius:16px;text-align:center}
.empty-tables h3{margin-bottom:8px}
.empty-tables p{margin:0;font-size:14px}
.create-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:20px}
.create-row p{font-size:12px;flex:1;min-width:160px;margin:0}
.watch-note{font-size:12px;color:#9aa0c0;margin:18px 0 0}
.wallet-panel,.rules-panel{padding:22px;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:linear-gradient(160deg,#171d40,#0c1026)}
.wallet-panel h2{font-size:16px}
.balance{display:flex;gap:10px;align-items:baseline;margin:16px 0 6px}
.balance strong{font-size:36px;font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.03em;color:#ffd98a}
.balance span{color:#b9bdd6;font-size:13px}
.wallet-panel>.muted{font-size:12px;margin-bottom:18px}
.wallet-panel button{width:100%;font-size:13px}
.rules-panel{margin-top:14px;background:rgba(12,16,38,.7)}
.rules-panel h2{font-size:15px}
.rules-panel p{font-size:13px;margin:10px 0 0}
.page-foot{max-width:1180px;margin:auto;padding:14px 28px 24px;text-align:center;font-size:12px}
.page-foot a{color:#9aa0c0;text-decoration:underline;text-underline-offset:3px}
.page-foot a:hover{color:#ffd98a}
.page-notice,.connection-notice{padding:12px 16px;border:1px solid rgba(244,178,76,.25);border-radius:12px;background:#1a1c33;color:#ffd98a;font-size:14px}
.page-notice{margin:0 0 20px}
.connection-notice{max-width:1180px;margin:12px auto}
.page-notice.error,.connection-notice.error{color:#ffb4b8;border-color:rgba(229,72,77,.45);background:#27162a}
.inline-error{padding:10px 12px;border:1px solid rgba(229,72,77,.45);border-radius:10px;background:#27162a;color:#ffb4b8;font-size:13px}
.sheet{width:calc(100% - 32px);max-width:500px;max-height:calc(100dvh - 32px);padding:26px;border:1px solid rgba(244,178,76,.35);border-radius:20px;background:linear-gradient(160deg,#171d40,#0c1026);color:#f3f1e9;box-shadow:0 24px 90px rgba(0,0,0,.55);overflow:auto}
.sheet::backdrop{background:rgba(4,6,15,.76)}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.sheet-head h2{font-size:21px;margin:0}
.sheet-suit{font-size:26px;color:#f4b24c}
.sheet-lead{font-size:13px;color:#ffd98a;margin-bottom:20px}
.sheet p{font-size:14px}
.create-facts{margin:20px 0;display:grid;gap:0;border:1px solid rgba(255,255,255,.1);border-radius:12px;overflow:hidden}
.create-facts div{display:flex;justify-content:space-between;padding:10px 12px;gap:16px;border-bottom:1px solid rgba(255,255,255,.07)}
.create-facts div:last-child{border-bottom:0}
.create-facts dt{color:#b9bdd6;font-size:13px}
.create-facts dd{font-size:14px;font-weight:650;margin:0}
.sheet-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.sheet-actions button{min-width:108px}
.about-sheet{max-width:700px}
.about-sheet .sheet-head button{font-size:12px;min-height:36px;padding:8px 12px}
.license-text{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;color:#c5c8df;margin:20px 0 0}
.signin-card{max-width:480px;margin:70px auto;padding:32px;border:1px solid rgba(244,178,76,.3);border-radius:22px;background:linear-gradient(160deg,#171d40,#0c1026);text-align:center}
.signin-suit{display:inline-block;color:#f4b24c;font-size:44px;line-height:1;margin-bottom:22px}
.signin-card h1{font-size:24px;line-height:1.3;margin-bottom:14px}
.signin-card p{font-size:14px;margin-bottom:24px}
.signin-card .button{width:100%}
.table-page .page-head{max-width:none}
.table-page>section[data-signin]{padding:0 20px}
.table-foot{max-width:none}
@media(max-width:1000px){.lobby-layout{grid-template-columns:minmax(0,1fr) 260px;gap:16px}.tables-list{grid-template-columns:1fr}.tables-column{padding:18px}}
@media(max-width:700px){.page-head{min-height:58px;padding:14px 16px;gap:12px}.page-brand{font-size:15px}.head-note{display:none}.lobby-link{font-size:12px}.lobby-main{padding:20px 16px}.lobby-heading{padding:0 0 20px}.lobby-heading h1{font-size:28px}.heading-suit{font-size:46px;margin-right:4px}.lobby-layout{display:flex;flex-direction:column;gap:16px}.tables-column,.lobby-aside{width:100%}.tables-column{padding:16px;border-radius:18px}.table-card{padding:16px}.table-card-actions .button{font-size:13px}.table-status{margin-left:auto}.create-row{gap:12px;flex-direction:column;align-items:stretch}.create-row p{min-width:0;text-align:center}.wallet-panel{padding:18px}.rules-panel{display:none}.page-foot{padding:8px 16px 20px}.sheet{padding:22px}.sheet-actions button{min-width:0;flex:1}.signin-card{margin:36px auto;padding:26px 22px}.signin-card h1{font-size:22px}.connection-notice{margin:8px 12px;font-size:12px}.table-page .page-head{min-height:54px;padding:12px 16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.table-page [data-table-root]{padding:0 24px}
.table-page .page-head{padding-left:24px;padding-right:24px;min-height:58px}
.table-page .table-foot{padding:8px 24px;font-size:12px}
.table-page.is-disconnected .pk-module{opacity:.55}
.connection-notice.error{color:#ffd98a;border-color:rgba(244,178,76,.5);background:#252139;display:flex;gap:10px;align-items:center;max-height:70px;overflow:auto}
.connection-notice.error::before,.inline-error::before,.page-notice.error::before{content:"!";display:inline-block;font-size:26px;font-weight:900;line-height:1;flex:none;margin-right:6px}
.table-status,.table-availability{padding:2px 7px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);font-size:11.5px;white-space:nowrap}
.table-availability.is-available{color:#9fe6b9;border-color:rgba(95,208,138,.4);background:rgba(95,208,138,.1)}
.table-watch-icon{flex:none}
.create-facts{border:0;border-radius:0;gap:10px}
.create-facts div{padding:0 0 10px;border-bottom:1px solid rgba(255,255,255,.08)}
.sheet-actions button{white-space:nowrap}
.table-page .connection-notice{margin:6px 24px}
@media(max-width:800px){
.table-page [data-table-root]{padding:0 16px}
.table-page .page-head{padding:8px 16px;min-height:38px}
.table-page .table-foot{padding:5px 16px}
.table-page .connection-notice{margin:5px 16px;font-size:12px}
.sheet{width:100%;max-width:none;margin:0;inset:auto 0 0;border-radius:22px 22px 0 0;padding:20px 16px;max-height:calc(100dvh - 16px)}
.about-sheet{max-height:90dvh}
.sheet-actions{gap:8px}
.sheet-actions button{padding:10px 8px;font-size:13px}
}
@media(max-height:600px) and (max-width:800px){
.table-page .page-head{min-height:28px;padding:4px 16px}
.table-page .page-brand{font-size:12px}
.table-page .table-foot{padding:3px 16px;font-size:11px}
.table-page .connection-notice{margin:3px 16px;padding:4px 6px;max-height:38px}
}

/* Creation settings stay scoped to the lobby dialog, outside the table layout. */
#create-dialog{padding:0;overflow:hidden}
#create-table{display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}
#create-dialog .create-fields{min-height:0;overflow:auto;padding:18px 20px 12px;overscroll-behavior:contain}
#create-dialog .sheet-head{margin-bottom:8px}
#create-dialog .sheet-lead{margin-bottom:10px}
#create-dialog .create-settings{min-width:0;margin:10px 0;padding:10px;border:1px solid var(--pk-border);border-radius:12px}
#create-dialog .create-settings legend{padding:0 5px;font-weight:650}
#create-dialog .create-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#create-dialog .create-settings-grid label,#create-dialog .create-fields>label{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;color:var(--pk-muted)}
#create-dialog .create-settings-grid input,#create-dialog .create-fields>label>input{width:100%;min-width:0;min-height:38px;padding:7px 9px;color:var(--pk-text)}
#create-dialog .create-fields>p,#create-dialog .create-settings p{margin:6px 0 0;font-size:12px;overflow-wrap:anywhere}
#create-dialog .create-suggest{width:100%;min-height:36px;margin-top:8px;padding:7px 9px;font-size:13px}
#create-dialog .create-blinds-result{color:var(--pk-gold)}
#create-dialog .create-blinds-result:empty{display:none}
#create-dialog .sheet-actions{flex:none;position:relative;z-index:1;margin:0;padding:12px 20px;background:#10152f;border-top:1px solid var(--pk-border)}
#create-dialog [data-create-error]{flex:none;margin:0;padding:8px 20px;border-radius:0}
@media(max-width:800px){#create-table{max-height:calc(100dvh - 16px)}#create-dialog .create-fields{padding:16px 16px 10px}#create-dialog .sheet-actions{padding:10px 16px}}

/* Keep native focus from magnifying mobile nickname, chat and stake fields. */
@media(any-pointer:coarse){html body :is(input,textarea,select){font-size:16px!important}}
