/* Study Quest V7.9 lane "party": the party frames, the Party plate (the Sedenka's timer), the invite card, the Party window and
 * the summary (js/party-ui.js). Flat colour and the game's own materials (theme.css tokens), never a gradient. Online only. */
.pty {
  position: absolute;
  left: 12px;
  top: 236px;            /* under the unit frame, its buff row and the opened XP buffs list */
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  z-index: 0;
}
.pty-plate {
  pointer-events: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  font: 700 12px/16px var(--cx-font-label);
  letter-spacing: 0.04em;
  color: var(--cx-gold-text);
  background: var(--cx-iron-1);
  border: 1px solid var(--cx-iron-3);
  outline: 1px solid var(--cx-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  white-space: nowrap;
}
.pty-plate:hover, .pty-plate:focus-visible { border-color: var(--cx-bronze-2); }
.pty-plate.is-run { color: var(--cx-text); border-color: var(--cx-bronze-2); }
.pty-n { color: var(--cx-text-dim); font: 700 12px/16px var(--cx-font-num); font-variant-numeric: tabular-nums; }
.pty-dot { color: var(--cx-torch); }
.pty-ph.is-focus { color: var(--cx-gold-text); }
.pty-ph.is-break { color: var(--cx-lapis-3); }
.pty-clock { font: 700 13px/16px var(--cx-font-num); font-variant-numeric: tabular-nums; color: var(--cx-bone); }
.pty-bonus { color: #7fd17a; font: 700 12px/16px var(--cx-font-num); }

.pty-frames { display: flex; flex-direction: column; gap: 5px; }
.pty-f {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 4px 6px 5px 4px;
  background: var(--cx-smoke-0);
  border: 1px solid var(--cx-iron-3);
  outline: 1px solid var(--cx-line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}
.pty-f.is-away { opacity: 0.6; }
.pty-lv {
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  font: 700 13px/1 var(--cx-font-num);
  color: var(--cx-gold-text);
  background: var(--cx-iron-0);
  border: 1px solid var(--cx-iron-3);
}
.pty-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pty-name { font: 700 13px/16px var(--cx-font-body); color: var(--cx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px #000; }
.pty-acc { font: 400 11px/14px var(--cx-font-num); color: var(--cx-text-dim); }
.pty-bar { height: 5px; background: var(--pty-cls, #8a919a); border: 1px solid var(--cx-line); }
.pty-sub { font: 400 11px/14px var(--cx-font-num); color: var(--cx-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pty-f.is-study .pty-st { color: #7fd17a; }
.pty-f.is-world .pty-st { color: var(--cx-lapis-3); }
.pty-f.is-away .pty-st { color: var(--cx-text-faint); }
.pty-crown {
  display: inline-block;
  width: 10px;
  height: 7px;
  margin-right: 4px;
  background: var(--cx-gold-3);
  clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%);
}

.pty-inv {
  position: fixed;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 950;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 18px 12px;
  text-align: center;
}
.pty-inv__t { margin: 0 0 10px; font: 400 16px/22px var(--cx-font-body); color: var(--cx-text); }
.pty-inv__b { display: flex; gap: 10px; justify-content: center; }
.pty-inv__left { display: block; margin-top: 6px; font: 400 12px/16px var(--cx-font-num); color: var(--cx-text-dim); }

.pty-win, .pty-sum {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 940;
  width: min(520px, calc(100vw - 32px));
}
.pty-win .pty-body, .pty-sum .codex-window__body { max-height: calc(100vh - 190px); overflow: auto; }   /* the window itself never clips its banner */
.pty-sum { z-index: 945; width: min(440px, calc(100vw - 32px)); }
.pty-body { display: flex; flex-direction: column; gap: 10px; }
.pty-invite { display: flex; gap: 8px; align-items: flex-end; }
.pty-invite .codex-field { flex: 1 1 auto; }
.pty-note { margin: 0; font: 400 14px/20px var(--cx-font-body); color: var(--cx-text-dim); }
.pty-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pty-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 400 14px/20px var(--cx-font-body); }
.pty-sw { width: 10px; height: 10px; background: var(--pty-cls, #8a919a); border: 1px solid var(--cx-line); }
.pty-acts { margin-left: auto; display: flex; gap: 6px; }
.pty-acts .codex-btn { font-size: 11px; padding-top: 2px; padding-bottom: 2px; min-height: 0; }
.pty-pick { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font: 700 12px/16px var(--cx-font-label); color: var(--cx-text-dim); }
.pty-seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pty-opt {
  padding: 3px 10px;
  font: 700 12px/16px var(--cx-font-num);
  color: var(--cx-text-dim);
  background: var(--cx-iron-1);
  border: 1px solid var(--cx-iron-3);
  cursor: pointer;
}
.pty-opt.is-on { color: var(--cx-gold-leaf); border-color: var(--cx-bronze-3); background: var(--cx-bronze-0); }
.pty-timer { margin: 0; font: 700 14px/20px var(--cx-font-num); color: var(--cx-text); font-variant-numeric: tabular-nums; }
.pty-tab { width: 100%; border-collapse: collapse; font: 400 13px/18px var(--cx-font-num); color: var(--cx-text); font-variant-numeric: tabular-nums; }
.pty-tab th { text-align: left; font: 700 11px/16px var(--cx-font-label); color: var(--cx-gold-3); border-bottom: 1px solid var(--cx-iron-3); padding: 3px 6px; }
.pty-tab td { padding: 3px 6px; border-bottom: 1px solid var(--cx-ink-3); }
.pty-big { margin: 0 0 10px; font: 400 18px/26px var(--cx-font-body); color: var(--cx-text); }
.pty-big b { color: var(--cx-gold-text); }
.pty-msg { margin: 0 16px 12px; min-height: 18px; font: 400 13px/18px var(--cx-font-body); color: #e07a6a; }
.pty-msg.is-ok { color: #7fd17a; }

body.sq-compact .pty { top: 76px; width: 220px; }   /* compact: the unit frame is 60 px and the buff list is hidden */
@media (max-width: 600px) {
  .pty { width: 200px; }
  .pty-acts { margin-left: 0; }
}
