#playdown-hub{position:fixed;z-index:45;background:linear-gradient(#154e89,#071c38);color:#fff;overflow:auto;font-family:Arial,sans-serif;font-size:16px;box-sizing:border-box;overscroll-behavior:contain}
#playdown-hub[hidden],#playdown-hub [hidden]{display:none!important}
#playdown-hub *{box-sizing:border-box}
#playdown-hub button,#playdown-hub input{font:inherit;min-height:44px}
#playdown-hub button{border:0;border-radius:16px;cursor:pointer;color:inherit;background:transparent;padding:10px 14px}
#playdown-hub button:focus-visible,#playdown-hub input:focus-visible{outline:3px solid #e9bc67;outline-offset:3px}
#playdown-hub button:disabled{opacity:.5;cursor:default}
#hub-page{min-height:100%;padding:42px 16px 24px;display:flex;flex-direction:column;gap:20px}
#hub-page>[data-hub-screen]{display:flex;flex-direction:column;gap:20px}
#hub-page label[for=hub-nickname]{min-height:24px}
.hub-header{display:flex;align-items:center;justify-content:space-between;min-height:44px;gap:8px}
.hub-header img{width:125px;max-height:44px}
#playdown-hub h1{font-size:28px;margin:0 8px;font-weight:800}
#playdown-hub h2{font-size:22px;margin:0 0 12px}
#playdown-hub p{line-height:1.45;margin:0}
.hub-subtitle{margin:0 8px!important;font-size:14px}
.hub-panel{background:#f7f3ea;color:#173a45;border-radius:24px;padding:24px;display:flex;flex-direction:column;gap:16px}
.hub-panel label{display:flex;gap:12px;align-items:center;min-height:56px;line-height:1.4}
.hub-panel input[type=checkbox]{width:22px;min-width:22px;accent-color:#267d78}
.hub-panel input[type=text]{width:100%;border:1px solid #b9c7c8;background:#fff;border-radius:12px;padding:12px;font-size:16px;color:#173a45}
#playdown-hub .hub-primary{background:#e9bc67;color:#173a45;width:100%;font-weight:700;min-height:56px}
.hub-avatar-preview{width:110px;height:110px;border-radius:50%;object-fit:contain;align-self:center;background:#e8ede6}
.hub-avatar-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
#playdown-hub .hub-avatar-grid button{padding:4px;border:2px solid transparent;min-width:44px;min-height:52px}
#playdown-hub .hub-avatar-grid button[aria-pressed=true]{border-color:#267d78;background:#e8ede6}
.hub-avatar-grid img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:50%}
.hub-note{font-size:13px;color:#426166}
#hub-status{min-height:24px;font-size:14px;line-height:1.4;color:#f4d397}
.hub-modal-layer{position:absolute;inset:0;background:#031426b8;display:flex;align-items:center;justify-content:center;padding:24px;z-index:5}
.hub-modal{background:#f7f3ea;color:#173a45;border-radius:24px;padding:24px;width:100%;max-height:90%;overflow:auto;display:flex;flex-direction:column;gap:16px}
#playdown-hub .hub-modal button{color:#173a45}
.hub-language{margin-top:auto}
@media(max-height:650px){#hub-page{padding-top:16px;gap:12px}.hub-panel{padding:18px;gap:12px}}
.hub-banner{border-radius:12px;background:#23639f;padding:12px 16px;display:flex;gap:12px;font-size:13px;align-items:center}
.hub-user{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#playdown-hub .hub-user-avatar{width:52px;height:52px;border-radius:50%;padding:0;overflow:hidden;background:#103b6a;font-size:0}
.hub-user-avatar img{width:100%;height:100%;object-fit:contain}
.hub-balance{margin-left:auto;background:#103b6a;border-radius:16px;padding:10px 14px;display:flex;flex-direction:column;gap:4px;font-size:13px}
.hub-friends>div{display:flex;justify-content:space-between;align-items:center}
.hub-friends>p{background:#103b6a;border-radius:16px;padding:18px;font-size:14px;color:#d4e1eb}
.hub-cards{display:grid;grid-template-columns:1fr 1fr;gap:20px 16px}
#playdown-hub .hub-card{min-height:135px;background:linear-gradient(#f3cf7e,#e9ab65);color:#153d4d;border:1px solid #ffffff66;border-radius:20px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;font-weight:800}
.hub-card:nth-child(2){background:linear-gradient(#b8dfe0,#7ebfc5)!important}.hub-card:nth-child(3){background:linear-gradient(#edcbee,#cf9fd1)!important}.hub-card:nth-child(4){background:linear-gradient(#c1e9cb,#85c998)!important}
.hub-card img{width:70px;height:70px;object-fit:contain}
.hub-club{background:#123f70;border-radius:20px;display:flex;align-items:center;gap:12px;padding:20px}.hub-club p{font-size:13px;color:#d4e1eb}
#playdown-lobby-view nav{display:flex;justify-content:space-around;background:#082d51;border-radius:18px;padding:10px 0;margin-top:12px}
#playdown-lobby-view nav button{font-size:12px;padding:8px 4px;min-width:44px}
.hub-modal-layer[data-kind=tips]{align-items:flex-start;padding-top:150px}
#playdown-hub[data-screen=lobby] #hub-page{padding-top:16px}
#playdown-hub[data-screen=lobby] .hub-header{position:absolute;right:16px;top:16px;z-index:1}
#playdown-hub[data-screen=lobby] .hub-header img,#playdown-hub[data-screen=lobby] .hub-header [data-hub-action=back]{display:none}
#playdown-hub[data-screen=lobby] .hub-banner{padding-right:114px;min-height:49px}
.hub-modal label{display:block;margin-bottom:8px}
.hub-modal input{width:100%;border:1px solid #b9c7c8;border-radius:12px;padding:12px;font-size:16px;color:#173a45}
.hub-dialog-symbol{border-radius:50%;width:64px;height:64px;background:#e9bc67;display:grid;place-items:center;font-weight:800;font-size:32px;margin:0 auto 20px}
.hub-preview-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
#playdown-hub .hub-preview-controls button{background:#e8ede6}
#playdown-hub .hub-preview-controls button[aria-pressed=true]{background:#267d78;color:white}
#hub-modal>.hub-modal>[data-hub-action=language]{align-self:flex-end}
#hub-modal[data-kind=language]{align-items:flex-end;padding:16px 16px 50px}
#hub-modal[data-kind=language] .hub-modal{gap:18px}
#hub-modal[data-kind=language] #hub-modal-body{display:flex;flex-direction:column;gap:12px}
#hub-modal[data-kind=language] #hub-modal-body button{background:#fff;text-align:left;min-height:64px;padding:14px;border-radius:16px}
#hub-modal[data-kind=language] #hub-modal-body button[aria-pressed=true]{background:#e2ede8}
@media(max-width:360px){.hub-avatar-grid{grid-template-columns:repeat(4,minmax(44px,1fr))}.hub-modal{padding:18px}.hub-modal-layer{padding:16px}}

#playdown-hub #playdown-lobby-view nav{flex-wrap:nowrap}
#playdown-hub #playdown-lobby-view nav button{flex:1;min-width:44px;padding:8px 2px;font-size:12px;overflow-wrap:anywhere}

/* Original lobby geometry and motions, without sample accounts or device chrome. */
#playdown-hub[data-screen=lobby]{background:radial-gradient(circle at 93% 10%,#2866a14d 0 24%,transparent 24.2%),linear-gradient(#205c98,#163e70);overflow:hidden}
#playdown-hub[data-screen=lobby] #hub-page{height:100%;overflow:auto;padding:28px 16px 108px;gap:24px}
#playdown-hub[data-screen=lobby] .hub-header{display:none}
#playdown-hub[data-screen=lobby] .hub-banner{padding:12px 16px;min-height:49px}
#playdown-lobby-view{gap:20px!important}
#playdown-hub .hub-user{flex-wrap:nowrap;gap:10px}
#playdown-hub .hub-user-avatar{flex:0 0 52px}
#hub-user-name{min-width:0;overflow-wrap:anywhere;font-size:20px}
#playdown-hub .hub-balance{flex-direction:row;align-items:center;gap:6px;padding:12px 10px;position:relative}
.hub-balance img{width:28px;height:28px;object-fit:contain}
.hub-balance>span{position:absolute;top:-15px;font-size:10px}
#playdown-hub [data-hub-action=notifications]{padding:8px;flex:0 0 44px}
[data-hub-action=notifications]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#playdown-hub button>svg{display:block;width:26px;height:26px;margin:auto}
#playdown-hub .hub-cards{gap:12px 16px}
#playdown-hub .hub-card{min-height:135px;background:linear-gradient(#ffbd69,#ff9f69);gap:12px}
#playdown-hub .hub-card:nth-child(2){background:linear-gradient(#8ee1cb,#52c9b5)!important}
#playdown-hub .hub-card:nth-child(3){background:linear-gradient(#a8defd,#7bbff4)!important}
#playdown-hub .hub-card:nth-child(4){background:linear-gradient(#d8c3f8,#b9a4ec)!important}
.hub-card-motion{display:block;animation:hub-bob 2.8s linear infinite;--rise:-6px}
.hub-card-motion img{width:88px;height:88px;animation:hub-wiggle 2.8s linear infinite;--turn:-7deg}
.hub-card:nth-child(2) .hub-card-motion{animation-duration:3.2s;--rise:-4px}
.hub-card:nth-child(2) img{animation-duration:3.2s;--turn:-3deg}
.hub-card:nth-child(3) .hub-card-motion{animation-duration:2.5s;--rise:-5px}
.hub-card:nth-child(3) img{animation-duration:2.5s;--turn:-4deg}
.hub-card:nth-child(4) .hub-card-motion{animation-duration:3s;--rise:-5px}
.hub-card:nth-child(4) img{animation-duration:3s;--turn:-6deg}
@keyframes hub-bob{0%,50%,100%{transform:translateY(0)}25%{transform:translateY(var(--rise))}75%{transform:translateY(2px)}}
@keyframes hub-wiggle{0%,50%,100%{transform:rotate(0)}25%{transform:rotate(var(--turn))}75%{transform:rotate(calc(var(--turn) * -1))}}
#playdown-hub #playdown-lobby-view nav{position:absolute;left:0;right:0;bottom:0;margin:0;border-radius:0;background:#10191e;padding:12px 12px max(12px,env(safe-area-inset-bottom));z-index:3;min-height:76px}
#playdown-hub #playdown-lobby-view nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;font-size:11px}
#playdown-lobby-view nav [data-hub-action=home]{color:#7ad8ca}
#playdown-hub .hub-tip-target{position:relative;z-index:6;outline:3px solid #e9bc67;outline-offset:3px}
#hub-modal[data-kind=tips]{padding-top:40px;align-items:flex-start}
.hub-step{font-size:12px;color:#e9bc67;letter-spacing:1px}
#playdown-hub[data-screen=profile] .hub-avatar-preview{border:3px solid #e9bc67;background:#2866a1}
#playdown-hub[data-screen=profile] #hub-avatar-grid img{height:52px}
#hub-modal[data-kind=avatar] .hub-avatar-preview{display:block;margin:0 auto 20px}
@media(prefers-reduced-motion:reduce){.hub-card-motion,.hub-card-motion img{animation:none!important}}
@media(max-width:360px){#hub-user-name{font-size:16px}.hub-balance img{width:22px;height:22px}.hub-card-motion img{width:70px;height:70px}}

#playdown-hub[data-screen=agreement] #hub-page,#playdown-hub[data-screen=profile] #hub-page{padding-top:16px;gap:14px}
#playdown-hub[data-screen=agreement] .hub-header img,#playdown-hub[data-screen=profile] .hub-header img{display:none}
#playdown-hub[data-screen=agreement] [data-hub-screen],#playdown-hub[data-screen=profile] [data-hub-screen]{gap:14px}
#playdown-hub[data-screen=agreement] h1,#playdown-hub[data-screen=profile] h1,.hub-step,.hub-subtitle{text-align:left}
#playdown-hub[data-screen=profile] .hub-panel{gap:12px}
#playdown-hub[data-screen=profile] .hub-panel h2{font-size:16px;margin:0;text-align:left}
#hub-nickname{min-height:54px!important}

#playdown-hub .hub-club{display:grid;grid-template-columns:1fr 1fr;background:transparent;padding:0;gap:16px}
.hub-club>div{background:#285b88;border:1px solid #ffffff40;border-radius:20px;min-height:135px;padding:20px 14px;display:flex;flex-direction:column;justify-content:center;gap:12px}
#playdown-hub .hub-club>[data-hub-action=createClub]{background:#f5d38e;border:1px solid #ffebc1;border-radius:20px;min-height:135px;color:#183f61;font-weight:800;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px}
.hub-club>[data-hub-action=createClub]::before{content:'+';display:grid;place-items:center;background:#e9b85e;border-radius:50%;width:42px;height:42px;font-size:36px;font-weight:400}

/* Fit the available portrait host with real grid tracks, without scaling the page. */
#playdown-hub[data-screen=lobby]{container-type:size}
#playdown-hub[data-screen=lobby] #hub-page{height:100%;min-height:0;overflow:visible;padding:12px 12px 0;gap:0}
#playdown-hub[data-screen=lobby] #playdown-lobby-view{height:100%;min-height:0;display:grid;grid-template-rows:44px 52px 84px minmax(0,1fr) clamp(80px,13cqh,116px) 64px;gap:clamp(6px,1.5cqh,13px)!important}
#playdown-hub[data-screen=lobby] #hub-status{position:absolute;bottom:68px;left:16px;right:16px;min-height:0;z-index:4}
#playdown-hub[data-screen=lobby] #hub-status:empty{display:none}
#playdown-hub[data-screen=lobby] .hub-banner{min-height:0;padding:0 8px;gap:8px;font-size:clamp(11px,1.5cqh,13px)}
.hub-banner>span{min-width:0;flex:1}
#playdown-hub .hub-logout{flex:0 0 44px;width:44px;padding:8px;border-radius:12px}
.hub-logout>span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
#playdown-hub[data-screen=lobby] .hub-user{gap:6px}
#playdown-hub[data-screen=lobby] #hub-user-name{font-size:clamp(14px,2.3cqh,20px)}
#playdown-hub[data-screen=lobby] .hub-balance{padding:8px 6px;gap:4px;font-size:clamp(11px,1.7cqh,14px)}
#playdown-hub[data-screen=lobby] .hub-balance img{width:22px;height:22px;flex-shrink:0}
#playdown-hub[data-screen=lobby] .hub-friends{display:grid;grid-template-rows:44px 1fr;font-size:clamp(12px,1.8cqh,16px)}
#playdown-hub[data-screen=lobby] .hub-friends p{padding:8px;font-size:clamp(11px,1.5cqh,13px);display:grid;place-items:center}
#playdown-hub[data-screen=lobby] .hub-friends button{padding:0 4px;min-height:44px}
#playdown-hub[data-screen=lobby] .hub-cards{min-height:0;grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(6px,1.5cqh,12px)}
#playdown-hub[data-screen=lobby] .hub-card{min-height:44px;padding:6px;gap:6px;font-size:clamp(13px,2.1cqh,18px)}
#playdown-hub[data-screen=lobby] .hub-card-motion{width:min(88px,65%);height:50%;max-height:88px;flex-shrink:1;min-height:0}
#playdown-hub[data-screen=lobby] .hub-card-motion img{width:100%;height:100%;object-fit:contain}
#playdown-hub[data-screen=lobby] .hub-club{gap:12px;min-height:0}
#playdown-hub[data-screen=lobby] .hub-club>div,#playdown-hub[data-screen=lobby] .hub-club>[data-hub-action=createClub]{min-height:44px;padding:8px;gap:6px;font-size:clamp(12px,1.9cqh,16px)}
#playdown-hub[data-screen=lobby] .hub-club p{font-size:clamp(10px,1.45cqh,12px)}
#playdown-hub[data-screen=lobby] .hub-club>[data-hub-action=createClub]::before{width:32px;height:32px;font-size:28px}
#playdown-hub #playdown-lobby-view nav{position:static;min-height:0;margin:0 -12px;padding:6px 8px;gap:0}
#hub-modal[data-kind=tips]{padding:0;align-items:flex-start}
#hub-modal[data-kind=tips] .hub-modal{position:absolute;left:12px;right:12px;width:auto;padding:12px;gap:6px;max-height:none;font-size:clamp(12px,1.8cqh,16px)}
#hub-modal[data-kind=tips] h2{font-size:clamp(16px,2.5cqh,22px);margin:0}
#hub-modal[data-kind=tips] p{line-height:1.25}
#hub-modal[data-kind=tips] .hub-primary{min-height:44px}
#playdown-hub .hub-tip-target{outline-offset:-3px}

#playdown-hub #playdown-lobby-view nav button{padding:4px 0;font-size:clamp(10px,1.3cqh,11px)}
#playdown-hub #playdown-lobby-view nav button>span{white-space:nowrap}

/* Shared onboarding steps; fixed-size artwork keeps its intrinsic aspect ratio. */
#playdown-hub[data-screen=agreement] .hub-agree-all{background:#e8ede6;border-radius:16px;padding:12px 16px;min-height:62px;font-weight:700}
#playdown-hub[data-screen=agreement] [data-hub-action=profile]:disabled{background:#567596;opacity:1}
#playdown-hub .hub-progress{display:flex;justify-content:center;gap:28px;padding:0;margin:0;list-style:none;color:#bbd0e4;font-size:13px}
#playdown-hub .hub-progress li[aria-current=step]{color:#e9bc67;font-weight:800}
#playdown-hub .hub-nickname-fields{display:flex;flex-direction:column;gap:12px}
#playdown-hub .hub-avatar-pages{display:flex;align-items:center;justify-content:space-between;gap:8px}
#playdown-hub .hub-panel{overflow:visible}
#playdown-hub[data-screen=profile] #hub-avatar-grid{grid-template-columns:repeat(3,minmax(44px,1fr));gap:10px}
#playdown-hub[data-screen=profile] #hub-avatar-grid button{min-height:64px}
#playdown-hub[data-screen=profile] #hub-avatar-grid img{width:64px;max-width:100%;height:64px}
#playdown-hub[data-screen=profile] .hub-avatar-preview{width:110px;height:110px}
#playdown-hub[data-screen=profile] .hub-panel{gap:10px;padding:20px}
#playdown-hub:not([data-screen=lobby]) #hub-page{gap:12px}
#playdown-hub:not([data-screen=lobby]) [data-hub-screen]{gap:12px}
#hub-status:empty{display:none}

#playdown-hub[data-screen=agreement] .hub-panel{padding:16px;color:#203543}
#playdown-hub[data-screen=agreement] .hub-panel h2{text-align:left;margin-left:8px}
#playdown-hub .hub-panel input[type=checkbox]{height:22px;min-height:22px;margin:0}
#playdown-hub[data-screen=profile] #hub-avatar-grid{min-height:162px;align-content:start}
#playdown-hub[data-screen=profile] #hub-status{color:#b94740;font-size:13px}
#playdown-hub .hub-progress{gap:12px}
#playdown-hub .hub-progress li{display:flex;align-items:center;gap:12px}
#playdown-hub .hub-progress li:not(:last-child)::after{content:'';display:block;width:32px;height:1px;background:#bbd0e4}
#playdown-hub .hub-progress li[aria-current=step]::after{height:2px;background:#e9bc67}

/* Onboarding content flows above one shared, safe-area-aware footer. */
#playdown-hub[data-screen=agreement] #hub-page,#playdown-hub[data-screen=profile] #hub-page{min-height:100%;padding-bottom:max(24px,env(safe-area-inset-bottom));gap:12px}
#playdown-hub[data-screen=agreement] [data-hub-screen],#playdown-hub[data-screen=profile] [data-hub-screen]{flex:1 0 auto;gap:10px}
#playdown-hub .hub-onboarding-footer{display:flex;flex-direction:column;gap:14px;margin-top:auto;flex-shrink:0}
#playdown-hub[data-screen=agreement] .hub-panel{gap:8px;padding:16px}
#playdown-hub[data-screen=agreement] .hub-panel h2{margin-bottom:4px}
#playdown-hub[data-screen=agreement] .hub-panel label{min-height:44px}
#playdown-hub[data-screen=agreement] .hub-agree-all{min-height:62px}
#playdown-hub[data-screen=agreement] .hub-note{text-align:left;font-size:12px;color:#73818a;line-height:1.35;margin:0 8px}
#playdown-hub[data-screen=agreement] [data-hub-text=optional]{font-size:11px}
@media(max-height:760px){#playdown-hub[data-screen=agreement] #hub-page,#playdown-hub[data-screen=profile] #hub-page{gap:8px;padding-top:8px;padding-bottom:max(16px,env(safe-area-inset-bottom))}#playdown-hub[data-screen=agreement] [data-hub-screen],#playdown-hub[data-screen=profile] [data-hub-screen]{gap:8px}#playdown-hub[data-screen=profile] .hub-panel{padding:16px;gap:8px}#playdown-hub[data-screen=profile] .hub-avatar-preview{width:90px;height:90px}}
#playdown-hub .hub-field-error{color:#b63c33}
#playdown-hub input[aria-invalid=true]{border-color:#b63c33}
#playdown-hub .hub-text-action{color:#267d78;text-decoration:underline;background:transparent;border:0;padding:.5em;cursor:pointer}
