/* Sanxlipp game navigation: landscape first, with a portrait fallback. */
[hidden]{display:none!important}
body:has(.game-hub){background:#181818 url('/assets/mats/flags-black-tile.svg') center/380px auto}
#app.home:has(.game-hub){max-width:none;padding:18px 3vw;color:#faf9f4;min-height:calc(100dvh - 150px)}
.game-hub{max-width:1600px;margin:auto}.hub-nav{display:flex;gap:8px;border-bottom:1px solid #ffffff25;padding-bottom:12px;margin-bottom:20px}.hub-nav button,.profile-tabs button{border:1px solid #ffffff40;border-radius:10px;background:#282828;color:#eee;padding:12px 22px;font:inherit;font-weight:800;white-space:nowrap}.hub-nav button[aria-pressed=true],.profile-tabs button[aria-pressed=true]{background:#fff000;color:#151515;border-color:#fff000}.hub-nav button:last-child{margin-left:auto}
.hub-welcome{min-height:560px;height:calc(100dvh - 240px);display:grid;grid-template-columns:1.1fr 1fr .85fr;gap:3vw;align-items:center}.hub-copy h1{font-size:clamp(38px,5.3vw,84px);font-style:italic;font-weight:900;line-height:1;letter-spacing:-2px}.hub-copy p{color:#bbb;line-height:1.6;margin-bottom:22px}.hub-primary,.hub-secondary{display:block;width:100%;padding:20px;border-radius:12px;font:inherit;font-weight:900;text-align:left;margin:12px 0}.hub-primary{background:#fff000;color:#101010;border:0}.hub-secondary{background:#faf9f4;color:#111;border:0}.hub-identity{border:0;background:radial-gradient(ellipse,#fff00018,transparent 68%);color:#fff;display:flex;flex-direction:column;align-items:center;gap:14px;padding:30px 0;font:inherit}.hub-identity .identity-avatar.large{width:clamp(150px,19vw,310px);height:clamp(150px,19vw,310px);margin-bottom:75px}.hub-identity strong{font-size:26px}.hub-identity>span:last-child{font-size:13px;color:#ccc}.hub-quick>button{width:100%;padding:28px;border-radius:18px;border:1px solid #ffffff35;background:#faf9f4;color:#171717;text-align:left;display:grid;gap:16px;font:inherit}.hub-quick>button>span{font-size:10px;letter-spacing:2px}.hub-quick strong{font-size:26px}.hub-quick small{font-size:13px;line-height:1.5}.hub-score{display:flex;gap:22px;justify-content:space-between;margin-top:30px}.hub-score b{font-size:27px}.hub-score small{display:block;font-size:11px;color:#bbb;font-weight:500;margin-top:8px}
.game-hub .mode-group .section-title{color:white}.game-hub .mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.game-hub .mode{background:#faf9f4}.game-hub .mode-thumbnail{height:clamp(140px,28dvh,300px)}.game-hub .mode-group{margin:0}.game-hub .subtle{color:#aaa}
.hub-browser{display:grid;grid-template-columns:1fr 290px;gap:24px}.hub-browser .room-browser{margin:0;background:#faf9f4;color:#171717;padding:24px;border-radius:16px;min-width:0}.hub-browser .join-panel{margin:0;background:#fff000;color:#151515;border-radius:16px;padding:24px}.hub-browser .join-panel h2{font-size:28px}.hub-browser .join-panel p{font-size:13px;color:#333}.hub-browser #room-results{max-height:calc(100dvh - 360px);overflow:auto;min-height:120px}.hub-browser .available-room{background:white}.hub-browser .section-title{flex-wrap:wrap}.hub-browser .available-room h3{font-size:18px}.hub-browser .available-room .primary{min-height:44px}
.account-dialog.profile-workspace{width:calc(100vw - 32px);max-width:1500px;height:calc(100dvh - 32px);max-height:none;padding:24px;border-radius:20px;background:#191919 url('/assets/mats/flags-black-tile.svg') center/420px auto;color:#fff;overflow:hidden}.profile-workspace>.eyebrow{height:28px;color:#fff000}.profile-workspace>.account-close{background:#faf9f4;border-radius:9px;width:42px;height:42px;z-index:3;color:#111;line-height:1}.profile-tabs{display:flex;gap:8px;padding-right:50px;margin-bottom:18px}.profile-layout{display:grid;grid-template-columns:260px 1fr;gap:24px;height:calc(100% - 110px);min-height:0}.profile-summary{background:#ffffff09;border:1px solid #ffffff20;border-radius:18px;padding:24px;overflow:auto;text-align:center}.profile-summary .profile-photo{display:block;margin:0}.profile-summary .profile-photo>div:last-child{display:none}.profile-summary .identity-avatar.large{width:140px;height:140px;margin-bottom:50px}.profile-summary h2{font-size:24px;overflow-wrap:anywhere}.profile-summary>p{font-size:11px;color:#aaa;overflow-wrap:anywhere}.profile-summary .wallet-panel{color:#111;justify-content:center;margin-top:20px}.profile-summary .wallet-panel small{font-size:10px}.profile-summary .account-stats{padding:12px 0;margin:18px 0;color:#fff;gap:5px}.profile-summary .account-stats b{font-size:22px}.profile-summary .account-stats span{font-size:10px}.profile-content{background:#faf9f4;color:#161616;border-radius:18px;padding:24px;overflow:auto;min-width:0;overscroll-behavior:contain}.profile-content #profile-form{margin:0}.profile-content .avatar-options{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:16px}.profile-content .mat-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.profile-content .regalia-options{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}.profile-workspace>.account-error{position:absolute;bottom:4px;left:24px;font-size:12px;margin:0;color:#ffb59f!important}.profile-content #profile-save-status{position:sticky;bottom:0;background:#faf9f4;padding:8px;color:#555;min-height:20px}
@media(max-width:1000px){.hub-welcome{grid-template-columns:1fr 1fr;min-height:400px;height:auto}.hub-quick{grid-column:1/-1;display:flex;gap:20px;align-items:center}.hub-quick>button{flex:1;padding:18px}.hub-score{flex:1;margin:0}.hub-browser{grid-template-columns:1fr 240px}.profile-layout{grid-template-columns:200px 1fr}.profile-summary{padding:16px}.profile-content{padding:18px}}
@media(max-width:1000px) and (orientation:landscape){body:has(.game-hub) .topbar{height:54px;padding:5px 18px;display:flex;justify-content:space-between}body:has(.game-hub) .social-links,body:has(.game-hub) .site-links,body:has(.game-hub) .connection{display:none}body:has(.game-hub) .header-center{gap:0}body:has(.game-hub) .brand{font-size:16px}body:has(.game-hub) .top-right{gap:8px}#app.home:has(.game-hub){padding:8px 18px;min-height:calc(100dvh - 54px)}.hub-nav{margin-bottom:10px;padding-bottom:8px;gap:6px}.hub-nav button{padding:8px 12px;font-size:12px}.hub-welcome{height:calc(100dvh - 120px);min-height:240px;grid-template-columns:1fr .8fr .85fr;gap:22px}.hub-copy h1{font-size:34px;letter-spacing:-1px;margin:12px 0}.hub-copy p{display:none}.hub-copy .eyebrow{font-size:8px}.hub-primary,.hub-secondary{padding:12px;margin:8px 0;font-size:12px}.hub-identity{padding:0;gap:6px}.hub-identity .identity-avatar.large{width:115px;height:115px;margin-bottom:34px}.hub-identity strong{font-size:18px}.hub-identity>span:last-child{font-size:10px}.hub-quick{grid-column:auto;display:block}.hub-quick>button{padding:16px;gap:10px}.hub-quick strong{font-size:20px}.hub-quick small{font-size:10px}.hub-score{margin-top:14px;gap:12px}.hub-score b{font-size:20px}.game-hub .section-title{margin-bottom:8px}.game-hub .section-title h2{font-size:20px}.game-hub .mode-thumbnail{height:100px}.game-hub .mode{min-height:0}.game-hub .mode strong{font-size:24px;margin-top:0}.game-hub .mode-desc{font-size:11px}.game-hub .mode-top{display:none}.game-hub .mode>.eyebrow{margin-top:8px}.hub-browser{gap:12px;grid-template-columns:1fr 220px}.hub-browser .room-browser,.hub-browser .join-panel{padding:14px}.hub-browser .join-panel h2{display:none}.hub-browser #room-results{max-height:calc(100dvh - 230px)}.hub-browser .section-title h2{font-size:22px}.hub-browser .join-panel input{padding:8px;height:38px}.profile-workspace.profile-workspace{padding:12px;height:calc(100dvh - 12px);width:calc(100vw - 12px)}.profile-workspace>.eyebrow{height:20px;font-size:9px}.profile-tabs{margin-bottom:8px}.profile-tabs button{padding:8px 14px;font-size:12px}.profile-layout{height:calc(100% - 72px);grid-template-columns:180px 1fr;gap:12px}.profile-summary{padding:12px}.profile-summary .identity-avatar.large{width:80px;height:80px;margin-bottom:24px}.profile-summary h2{font-size:16px;margin:6px 0}.profile-summary>p,.profile-summary .wallet-panel small{display:none}.profile-summary .wallet-panel{padding:8px;margin-top:8px;font-size:12px}.profile-summary .account-stats{margin:8px 0;padding:6px}.profile-summary .account-stats b{font-size:16px}.profile-content{padding:14px}.profile-content .avatar-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.profile-content .regalia-options{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px) and (orientation:portrait){.hub-nav{overflow:auto}.hub-nav button{font-size:12px;padding:10px}.hub-nav button:last-child{margin-left:0}.hub-welcome{display:flex;flex-direction:column-reverse;gap:20px}.hub-quick{order:-1;width:100%;display:block}.hub-score{margin:20px 0}.hub-copy{width:100%}.hub-copy h1{font-size:40px}.hub-identity .identity-avatar.large{width:140px;height:140px;margin-bottom:42px}.hub-copy p{display:none}.game-hub .mode-grid{grid-template-columns:1fr}.hub-browser{grid-template-columns:1fr}.hub-browser .join-panel{grid-row:1}.hub-browser .join-panel h2,.hub-browser .join-panel p{display:none}.hub-browser #room-results{max-height:none}.profile-layout{grid-template-columns:1fr;grid-template-rows:125px 1fr;gap:12px}.profile-summary{display:grid;grid-template-columns:90px 1fr;gap:2px 14px;padding:12px;text-align:left}.profile-summary .profile-photo{grid-row:1/4}.profile-summary .identity-avatar.large{width:72px;height:72px;margin-bottom:0}.profile-summary h2{font-size:18px;margin:0}.profile-summary>p,.profile-summary .account-stats,.profile-summary .wallet-panel small{display:none}.profile-summary .wallet-panel{margin:0;padding:6px;font-size:12px}.profile-tabs{overflow:auto;padding-right:0;gap:5px}.profile-tabs button{font-size:12px;padding:9px}.profile-content .mat-options{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-workspace>.eyebrow{padding-right:40px}.profile-content .avatar-options{grid-template-columns:repeat(3,minmax(0,1fr))}}

.hub-more{position:relative;align-self:center;z-index:20}.hub-more summary{padding:12px;cursor:pointer;font-size:13px}.hub-more>div{position:absolute;right:0;top:100%;min-width:180px;background:#faf9f4;color:#111;border:1px solid #ddd;border-radius:12px;padding:10px;box-shadow:0 10px 25px #0005;display:grid;gap:4px}.hub-more a,.hub-more>div>button{padding:12px;font-size:13px;text-align:left;border:0;background:none;color:#111}.room-filters{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:12px;margin-bottom:16px}.room-filters label{font-size:11px;display:grid;gap:6px;min-width:0}.room-filters input,.room-filters select{width:100%;min-width:0;height:44px;border:1px solid #ccc;border-radius:8px;padding:8px;background:#fff;color:#111;font:inherit;font-size:13px}
@media(max-width:1000px) and (orientation:landscape){body:has(.game-hub) .connection-bar{display:none}body:has(.game-hub) .account-button{padding:4px 8px;max-height:44px;overflow:visible}body:has(.game-hub) .account-button .identity-avatar{width:26px;height:26px}.hub-welcome{min-height:215px;height:calc(100dvh - 120px)}.hub-more summary{padding:8px;font-size:12px}.room-filters{gap:6px;margin-bottom:8px}.room-filters input,.room-filters select{height:34px;font-size:11px}.hub-browser #room-results{max-height:calc(100dvh - 235px)}}
@media(max-width:600px) and (orientation:portrait){.room-filters{grid-template-columns:1fr 1fr}.room-filters label:nth-child(2){grid-column:1/-1;grid-row:2}.hub-more{position:static}.hub-more>div{top:auto;right:15px}.hub-nav{align-items:center}}
.hub-browser #join-form{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.hub-browser #join-form label{display:grid;gap:6px}.hub-browser #join-form input{width:100%;min-width:0}.hub-browser #join-form button{width:100%;font-size:12px;min-height:44px}.hub-browser .code-input{font-size:20px;letter-spacing:4px}
@media(max-width:1000px) and (orientation:landscape){.game-hub .mode .original-mini.mini-0,.game-hub .mode .original-mini.mini-1,.game-hub .mode .original-mini.mini-2{top:28px}.game-hub .thumb-label{font-size:8px;padding:5px 9px}.game-hub .expansion-mini{width:42px;top:5px}}
body:has(.profile-workspace[open]){overflow:hidden}
/* Keep one fixed origin for the motif across every home menu. */
body:has(.game-hub){background-position:0 0;background-attachment:fixed;overflow-x:hidden}.game-hub{min-width:0}.hub-welcome{grid-template-columns:1.15fr 1fr}.hub-quick{grid-column:1/-1;justify-self:center;min-width:280px}.hub-score{margin-top:0}.hub-more>div{background:#202020;color:#fff;border-color:#555}.hub-more a,.hub-more>div>button{color:#fff}.hub-more:not([open])>div{display:none}
@media(orientation:landscape) and (max-height:600px){
 body:has(.game-hub){height:100dvh;overflow:hidden}
 body:has(.game-hub) .topbar{height:44px;min-height:44px;padding:4px 12px;display:flex;justify-content:space-between;gap:10px}
 body:has(.game-hub) .connection-bar,body:has(.game-hub) .social-links,body:has(.game-hub) .site-links{display:none}
 body:has(.game-hub) .header-center{gap:0}body:has(.game-hub) .brand{font-size:14px;white-space:nowrap}body:has(.game-hub) .top-right{gap:6px}body:has(.game-hub) .account-button{max-height:36px;padding:3px 8px;font-size:11px}body:has(.game-hub) .account-button .identity-avatar{width:24px;height:24px}body:has(.game-hub) .wallet-button{padding:5px 8px;font-size:12px}
 #app.home:has(.game-hub){height:calc(100dvh - 44px);min-height:0;max-height:calc(100dvh - 44px);padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));overflow:hidden}
 .game-hub{height:100%;display:flex;flex-direction:column}.hub-nav{flex-shrink:0;margin:0 0 6px;padding:0 0 6px;gap:5px;min-height:36px;align-items:center}.hub-nav button{padding:7px 11px;font-size:11px;margin-left:0!important;min-height:30px}.hub-more summary{padding:7px;font-size:11px}.hub-nav .hub-more{margin-left:auto}
 .game-hub>[data-hub-panel]{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
 .game-hub>[data-hub-panel=solo],.game-hub>[data-hub-panel=multi]{overflow:hidden}.game-hub .mode-group{height:100%;display:flex;flex-direction:column;min-height:0}.game-hub .mode-group>.section-title{display:none}
 .game-hub .mode-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;flex:1;min-height:0}
 .game-hub .mode{min-height:0;height:100%;display:grid;grid-template-columns:36% 1fr;grid-template-rows:auto auto 1fr;column-gap:18px;row-gap:2px;padding:0 16px 0 0;overflow:hidden;align-items:center;border-radius:12px}
 .game-hub .mode .mode-thumbnail{position:relative;grid-column:1;grid-row:1/4;height:100%;width:100%;margin:0;min-height:0;align-self:stretch;border-radius:0}
 .game-hub .mode>.mode-top{display:none}.game-hub .mode>.eyebrow{grid-column:2;grid-row:1;margin:10px 0 0;padding:0;font-size:8px}.game-hub .mode>strong{grid-column:2;grid-row:2;margin:0;padding:0;font-size:clamp(20px,3.2vw,28px);line-height:1.1}.game-hub .mode>.mode-desc{grid-column:2;grid-row:3;margin:0 0 8px;padding:0;font-size:11px;line-height:1.3;align-self:start}
 .game-hub .mode .original-mini.mini-0,.game-hub .mode .original-mini.mini-1,.game-hub .mode .original-mini.mini-2{top:calc(50% - 20px);width:24%}.game-hub .thumb-label{top:6px;right:6px;font-size:7px;padding:4px 7px}.game-hub .expansion-mini{top:4px;left:8px;width:32px}
 .hub-welcome{height:auto;min-height:0;grid-template-columns:1.2fr 1fr;grid-template-rows:1fr auto;gap:6px 28px;overflow:hidden!important}.hub-copy{grid-column:1;grid-row:1/3}.hub-copy h1{font-size:clamp(26px,4vw,40px);margin:8px 0}.hub-copy p{display:none}.hub-primary,.hub-secondary{padding:12px;margin:8px 0;font-size:12px}.hub-identity{grid-column:2;grid-row:1;padding:0;gap:3px}.hub-identity .identity-avatar.large{width:clamp(70px,25dvh,110px);height:clamp(70px,25dvh,110px);margin-bottom:30px}.hub-identity strong{font-size:16px}.hub-identity>span:last-child{font-size:10px}.hub-quick{grid-column:2;grid-row:2;min-width:0;justify-self:stretch;display:block}.hub-score{justify-content:center;gap:25px;margin:5px 0}.hub-score b{font-size:18px}.hub-score small{font-size:9px;margin-top:2px}
 .hub-browser{grid-template-columns:1fr 200px;gap:10px;overflow:hidden!important}.hub-browser .room-browser{display:flex;flex-direction:column;padding:12px;overflow:hidden}.hub-browser .join-panel{padding:12px;overflow:auto}.hub-browser #room-results{min-height:0;max-height:none;flex:1;overflow:auto}.hub-browser .section-title{margin-bottom:8px}.hub-browser .section-title h2{font-size:20px}.hub-browser .section-title .eyebrow{display:none}.hub-browser .section-title .secondary{padding:8px;font-size:10px}.room-filters{margin-bottom:8px}.room-filters input,.room-filters select{height:32px;font-size:10px}.hub-browser #join-form{gap:6px}.hub-browser .join-panel p{margin-bottom:5px;font-size:11px}.hub-browser .join-panel .eyebrow{font-size:8px}
}
@media(orientation:landscape) and (max-height:360px){.hub-copy>.eyebrow{display:none}.hub-identity .identity-avatar.large{width:70px;height:70px;margin-bottom:22px}.hub-identity>span:last-child{display:none}.game-hub .mode>.eyebrow{display:none}.game-hub .mode{grid-template-rows:1fr 1fr}.game-hub .mode>strong{grid-row:1;align-self:end}.game-hub .mode>.mode-desc{grid-row:2}.game-hub .mode .mode-thumbnail{grid-row:1/3}}
@media(orientation:landscape) and (max-height:600px){#mode-setup{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 12px);padding:16px 22px}#mode-setup>h2{font-size:25px;margin:5px 0}#mode-setup>p{font-size:11px;margin:5px 0}#mode-setup .create-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}#mode-setup .create-form label{font-size:11px;gap:3px}#mode-setup .create-form input,#mode-setup .create-form select{height:35px;padding:6px 10px;font-size:12px}#mode-setup .create-form .primary{grid-column:1/-1;min-height:38px;padding:10px;font-size:12px}#mode-setup .create-form .public-room-option input{height:auto}#mode-setup .create-form>p{font-size:12px;margin:3px 0}}
