/* Host Private Table modal + PIN prompt (static/js/private_host.js). Same Obsidian & Gold vocabulary as the Hold'em
   Salon (poker_salon.css); no backdrop blur. */
#ph-root { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px;
    background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(20,16,8,.72), rgba(0,0,0,.9)); }
#ph-root.open { display: flex; }
.ph-modal { position: relative; width: 100%; max-width: 32rem; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 24px;
    background: #0b0c10; border: 1px solid rgba(245,158,11,.3); color: #f4f4f5; padding: 24px;
    box-shadow: 0 40px 90px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,236,179,.08); animation: ph-rise .24s cubic-bezier(.2,.9,.3,1.1); }
@keyframes ph-rise { from { transform: translateY(12px); opacity: 0; } }
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.ph-kicker { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: rgba(245,158,11,.8); font-weight: 700; }
.ph-title { font-family: 'Cinzel', Georgia, serif; font-weight: 700; font-size: 22px; letter-spacing: .05em; margin-top: 4px; overflow-wrap: anywhere;
    background: linear-gradient(180deg, #fff4c2, #e6b84c 55%, #a8741c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ph-x { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; color: #78716c; border: 1px solid rgba(255,255,255,.08); }
.ph-x:hover { color: #fde68a; border-color: rgba(245,158,11,.45); }

.ph-stack { display: flex; flex-direction: column; gap: 14px; }
.ph-row { display: flex; gap: 8px; align-items: center; }
.ph-row input { flex: 1; min-width: 0; }
.ph-label, .ph-field > span { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #a8a29e; font-weight: 700; margin-bottom: 6px; }
.ph-label em, .ph-field em { text-transform: none; letter-spacing: 0; font-style: normal; color: #71717a; font-weight: 500; }
.ph-field { display: block; }
.ph-field[hidden], .ph-check[hidden] { display: none; }
#ph-root input:not([type=checkbox]), #ph-root select { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13px; color: #f5f5f4;
    background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1); }
#ph-root input:focus, #ph-root select:focus { outline: none; border-color: rgba(251,191,36,.6); }
.ph-pin-in { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 22px !important; letter-spacing: .5em; text-align: center; height: 52px !important; }

.ph-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.06); }
.ph-seg button { height: 36px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #a8a29e; }
.ph-seg button.on { color: #1a1206; background: linear-gradient(180deg, #fff1b0, #e2b44a 55%, #a8741c); }
.ph-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #d6d3d1; cursor: pointer; }
.ph-check.off { opacity: .5; cursor: not-allowed; }
.ph-check input { width: 16px; height: 16px; accent-color: #f59e0b; }

.ph-gold { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 14px; font-weight: 800; font-size: 13px; letter-spacing: .1em;
    color: #1a1206; background: linear-gradient(180deg, #fff1b0, #e2b44a 50%, #a8741c); box-shadow: 0 4px 0 #6b4a12, 0 10px 22px rgba(245,158,11,.22); }
.ph-gold:hover { filter: brightness(1.08); }
.ph-gold:disabled { opacity: .5; cursor: wait; }
.ph-ghost { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px; border-radius: 10px; font-size: 11px; font-weight: 800;
    letter-spacing: .08em; color: #fde68a; background: linear-gradient(180deg, #24211d, #121110); border: 1px solid rgba(212,175,55,.4); white-space: nowrap; }
.ph-ghost:hover:not(:disabled) { filter: brightness(1.25); }
.ph-wide { width: 100%; margin-top: 10px; }

.ph-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.ph-stack .ph-section { margin-top: 0; }
.ph-table { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-bottom: 8px;
    background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06); }
.ph-table b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.ph-table small { display: block; font-size: 11px; color: #a1a1aa; margin-top: 2px; }
.ph-table .ph-ghost { height: 32px; padding: 0 10px; }
.ph-mono, .ph-pin { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .12em; }
.ph-ticket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; border-radius: 16px;
    background: linear-gradient(180deg, #15161c, #0d0e12); border: 1px dashed rgba(245,158,11,.35); font-size: 13px; }
.ph-pin { font-size: 18px; color: #fde68a; }
@media (max-width: 480px) { .ph-ticket { grid-template-columns: 1fr 1fr; } .ph-modal { padding: 18px; } }
.ph-friends { max-height: 180px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ph-friend { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 8px; cursor: pointer; overflow: hidden; }
.ph-friend:hover { background: rgba(255,255,255,.03); }
.ph-friend input { accent-color: #f59e0b; flex-shrink: 0; }
.ph-friend i { width: 7px; height: 7px; border-radius: 50%; background: #3f3f46; flex-shrink: 0; }
.ph-friend i.on { background: #34d399; }
.ph-muted { font-size: 13px; color: #a1a1aa; }
.ph-note { font-size: 12px; color: #a8a29e; margin-top: 8px; }
.ph-err { font-size: 12px; color: #fda4af; background: rgba(76,5,25,.6); border: 1px solid rgba(244,63,94,.3); border-radius: 10px; padding: 8px 12px; }
/* The lobby's locked host button (below Level 15). */
.lb-host-locked { opacity: .7; cursor: not-allowed; }
html.calm-motion .ph-modal { animation: none; }

/* Private Tables server browser (PrivateHost.open). The modal widens while it shows the list. */
.ph-modal.ph-browser { max-width: 52rem; }
.ph-back { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #a8a29e; margin: -6px 0 14px; display: inline-block; }
.ph-back:hover { color: #fde68a; }
.ph-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ph-filter { flex: 1; grid-template-columns: repeat(6, 1fr); }
.ph-refresh { width: 44px; height: 44px; padding: 0; font-size: 18px; flex-shrink: 0; }
.ph-cols, .ph-srv { display: grid; grid-template-columns: minmax(0, 1fr) 120px 104px 168px; gap: 12px; align-items: center; }
.ph-cols { padding: 0 14px 6px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #71717a; font-weight: 700; }
.ph-list { display: flex; flex-direction: column; gap: 8px; min-height: 120px; max-height: min(46vh, 440px); overflow-y: auto; padding-right: 2px; }
.ph-srv { padding: 12px 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
    border: 1px solid rgba(255,255,255,.07); border-left: 3px solid var(--g, #e2b44a); }
.ph-srv:hover { border-color: rgba(245,158,11,.3); border-left-color: var(--g, #e2b44a); }
.ph-srv.g-holdem { --g: #e2b44a; } .ph-srv.g-stud { --g: #f59e0b; } .ph-srv.g-blackjack { --g: #34d399; } .ph-srv.g-three_card { --g: #a78bfa; }
.ph-srv-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ph-gi { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-style: normal; font-size: 20px;
    color: var(--g); background: rgba(0,0,0,.45); border: 1px solid color-mix(in srgb, var(--g) 40%, transparent); }
.ph-srv-name { min-width: 0; }
.ph-srv-name b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-srv-name small { display: block; font-size: 11px; color: #a1a1aa; margin-top: 2px; overflow-wrap: anywhere; }
.ph-gl { color: var(--g); font-weight: 700; }
/* The host line: their nameplate (static/js/nameplate.js, Row size). */
.ph-host { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 8px; }
.ph-host .np { min-width: 0; }
.ph-host-k { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #71717a; }
.ph-host-you { flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6ee7b7; }
.ph-host-name { font-size: 12px; color: #e4e4e7; }
.ph-srv-seats { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; font-size: 13px; }
.ph-srv-seats small { grid-column: 1 / -1; font-size: 10px; color: #71717a; }
.ph-meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.ph-meter i { display: block; height: 100%; background: linear-gradient(90deg, #34d399, #fbbf24); }
.ph-meter i.full { background: #f43f5e; }
.ph-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ph-badge.open { color: #6ee7b7; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.35); }
.ph-badge.pin { color: #fcd34d; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); }
.ph-badge.club { color: #c4b5fd; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.4); }
.ph-srv-act { display: flex; gap: 6px; justify-content: flex-end; }
.ph-srv-act .ph-ghost { height: 34px; padding: 0 10px; }
.ph-join { height: 34px; min-width: 84px; padding: 0 14px; border-radius: 10px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #052e1c; background: linear-gradient(180deg, #6ee7b7, #10b981 60%, #047857); box-shadow: 0 3px 0 #064e3b; }
.ph-join:hover:not(:disabled) { filter: brightness(1.1); }
.ph-join.locked { color: #1a1206; background: linear-gradient(180deg, #fff1b0, #e2b44a 55%, #a8741c); box-shadow: 0 3px 0 #6b4a12; }
.ph-join.off { color: #a1a1aa; background: #27272a; box-shadow: none; cursor: not-allowed; }
.ph-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center; min-height: 120px; padding: 20px;
    border-radius: 14px; border: 1px dashed rgba(255,255,255,.1); font-size: 13px; color: #a1a1aa; }
.ph-empty b { color: #e7e5e4; }
.ph-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.ph-host-cta .ph-gold { padding: 0 22px; height: 40px; }
.ph-gold.ph-locked { filter: grayscale(.7) brightness(.7); cursor: not-allowed; }
.ph-shake { animation: ph-shake .35s; }
@keyframes ph-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ph-lockmark { font-size: 34px; text-align: center; }
@media (max-width: 720px) {
    .ph-cols { display: none; }
    .ph-srv { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "seats access" "act act"; gap: 10px; }
    .ph-srv-main { grid-area: main; } .ph-srv-seats { grid-area: seats; min-width: 120px; } .ph-srv-access { grid-area: access; justify-self: end; }
    .ph-srv-act { grid-area: act; } .ph-srv-act .ph-join { flex: 1; }
    .ph-filter { grid-template-columns: repeat(2, 1fr); }
    .ph-foot { grid-template-columns: 1fr; }
    .ph-host-cta .ph-gold { width: 100%; }
    .ph-list { max-height: none; }
}
html.calm-motion .ph-shake { animation: none; }
