/* Party Room · playing from far away: watch screens, the phone's Table view,
   voice chat controls and speaking rings. Loaded on the TV (1920×1080 stage
   units) and on phones; the class names don't overlap. */

/* Speaking rings: shared/voice.js writes the per-player rules, this is the pulse. */
@keyframes pv-talk { from { outline-offset: 2px; } to { outline-offset: 6px; } }
.pv-sink { display: none; }

/* ---- TV: watch screen (/tv/CODE) --------------------------------------------- */
.watch #top-right,
.watch .ap-foot,
.watch .ap-watch,
.watch .final-actions { display: none !important; }
.watch [data-focus] { cursor: default; }
.watch .focused { outline: none !important; box-shadow: none !important; }
.ap-watch { margin-top: 18px; font-size: 21px; line-height: 1.35; color: var(--label-2); }
.ap-watch b { display: block; color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
/* Public codes are 5 letters: keep the big code inside its panel. */
.ap-code.len5 { font-size: 134px; letter-spacing: .04em; }
.ap-code.len6 { font-size: 110px; letter-spacing: .03em; }
.pr-notice .title { font-size: 56px; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.pr-notice .sub { font-size: 30px; color: var(--label-2); text-align: center; max-width: 1100px; line-height: 1.35; }

/* ---- TV: who is in voice, in the top bar --------------------------------------- */
.pr-dock { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 0; padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--glass-2, rgba(44,44,48,.72)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.pr-dock[hidden] { display: none; }
.pr-dock-mic { width: 34px; height: 34px; color: var(--green, #30d158); margin-right: 12px; display: inline-flex; }
.pr-dock-mic svg { width: 100%; height: 100%; }
.pr-dock-p { position: relative; display: inline-flex; margin-left: -6px; }
.pr-dock-p:first-of-type { margin-left: 0; }
.pr-dock-p + .pr-dock-p { margin-left: 4px; }
.pr-dock .avatar { width: 52px; height: 52px; font-size: 24px; }
.pr-dock-p i { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--red, #ff453a); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 4px; box-shadow: 0 0 0 3px rgba(0,0,0,.35); }
.pr-dock-p i svg { width: 100%; height: 100%; }
.pr-dock-more { margin-left: 10px; font-size: 22px; font-weight: 700; color: var(--label-2); }
[data-theme="light"] .pr-dock { background: rgba(255,255,255,.82); box-shadow: 0 10px 30px rgba(30,40,80,.16); }

/* ---- phone: buttons in the bar --------------------------------------------------- */
.pr-bar { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; vertical-align: middle; }
.pr-pill { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; border: none; background: var(--fill); color: var(--text); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.pr-pill svg { width: 16px; height: 16px; flex: none; }
.pr-bar.compact .pr-pill span { display: none; }
.pr-bar.compact .pr-pill:not(.split) { padding: 0 9px; }
.pr-pill .pr-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #000; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.pr-pill.split { padding: 0; gap: 0; overflow: hidden; }
.pr-pill.split button { height: 30px; border: none; background: none; color: inherit; font: 700 13px var(--font); padding: 0 10px; display: inline-flex; align-items: center; cursor: pointer; }
.pr-pill.split button + button { box-shadow: inset 1px 0 0 rgba(255,255,255,.18); min-width: 32px; justify-content: center; }
.pr-pill.live { background: rgba(48,209,88,.2); color: var(--green); }
.pr-pill.live.talking { background: var(--green); color: #000; }
.pr-pill.muted { background: rgba(255,69,58,.18); color: var(--red); }
.pr-pill.ptt, .pr-pill.listen { background: rgba(10,132,255,.18); color: var(--blue); }
.pr-pill.ptt.talking { background: var(--green); color: #000; }

/* ---- phone: voice sheet ------------------------------------------------------------ */
.pr-voice { max-height: 88vh; overflow-y: auto; }
.pr-ov.still, .pr-ov.still .sheet { animation: none; }
.pr-hero { width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 0; background: rgba(48,209,88,.18); color: var(--green); display: flex; align-items: center; justify-content: center; }
.pr-hero svg { width: 34px; height: 34px; }
.pr-note { margin: 0; text-align: center; font-size: 15px; line-height: 1.4; color: var(--label-2); padding: 0 8px; }
.pr-tip { margin: 0; text-align: center; font-size: 13px; line-height: 1.4; color: var(--label-3); padding: 0 8px; }
.pr-err { margin: 0; font-size: 14px; line-height: 1.4; color: var(--orange); text-align: center; padding: 0 6px; }
.pr-here { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--label-2); }
.pr-here span:last-child { margin-left: 4px; }
.pr-off { width: 22px; height: 22px; color: var(--red); margin-left: auto; flex: none; }
.pr-off svg { width: 100%; height: 100%; }
.pr-voice .ios-row[disabled] { opacity: .5; }
.pr-switch { margin-left: auto; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; transition: background .2s; }
.pr-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s; }
.pr-switch.on { background: var(--green); }
.pr-switch.on::after { transform: translateX(20px); }

/* ---- phone: push to talk and "tap to hear" ------------------------------------------ */
.pr-pill.split .pr-hold { gap: 4px; padding: 0 12px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pr-banner { position: fixed; left: 16px; right: 16px; top: calc(var(--safe-top, 0px) + 56px); z-index: 58; display: flex; justify-content: center; }
.pr-banner[hidden] { display: none; }
.pr-banner button { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px; padding: 12px 18px; background: var(--green); color: #000; font: 700 15px var(--font); box-shadow: 0 10px 30px rgba(0,0,0,.35); cursor: pointer; }
.pr-banner svg { width: 18px; height: 18px; }

/* ---- phone: the Table view ------------------------------------------------------------ */
.pr-table { position: fixed; inset: 0; z-index: 65; background: #000; display: flex; flex-direction: column; padding: var(--safe-top, 0px) 0 var(--safe-bottom, 0px); animation: fade .15s both; }
.pr-table-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; color: rgba(235,235,245,.7); font: 500 14px var(--font); }
.pr-table-bar b { color: #fff; }
.pr-table-bar button { border: none; background: none; color: var(--blue); font: 700 17px var(--font); cursor: pointer; padding: 6px 0; }
.pr-table-frame { flex: 1; min-height: 0; display: flex; }
.pr-table-frame iframe { flex: 1; width: 100%; height: 100%; border: 0; background: #000; }
.pr-table-tip { text-align: center; font: 500 13px var(--font); color: rgba(235,235,245,.5); padding: 10px 16px 14px; }
@media (orientation: landscape) {
  .pr-table-bar { position: absolute; top: calc(var(--safe-top, 0px) + 4px); right: 10px; z-index: 2; padding: 4px 10px; background: rgba(0,0,0,.55); border-radius: 999px; }
  .pr-table-bar span { display: none; }
  .pr-table-tip { display: none; }
}
body.pr-table-open { overflow: hidden; }
[data-theme="light"] .pr-pill { background: rgba(118,118,128,.14); }
[data-theme="light"] .pr-pill.split button + button { box-shadow: inset 1px 0 0 rgba(0,0,0,.12); }
