/* Shared discovery stays in its own paper surface; the surrounding game keeps its theme. */
.ph-surface{--ph-ink:#514963;--ph-muted:#81748c;--ph-line:#e4dce8;--ph-purple:#7b6698;--ph-paper:#fffdf7;color:var(--ph-ink);font:14px/1.6 'Nunito','Noto Sans SC',system-ui,sans-serif;text-align:left;letter-spacing:normal}
.ph-surface,.ph-surface *{box-sizing:border-box}.ph-surface h2,.ph-surface h3,.ph-surface h4,.ph-surface p{margin:0}.ph-surface button,.ph-surface input,.ph-surface select{font:inherit}.ph-surface button,.ph-trigger{cursor:pointer}.ph-surface a{color:inherit;text-decoration:none}.ph-surface button:disabled{cursor:default;opacity:.5}.ph-surface :is(button,a,input,select):focus-visible,.ph-trigger:focus-visible{outline:3px solid #a78bb7;outline-offset:3px}.ph-surface svg,.ph-trigger svg{flex-shrink:0}
.ph-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;position:relative;font:inherit;font-size:12px;line-height:1.3;color:inherit;background:transparent;border:1px solid currentColor;border-radius:10px;padding:8px 10px;white-space:nowrap;min-height:34px;opacity:.9}.ph-trigger:hover{opacity:1;background:#b69bc316}.ph-trigger-badge{min-width:17px;height:17px;border-radius:10px;background:#a35e7c;color:#fff;display:inline-flex;align-items:center;justify-content:center;font:700 9px/1 system-ui;padding:0 3px}.ph-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;border:1px solid #ddd2e3;background:#fffefa;border-radius:11px;padding:8px 12px;color:#715d84;font-weight:700;font-size:12px;line-height:1.4;white-space:nowrap;box-shadow:none;text-decoration:none}.ph-button:hover{background:#f3edf8;border-color:#cdbbdc}.ph-button.primary{background:#e6dbf2;border-color:#cfc0df;color:#634c7c;box-shadow:0 2px 0 #dbcde7}.ph-button.primary:hover{background:#dcd0ea}.ph-button.sent{background:#edf3e7;color:#627e54;border-color:#d5e2ca}.ph-icon-button{width:36px;min-width:36px;height:36px;border:1px solid #e2d9e5;border-radius:11px;display:inline-flex;justify-content:center;align-items:center;background:#fffdf8;color:#897391;padding:0}.ph-icon-button:hover{background:#f0e9f5}.ph-text-button{border:0;background:none;color:#886d9b;font-size:12px;font-weight:700;padding:6px;display:inline-flex;align-items:center;gap:5px}.ph-text-button:hover{text-decoration:underline}.ph-eyebrow{display:block;font-size:9px;font-weight:700;letter-spacing:2px;color:#a28ca5;line-height:1.5}.ph-muted{font-size:12px;color:var(--ph-muted);line-height:1.7}.ph-error{background:#fff0ec;border:1px solid #f1d3c9;border-radius:12px;padding:12px 14px;font-size:12px!important;color:#a25d57;margin-top:14px!important;overflow-wrap:anywhere}.ph-error button{border:0;background:none;text-decoration:underline;color:inherit;margin-left:8px}.ph-notice{background:#eef5e7;border:1px solid #d4e3c5;border-radius:12px;padding:12px 14px;font-size:12px;color:#657f56;margin-top:16px!important}.ph-loading{padding:22px;text-align:center;font-size:12px;color:#9d85ad}.ph-more{border:1px dashed #d7c8e2;background:#f7f1fb;color:#8a709b;padding:10px 17px;border-radius:12px;font-size:12px;margin:16px auto 0;display:flex;align-items:center;gap:8px}.ph-empty{padding:30px 16px;text-align:center;background:#faf7fc;border:1px dashed #e2d8e9;border-radius:17px}.ph-empty>span{display:grid;place-items:center;margin:0 auto 13px;background:#eee5f5;color:#9c7baf;border:1px solid #dfd0e9;border-radius:17px;width:48px;height:48px;transform:rotate(-6deg)}.ph-empty h3{font-size:15px;font-weight:800;color:#7c6589}.ph-empty p{font-size:12px;color:#9b87a4;margin-top:7px;line-height:1.8}.ph-empty .ph-button{margin-top:18px}
.ph-home{margin:0 0 33px;padding:26px;border:1px solid #e4dbe7;border-radius:23px;background:#fffdf9;box-shadow:0 4px 0 #efe9ed}.ph-home-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.ph-home-heading h2{font-size:28px;font-weight:800;letter-spacing:-.6px;line-height:1.5;margin-top:5px}.ph-home-heading h2>span{font-size:22px;display:inline-block;margin-left:10px;color:#c7a2a9;transform:rotate(-10deg)}.ph-home-heading p{font-size:12px;color:#9c899e;margin-top:3px}.ph-home-buttons{display:flex;align-items:center;gap:8px}.ph-home-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:24px}.ph-my-tables{min-width:0}.ph-home-quick{padding:18px;background:#f5f0e6;border:1px solid #e6dcc9;border-radius:17px;align-self:start}.ph-quick-note{border-top:1px dashed #decfb8;margin-top:20px;padding-top:15px;display:flex;align-items:center;gap:12px;color:#aa9271}.ph-quick-note>span{font-size:30px}.ph-quick-note p{font-size:11px;line-height:1.9;color:#9d8c75}
.ph-room-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.ph-room{min-width:0;padding:15px;background:#fffefa;border:1px solid #e6dce9;border-radius:16px;box-shadow:0 3px 0 #f0e9ed}.ph-room-top{display:flex;gap:12px;align-items:center}.ph-room-art{width:52px;min-width:52px;height:62px;overflow:hidden;display:grid;place-items:center;background:#eee5ef;color:#a087b0;border-radius:8px;box-shadow:2px 2px 0 #e7dfe7}.ph-room-art img{width:100%;height:100%;object-fit:cover;display:block;mix-blend-mode:multiply}.ph-room-copy{min-width:0;flex:1}.ph-room-copy h3{font-size:14px;line-height:1.4;font-weight:800;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:3px}.ph-status{display:inline-flex;align-items:center;gap:4px;font-size:9px;font-weight:700;color:#79916a;line-height:1.4}.ph-status i{width:5px;height:5px;background:currentColor;border-radius:50%}.ph-status.playing{color:#a07b5c}.ph-status.finished{color:#98909e}.ph-room-meta{display:flex;flex-wrap:wrap;align-items:center;gap:5px 9px;font-size:10px;color:#aa94b4;margin-top:6px}.ph-room-meta>span{display:inline-flex;align-items:center;gap:3px}.ph-room-meta>span:first-child{letter-spacing:.8px;font-variant-numeric:tabular-nums}.ph-room-meta b{font-size:8px;border-radius:4px;padding:1px 4px;color:#90709e;background:#f1e8f6;font-weight:700}.ph-room-people{font-size:10px;color:#9e8ba7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:10px 0!important;min-height:16px}.ph-room-actions{display:flex;flex-wrap:wrap;gap:6px;padding-top:10px;border-top:1px dashed #ece4ee}.ph-room-actions .ph-button{font-size:10px;min-height:31px;padding:6px 9px;border-radius:9px}.ph-room-actions .ph-invite-button{margin-left:auto;background:none}.ph-unavailable{font-size:10px;color:#a18caa;line-height:31px}
.ph-code-entry{min-width:0}.ph-code-label{display:flex;align-items:center;gap:10px;margin-bottom:13px}.ph-code-label>span{width:32px;height:32px;display:grid;place-items:center;border:1px solid #dfd1bd;border-radius:10px;background:#fdf8eb;color:#a98d60;transform:rotate(-6deg);flex-shrink:0}.ph-code-label h3{font-size:14px;font-weight:800;color:#8b7456}.ph-code-label p{font-size:10px;color:#a48f74;margin-top:3px}.ph-code-entry form{display:flex;gap:7px}.ph-code-entry input{min-width:0;width:100%;background:#fffdf8;color:#776482;border:1px solid #dcd0df;border-radius:10px;padding:10px 11px;font-size:13px;font-weight:700;letter-spacing:1.5px;line-height:1.4;outline-offset:2px}.ph-code-entry input::placeholder{letter-spacing:0;font-weight:400;color:#ad9aaf;font-size:11px}.ph-code-entry form .ph-button{font-size:11px;min-width:78px;padding:8px}.ph-code-entry>.ph-muted{margin-top:12px}.ph-code-results{margin-top:14px}.ph-code-results>p{font-size:11px;color:#967b9e;margin-bottom:12px}.ph-code-results .ph-room+.ph-room{margin-top:10px}
.ph-overlay{position:fixed;inset:0;z-index:1500;background:#30263e66;backdrop-filter:blur(4px);display:flex;justify-content:flex-end;padding:18px;isolation:isolate}.ph-dialog{width:min(760px,100%);height:100%;max-height:100%;background:var(--ph-paper);border:1px solid #fff9;border-radius:24px;box-shadow:0 20px 70px #24183144;display:flex;flex-direction:column;min-height:0;overflow:hidden}.ph-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:25px 28px 18px;border-bottom:0}.ph-dialog-header h2{font-size:29px;font-weight:850;line-height:1.4;margin-top:6px;letter-spacing:-.8px}.ph-dialog-header h2>span{font-size:23px;color:#c3a17d;display:inline-block;margin-left:12px;transform:rotate(12deg)}.ph-dialog-header p{font-size:12px;color:#a089aa;margin-top:5px}.ph-close{border:0;background:#f1e9f3;color:#9a819f;flex-shrink:0}.ph-tabs{display:flex;gap:6px;margin:0 28px 0;padding:5px;background:#f2edf5;border:1px solid #e5dae9;border-radius:13px;flex-shrink:0}.ph-tabs>button{display:flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:7px;padding:11px 7px;border:0;border-radius:9px;background:transparent;color:#a08aac;font-size:12px;line-height:1.3;font-weight:700;white-space:nowrap}.ph-tabs>button.active{background:#fffdf8;color:#725987;box-shadow:0 2px 4px #77618b14}.ph-tabs>button>b{min-width:16px;font-size:9px;padding:1px 4px;border-radius:8px;background:#e9c8d6;color:#99647c}.ph-dialog-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:21px 28px 28px;scrollbar-width:thin;scrollbar-color:#cdbed9 transparent}.ph-dialog-body>.ph-code-entry{padding:15px 17px;border:1px solid #eadfcb;border-radius:15px;background:#f8f3e9}.ph-dialog-body>.ph-code-entry .ph-code-label{margin-bottom:10px}.ph-dialog-body>.ph-code-entry form{max-width:340px}.ph-dialog-body>.ph-code-entry .ph-code-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ph-dialog-body>.ph-code-entry .ph-code-results>p{grid-column:1/-1;margin:0}.ph-dialog-body>.ph-code-entry .ph-code-results>.ph-room{margin:0}.ph-directory-toolbar{display:flex;gap:10px;align-items:center;margin:20px 0 16px}.ph-directory-toolbar>p{font-size:12px;color:#9b86a5}.ph-directory-toolbar label{display:flex;align-items:center;gap:7px;min-width:0;color:#9c86a5;font-size:11px}.ph-directory-toolbar label:first-child{flex:1}.ph-directory-toolbar label>span{flex-shrink:0}.ph-directory-toolbar select,.ph-invite-fields select{appearance:auto;min-width:0;width:100%;max-width:260px;padding:8px;border:1px solid #e4d8e8;background:#fffefa;color:#80678e;border-radius:9px;font-size:11px;line-height:1.4}.ph-directory-toolbar .ph-icon-button{margin-left:auto}
.ph-small-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.ph-small-heading h3{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:800;color:#80668d}.ph-small-heading h3>span{font-size:10px;font-weight:500;color:#a48dac}.ph-small-heading h3>b{font-size:10px;padding:1px 6px;background:#f0dbe5;color:#ab718e;border-radius:8px}.ph-inbox{padding:17px;background:#fbf6f8;border:1px solid #ecdde5;border-radius:16px}.ph-invites{display:grid;gap:10px}.ph-invitation{display:flex;align-items:center;gap:10px;padding:12px;background:#fffdfa;border:1px solid #eadde7;border-radius:13px}.ph-avatar{width:36px;height:36px;min-width:36px;display:grid;place-items:center;border-radius:13px;background:#e9def0;color:#9574a7;font-size:15px;font-weight:800}.ph-invitation>.ph-avatar{background:#f5dfe7;color:#b98198;transform:rotate(-5deg)}.ph-invitation>div:not(.ph-invitation-actions){flex:1;min-width:0}.ph-invitation p{font-size:11px;color:#a1849b;overflow-wrap:anywhere}.ph-invitation h4{font-size:13px;color:#7e637e;line-height:1.5;overflow-wrap:anywhere;margin:3px 0}.ph-invitation small{color:#b09aad;font-size:10px;letter-spacing:1px}.ph-invitation-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}.ph-invitation-actions .ph-button{font-size:11px;padding:7px 10px}.ph-invite-picker{border:1px solid #e8ddc7;border-radius:16px;background:#f8f4e9;padding:18px;margin:19px 0}.ph-invite-picker>.ph-eyebrow{font-size:8px;color:#b09875}.ph-invite-picker h3{font-size:16px;color:#8c7958;font-weight:800;margin:5px 0 13px}.ph-invite-fields{display:flex;align-items:flex-end;gap:12px}.ph-invite-fields>label{min-width:0;flex:1}.ph-invite-fields>label>span{display:block;color:#a89476;font-size:10px;margin-bottom:6px}.ph-invite-fields select{max-width:none;padding:10px;background:#fffdf6;border-color:#e1d4bc;color:#8a7457}.ph-mode-picker{display:flex;gap:4px;border:1px solid #e1d4bc;padding:3px;border-radius:10px;background:#f3ecdd;flex-shrink:0}.ph-mode-picker button{display:flex;align-items:center;gap:4px;padding:7px 9px;border:0;border-radius:7px;background:transparent;color:#af977b;font-size:11px}.ph-mode-picker button.active{background:#fffdf8;color:#917349;box-shadow:0 2px 3px #bdab8a22}.ph-invite-picker>.ph-muted{font-size:11px;color:#a08b6f;margin-top:12px}.ph-online{margin-top:22px}.ph-online-dot{display:inline-flex;align-items:center;gap:5px;font-size:10px;color:#8ca879}.ph-online-dot:before{content:'';width:6px;height:6px;border-radius:50%;background:#a5bf91;box-shadow:0 0 0 3px #edf3e8}.ph-player-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ph-person{display:flex;gap:9px;align-items:center;padding:11px;border:1px solid #e8dfea;border-radius:13px;background:#fffefa;min-width:0}.ph-person>b{flex:1;min-width:0;font-size:12px;font-weight:700;overflow-wrap:anywhere}.ph-person>b>small{color:#ad97b4;font-weight:400;font-size:10px}.ph-person .ph-button{font-size:10px;padding:7px 9px;min-height:30px}.ph-presence-note{font-size:10px;color:#b09bb7;line-height:1.7;margin-top:16px!important}
@media(max-width:1100px){.ph-home-layout{grid-template-columns:minmax(0,1fr) 245px;gap:17px}.ph-home .ph-room-grid{grid-template-columns:1fr}.ph-home-heading h2{font-size:25px}}
@media(max-width:650px){.ph-home{padding:20px 16px;border-radius:19px;margin-bottom:22px}.ph-home-heading{align-items:flex-start;gap:10px;flex-wrap:wrap;margin-bottom:17px}.ph-home-heading h2{font-size:24px}.ph-home-heading p{font-size:11px}.ph-home-buttons{width:100%}.ph-home-buttons>.ph-icon-button{margin-left:auto}.ph-home-layout{grid-template-columns:1fr;gap:16px}.ph-home-quick{grid-row:1;padding:15px}.ph-home-quick .ph-code-label{margin-bottom:10px}.ph-quick-note{display:none}.ph-home .ph-room-grid{grid-template-columns:1fr}.ph-empty{padding:23px 14px}.ph-empty h3{font-size:14px}.ph-home .ph-eyebrow{font-size:8px;letter-spacing:1.5px}.ph-trigger{font-size:11px;padding:7px 8px;min-height:32px}.ph-trigger-badge{font-size:8px;min-width:15px;height:15px}.ph-overlay{padding:0;background:#30263e66}.ph-dialog{width:100%;border-radius:0;border:0}.ph-dialog-header{padding:21px 18px 17px}.ph-dialog-header h2{font-size:27px}.ph-dialog-header .ph-eyebrow{font-size:7px;letter-spacing:1.3px}.ph-dialog-header p{font-size:11px}.ph-tabs{margin:0 15px;gap:3px;padding:4px}.ph-tabs>button{font-size:11px;gap:5px;padding:11px 4px}.ph-tabs>button svg{width:14px}.ph-dialog-body{padding:17px 15px 25px}.ph-directory-toolbar{gap:7px;flex-wrap:wrap}.ph-directory-toolbar label{gap:4px;font-size:10px}.ph-directory-toolbar label:first-child{flex:1;min-width:140px}.ph-directory-toolbar select{font-size:10px;padding:8px 5px}.ph-directory-toolbar>label:nth-child(2){flex:1;min-width:125px}.ph-directory-toolbar .ph-icon-button{width:32px;min-width:32px;height:32px}.ph-room-grid{grid-template-columns:1fr}.ph-room{padding:13px}.ph-room-art{width:47px;min-width:47px;height:55px}.ph-room-actions .ph-button{font-size:11px;padding:7px 10px;min-height:34px}.ph-room-copy h3{font-size:14px}.ph-dialog-body>.ph-code-entry{padding:14px}.ph-dialog-body>.ph-code-entry .ph-code-results{grid-template-columns:1fr}.ph-inbox{padding:14px}.ph-invitation{flex-wrap:wrap}.ph-invitation-actions{margin-left:46px}.ph-invite-picker{padding:15px}.ph-invite-fields{flex-wrap:wrap;gap:9px}.ph-invite-fields>label{flex-basis:100%}.ph-small-heading h3{font-size:15px}.ph-player-list{grid-template-columns:1fr}.ph-person>b{font-size:13px}.ph-person .ph-button{font-size:11px}.ph-dialog-header h2>span{font-size:20px;margin-left:8px}}
@media(prefers-reduced-motion:reduce){.ph-surface *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.ph-invite-toast{position:fixed;right:20px;bottom:max(20px,env(safe-area-inset-bottom));z-index:1200;display:flex;align-items:center;gap:8px;max-width:calc(100vw - 32px);padding:10px 10px 10px 15px;background:#fffaf2;border:1px solid #dec9d8;border-radius:16px;box-shadow:0 8px 30px #58445b26}.ph-invite-toast-open{display:flex;gap:10px;align-items:center;border:0;background:none;padding:2px;color:#9f7390;text-align:left}.ph-invite-toast-open b{display:block;font-size:12px;color:#82637d}.ph-invite-toast-open small{display:block;font-size:10px;color:#b18b9f;margin-top:3px}.ph-invite-toast>.ph-icon-button{width:26px;min-width:26px;height:26px;border:0;background:#f4e9ed;color:#ad899d;border-radius:8px}
@media(max-width:600px){.ph-invite-toast{right:16px;bottom:max(14px,env(safe-area-inset-bottom))}.h-header:has(.ph-trigger) nav{gap:9px}.h-header:has(.ph-trigger) nav>a[href="#games"]{display:none}.h-header:has(.ph-trigger) .h-account{max-width:125px;padding-inline:10px}.h-header:has(.ph-trigger){gap:10px}.tg-nav-actions:has(.ph-trigger){gap:7px}.tg-nav-actions .ph-trigger{padding-inline:8px}}
@media(max-width:650px){.ph-invitation{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:start;gap:9px 10px}.ph-invitation>.ph-avatar{grid-column:1;grid-row:1}.ph-invitation>div:not(.ph-invitation-actions){grid-column:2;grid-row:1;min-width:0}.ph-invitation>.ph-invitation-actions{grid-column:2;grid-row:2;margin-left:0;flex-wrap:wrap;justify-content:flex-start}.ph-invitation h4{font-size:13px;line-height:1.5}}

/* Portals live outside the hall, so they carry the selected skin explicitly. */
.ph-overlay[data-theme="ma"] .ph-surface,.ph-invite-toast[data-theme="ma"]{--ph-ink:#294d40;--ph-muted:#786744;--ph-line:#c7ad70;--ph-purple:#a74a30;--ph-paper:#fff4d6;color:var(--ph-ink)}
.ph-overlay[data-theme="ma"]{background:#162d25b8}
.ph-overlay[data-theme="ma"] .ph-dialog{background:#fff4d6;border:2px solid #9d874e;box-shadow:8px 10px 0 #172f2750}
.ph-overlay[data-theme="ma"] .ph-dialog-header{background:#2b4b3f;color:#ffedb9;position:relative;gap:16px}
.ph-host{width:86px;height:92px;object-fit:contain;align-self:flex-end}
.ph-overlay[data-theme="ma"] :is(.ph-eyebrow,.ph-dialog-header p,.ph-dialog-header h2>span){color:#efcd86}
.ph-overlay[data-theme="ma"] :is(.ph-tabs,.ph-dialog-body){background:#fff4d6}
.ph-overlay[data-theme="ma"] :is(.ph-button,.ph-icon-button,.ph-tabs button,.ph-mode-picker button){background:#fff9e9;color:#345442;border-color:#cbb77d}
.ph-overlay[data-theme="ma"] :is(.ph-button.primary,.ph-tabs button.active,.ph-mode-picker button.active){background:#a84b31;color:#fff4d6;border-color:#813922;box-shadow:0 2px 0 #763521}
.ph-overlay[data-theme="ma"] :is(.ph-empty,.ph-room,.ph-inbox,.ph-invite-picker,.ph-person,.ph-invitation,.ph-dialog-body>.ph-code-entry){background:#f5e7bc;border-color:#d2bc83}
.ph-overlay[data-theme="ma"] :is(.ph-empty>span,.ph-avatar){background:#d6dfba;color:#365641;border-color:#b7c39c}
.ph-overlay[data-theme="ma"] :is(.ph-empty h3,.ph-empty p,.ph-room-meta,.ph-small-heading h3,.ph-text-button,.ph-loading,.ph-room-people,.ph-presence-note){color:#6d6146}
.ph-overlay[data-theme="ma"] :is(input,select){background:#fffbef;color:#2d4e3f;border-color:#c8b17a}
.ph-invite-toast[data-theme="ma"]{background:#fff0bd;border-color:#bc9e58}
.ph-invite-toast[data-theme="ma"] :is(b,small,.ph-invite-toast-open){color:#385640}
@media(max-width:480px){.ph-host{width:58px;height:70px}.ph-overlay[data-theme="ma"] .ph-dialog-header h2{font-size:20px}}
