/* Shared look for player & staff pages: support list/form, ticket threads, WL list. Namespaced "pn-" / "tk-". */

/* Positioned so the fixed decorative body::before/::after layers render underneath the content. */
.pn-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: calc(var(--sn-h, 72px) + 36px) 24px 60px;
  color: #faf7f3;
}

.pn-page--wide {
  max-width: 1240px;
}

.pn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(245, 238, 231, 0.6);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}

.pn-back:hover {
  color: #fff;
}

.pn-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.pn-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #e8a861;
}

.pn-hero h1 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  color: #faf7f3;
}

.pn-lead {
  max-width: 620px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(245, 238, 231, 0.65);
}

.pn-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(14, 13, 12, 0.9);
}

.pn-card-title {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(243, 197, 143, 0.85);
}

/* ---------- Buttons ---------- */

.pn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(250, 247, 243, 0.9);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background-color .2s, border-color .2s, color .2s, filter .2s;
}

.pn-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.pn-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.pn-btn-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
}

.pn-btn-primary {
  border: 0;
  background: linear-gradient(135deg, #f3c58f 0%, #e8a861 45%, #d9793f 100%);
  color: #1b1009;
  box-shadow: 0 10px 26px rgba(232, 168, 97, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.pn-btn-primary:hover:not(:disabled) {
  color: #1b1009;
  background: linear-gradient(135deg, #f3c58f 0%, #e8a861 45%, #d9793f 100%);
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 32px rgba(232, 168, 97, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pn-btn-note {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: #f5c26b;
}

.pn-btn-note:hover:not(:disabled) {
  color: #ffd58a;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.6);
}

.pn-btn-danger {
  border-color: rgba(237, 123, 123, 0.35);
  background: rgba(237, 123, 123, 0.08);
  color: #f19a9a;
}

.pn-btn-danger:hover:not(:disabled) {
  color: #ffb3b3;
  background: rgba(237, 123, 123, 0.15);
  border-color: rgba(237, 123, 123, 0.55);
}

.pn-link {
  color: #f3c58f;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.pn-link:hover {
  text-decoration: underline;
}

/* ---------- Pills ---------- */

.pn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 238, 231, 0.85);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pn-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pn-pill.st-otwarte { color: #9db4f5; border-color: rgba(123, 154, 237, 0.35); background: rgba(26, 43, 86, 0.45); }
.pn-pill.st-w-trakcie,
.pn-pill.st-oczekujaca { color: #f3c58f; border-color: rgba(232, 168, 97, 0.35); background: rgba(86, 60, 26, 0.45); }
.pn-pill.st-zamkniete { color: rgba(245, 238, 231, 0.6); border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); }
.pn-pill.st-zaakceptowana { color: #7bed9a; border-color: rgba(123, 237, 154, 0.3); background: rgba(26, 86, 43, 0.45); }
.pn-pill.st-odrzucona,
.pn-pill.st-blacklista { color: #ed7b7b; border-color: rgba(237, 123, 123, 0.3); background: rgba(86, 26, 26, 0.45); }

.pn-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 238, 231, 0.7);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Alerts ---------- */

.pn-alert {
  display: none;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.pn-alert.is-visible {
  display: block;
}

.pn-alert.is-error {
  border: 1px solid rgba(237, 123, 123, 0.4);
  background: rgba(100, 20, 20, 0.3);
  color: #ffd1d1;
}

.pn-alert.is-success {
  border: 1px solid rgba(123, 237, 154, 0.35);
  background: rgba(26, 86, 43, 0.28);
  color: #d4ffe0;
}

/* ---------- Lists (tickets / applications) ---------- */

.pn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pn-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(14, 13, 12, 0.9);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, background-color .2s, transform .2s;
}

.pn-row:hover,
.pn-row:focus-visible {
  border-color: rgba(232, 168, 97, 0.35);
  background: rgba(20, 17, 15, 0.95);
  transform: translateY(-1px);
  outline: none;
}

.pn-row-id {
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(232, 168, 97, 0.08);
  border: 1px solid rgba(232, 168, 97, 0.2);
  color: #f3c58f;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.pn-row-main {
  min-width: 0;
}

.pn-row-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: #faf7f3;
}

.pn-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(245, 238, 231, 0.5);
}

.pn-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.pn-row-note {
  font-size: 12px;
  color: rgba(243, 197, 143, 0.85);
  white-space: nowrap;
}

.pn-row-go {
  color: rgba(245, 238, 231, 0.35);
  transition: color .2s, transform .2s;
}

.pn-row:hover .pn-row-go {
  color: #f3c58f;
  transform: translateX(2px);
}

.pn-empty {
  padding: 44px 24px;
  text-align: center;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(14, 13, 12, 0.6);
}

.pn-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: #faf7f3;
}

.pn-empty p {
  margin: 0 0 18px;
  font-size: 14px;
  color: rgba(245, 238, 231, 0.55);
}

.pn-muted {
  color: rgba(245, 238, 231, 0.5);
}

/* ---------- Forms ---------- */

.pn-step {
  margin-bottom: 18px;
  padding: 22px;
}

.pn-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pn-step-num {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(232, 168, 97, 0.3);
  background: rgba(232, 168, 97, 0.1);
  color: #f3c58f;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.pn-step-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #faf7f3;
}

.pn-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.pn-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}

.pn-cat strong {
  font-size: 14px;
  font-weight: 600;
  color: #faf7f3;
}

.pn-cat span {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(245, 238, 231, 0.5);
}

.pn-cat:hover:not(:disabled) {
  border-color: rgba(232, 168, 97, 0.35);
  background: rgba(232, 168, 97, 0.05);
}

.pn-cat.is-active {
  border-color: rgba(232, 168, 97, 0.6);
  background: rgba(232, 168, 97, 0.1);
  box-shadow: 0 0 0 3px rgba(232, 168, 97, 0.08);
}

.pn-cat.is-recruitment strong::after {
  content: "Rekrutacja";
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(232, 168, 97, 0.15);
  color: #f3c58f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.pn-cat:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pn-field + .pn-field {
  margin-top: 16px;
}

.pn-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 238, 231, 0.8);
}

.pn-label span {
  font-weight: 500;
  color: rgba(245, 238, 231, 0.4);
  font-variant-numeric: tabular-nums;
}

.pn-page .pn-input,
.pn-page .pn-textarea,
.pn-page .pn-select {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px !important;
  background: rgba(6, 6, 6, 0.75) !important;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.pn-page .pn-textarea {
  min-height: 180px;
  resize: vertical;
}

.pn-page .pn-select {
  height: 42px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
}

.pn-page .pn-select option {
  background: #120f0e;
}

.pn-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(245, 238, 231, 0.45);
}

/* Category questions in the new-ticket form (support.js). */
.pn-page .pn-textarea.pn-textarea-sm {
  min-height: 76px;
}

.pn-form-fields {
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pn-form-fields .pn-label {
  line-height: 1.5;
}

.pn-parent-note {
  margin: 0 0 16px;
  font-size: 13px;
}

/* Help articles that may answer the question before a ticket is sent. */
.pn-suggest {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(123, 154, 237, 0.25);
  background: rgba(123, 154, 237, 0.07);
  font-size: 14px;
  color: rgba(245, 238, 231, 0.8);
}

.pn-suggest strong {
  display: block;
  margin-bottom: 6px;
  color: #c4d3fa;
  font-size: 13px;
}

.pn-suggest ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.pn-list-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 13px;
  color: rgba(245, 238, 231, 0.5);
}

.pn-list-pager:empty {
  display: none;
}

.pn-row.is-unread {
  border-color: rgba(232, 168, 97, 0.32);
  background: rgba(232, 168, 97, 0.06);
}

.pn-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pn-file {
  position: relative;
  width: 110px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.pn-file img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pn-file button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.pn-file button:hover {
  background: rgba(220, 60, 60, 0.9);
}

.pn-attach {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(245, 238, 231, 0.75);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}

.pn-attach:hover {
  color: #fff;
  border-color: rgba(232, 168, 97, 0.55);
  background: rgba(232, 168, 97, 0.06);
}

.pn-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.pn-form-actions p {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 238, 231, 0.55);
}

/* ---------- Ticket workspace ---------- */

.tk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.tk-head h1 {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: #faf7f3;
  overflow-wrap: anywhere;
}

.tk-head h1 small {
  margin-right: 8px;
  color: rgba(243, 197, 143, 0.75);
  font-size: .75em;
}

.tk-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(245, 238, 231, 0.5);
}

.tk-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tk-head-actions .pn-select {
  width: auto;
  min-width: 170px;
}

.tk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}

.tk-main {
  min-width: 0;
}

.tk-thread {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 0;
  background: rgba(12, 11, 10, 0.88);
}

.tk-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 88%;
}

.tk-msg.is-staff {
  flex-direction: row-reverse;
  margin-left: auto;
}

.tk-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #221a15;
  box-shadow: 0 0 0 1px rgba(232, 168, 97, 0.2);
}

.tk-bubble {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 4px 14px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
}

.tk-msg.is-staff .tk-bubble {
  border-radius: 14px 4px 14px 14px;
  border-color: rgba(232, 168, 97, 0.22);
  background: rgba(232, 168, 97, 0.08);
}

.tk-msg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.tk-msg.is-staff .tk-msg-head {
  justify-content: flex-end;
}

.tk-author {
  font-size: 14px;
  font-weight: 600;
  color: #faf7f3;
}

.tk-role {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(232, 168, 97, 0.16);
  color: #f3c58f;
}

.tk-role.is-author {
  background: rgba(123, 154, 237, 0.16);
  color: #aec2f7;
}

.tk-time {
  font-size: 12px;
  color: rgba(245, 238, 231, 0.4);
}

.tk-bubble .message-content {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(250, 247, 243, 0.9);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tk-bubble .msg-attachments {
  margin-top: 10px;
}

/* Web addresses in messages (utils.js linkify). */
.message-content .msg-link {
  color: var(--plrp-amber-soft, #f0c48f);
  text-decoration: underline;
  text-decoration-color: rgba(240, 196, 143, 0.45);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.message-content .msg-link:hover,
.message-content .msg-link:focus-visible {
  color: #fff;
  text-decoration-color: currentColor;
}

.tk-note {
  align-self: stretch;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
}

.tk-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: rgba(245, 238, 231, 0.5);
}

.tk-note-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f5c26b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tk-note .message-content {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(250, 247, 243, 0.85);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tk-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(245, 238, 231, 0.35);
  font-size: 12px;
}

.tk-divider::before,
.tk-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.tk-composer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 16px 18px 18px;
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(232, 168, 97, 0.18);
  background: rgba(16, 14, 13, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.35);
}

.tk-composer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tk-composer-top .pn-select {
  width: auto;
  min-width: 220px;
  max-width: 100%;
}

.tk-page .tk-input {
  display: block;
  width: 100%;
  min-height: 84px;
  max-height: 320px;
  padding: 12px 14px;
  border-radius: 10px !important;
  background: rgba(6, 6, 6, 0.8) !important;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

.tk-composer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.tk-composer-bottom .tk-count {
  font-size: 12px;
  color: rgba(245, 238, 231, 0.4);
  font-variant-numeric: tabular-nums;
}

.tk-composer-btns {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.tk-closed {
  padding: 18px 20px;
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 14, 13, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(245, 238, 231, 0.65);
  font-size: 14px;
}

.tk-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--sn-h, 72px) + 20px);
}

.tk-side .pn-card {
  padding: 18px;
}

.tk-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tk-person .tk-avatar {
  width: 44px;
  height: 44px;
}

.tk-person strong {
  display: block;
  font-size: 15px;
  color: #faf7f3;
  overflow-wrap: anywhere;
}

.tk-person small {
  font-size: 12px;
  color: rgba(245, 238, 231, 0.45);
  font-variant-numeric: tabular-nums;
}

.tk-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.tk-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.tk-facts dt {
  color: rgba(245, 238, 231, 0.5);
}

.tk-facts dd {
  margin: 0;
  color: #faf7f3;
  font-weight: 500;
  text-align: right;
}

.tk-people {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.tk-people-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tk-people-row .tk-avatar {
  width: 26px;
  height: 26px;
}

.tk-people-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #faf7f3;
}

.tk-people-row button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: rgba(245, 238, 231, 0.4);
  cursor: pointer;
  transition: color .2s, background-color .2s;
}

.tk-people-row button:hover {
  color: #ffb3b3;
  background: rgba(237, 123, 123, 0.12);
}

.tk-add {
  display: flex;
  gap: 8px;
}

.tk-add .pn-select {
  flex: 1;
  min-width: 0;
}

.tk-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tk-owner-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tk-owner-person {
  margin-bottom: 0;
}

.tk-owner-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 238, 231, 0.6);
}

.tk-owner-btn {
  width: 100%;
}

.tk-info {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 238, 231, 0.6);
}

.tk-info p {
  margin: 0;
}

.tk-info p + p {
  margin-top: 8px;
}

/* Category form answers (age, experience...) inside the opening message. */
.tk-form {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tk-bubble > .tk-form:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.tk-form-row {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tk-form-row dt {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f3c58f;
}

.tk-form-row dd {
  margin: 0;
}

.tk-bubble .tk-form-row .message-content {
  font-size: 14px;
}

.tk-waiting {
  color: #aec2f7;
  background: rgba(123, 154, 237, 0.14);
}

.tk-waiting.is-staff,
.tk-waiting.is-player {
  color: #f3c58f;
  background: rgba(232, 168, 97, 0.16);
}

.tk-flag {
  color: #f5c26b;
  background: rgba(245, 158, 11, 0.14);
}

a.tk-chip-link {
  color: #f0c48f;
  text-decoration: none;
}

a.tk-chip-link:hover {
  color: #fff;
}

.tk-older {
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.tk-owner-form,
.tk-reopen {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tk-owner-form {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tk-owner-form textarea,
.tk-reopen textarea {
  min-height: 74px;
  resize: vertical;
}

.tk-owner-form-btns,
.tk-reopen-btns,
.tk-closed-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tk-reopen {
  flex: 1;
}

.tk-blacklist {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tk-blacklist .tk-owner-btn {
  width: 100%;
}

.tk-blacklist-on {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(237, 123, 123, 0.35);
  background: rgba(237, 123, 123, 0.08);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(250, 247, 243, 0.85);
}

.tk-blacklist-on strong {
  color: #f19a9a;
}

.tk-side-btn {
  width: 100%;
  margin-top: 14px;
}

/* Attachments: whole screenshots, click opens the original. */
.msg-attachments {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.msg-attachments a {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
  transition: border-color .2s;
}

.msg-attachments a:hover {
  border-color: rgba(232, 168, 97, 0.5);
}

.msg-attachments img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  object-fit: contain;
}

/* ---------- Conversation pane ---------- */

.tk-thread-wrap {
  position: relative;
}

.tk-thread:focus-visible {
  outline: 2px solid rgba(232, 168, 97, 0.4);
  outline-offset: -2px;
}

.tk-jump {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 21, 19, 0.96);
  color: rgba(250, 247, 243, 0.9);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  transition: background-color .2s, border-color .2s, color .2s;
}

.tk-jump:hover {
  border-color: rgba(232, 168, 97, 0.5);
  color: #fff;
}

.tk-jump.has-new {
  border: 0;
  background: linear-gradient(135deg, #f3c58f, #e8a861);
  color: #1b1009;
}

.tk-jump[hidden] {
  display: none;
}

/* Wide screens: the page stays put, the conversation scrolls inside its own window
   and the reply box is always visible at its bottom. --tk-top is set by thread.js. */
@media (min-width: 981px) {
  .tk-page {
    padding-bottom: 20px;
  }

  .tk-page .pn-back {
    margin-bottom: 12px;
  }

  .tk-page .tk-head {
    margin-bottom: 16px;
  }

  .tk-page .tk-head h1 {
    margin-bottom: 8px;
    font-size: clamp(22px, 2.4vw, 28px);
  }

  .tk-page .tk-layout {
    height: calc(100vh - var(--tk-top, 250px) - 20px);
    height: calc(100dvh - var(--tk-top, 250px) - 20px);
    min-height: 440px;
    align-items: stretch;
  }

  .tk-page .tk-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(12, 11, 10, 0.9);
  }

  .tk-page .tk-thread-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .tk-page .tk-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 168, 97, 0.28) transparent;
  }

  /* Short conversations sit at the bottom, next to the reply box, like in a chat. */
  .tk-page .tk-thread > :first-child {
    margin-top: auto;
  }

  .tk-page .tk-thread::-webkit-scrollbar {
    width: 8px;
  }

  .tk-page .tk-thread::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(232, 168, 97, 0.25);
  }

  .tk-page .tk-composer,
  .tk-page .tk-closed {
    position: static;
    flex-shrink: 0;
    border: 0;
    border-top: 1px solid rgba(232, 168, 97, 0.16);
    border-radius: 0;
    box-shadow: none;
  }

  .tk-page .tk-input {
    min-height: 58px;
    max-height: 180px;
  }

  .tk-page .tk-composer .pn-files {
    max-height: 96px;
    overflow-y: auto;
  }

  .tk-page .msg-attachments img {
    max-height: min(56vh, 460px);
  }

  .tk-page .tk-side {
    position: static;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .tk-layout {
    grid-template-columns: 1fr;
  }

  .tk-side {
    position: static;
  }

  .tk-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tk-head-actions {
    flex-wrap: wrap;
  }

  .tk-head-actions .pn-select {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .pn-page {
    padding: calc(var(--sn-h, 64px) + 24px) 16px 48px;
  }

  .pn-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .pn-hero .pn-btn {
    width: 100%;
  }

  .pn-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    padding: 14px;
  }

  .pn-row-go {
    display: none;
  }

  .pn-row-side {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
  }

  .pn-row-title {
    white-space: normal;
  }

  .pn-step {
    padding: 18px 16px;
  }

  .pn-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pn-form-actions .pn-btn {
    width: 100%;
  }

  .tk-thread {
    padding: 16px 12px;
  }

  .tk-msg {
    max-width: 100%;
  }

  .tk-avatar {
    width: 32px;
    height: 32px;
  }

  .tk-composer {
    position: static;
    padding: 12px;
    box-shadow: none;
  }

  .tk-composer-top .pn-select {
    min-width: 0;
    flex: 1;
  }

  .tk-composer-btns {
    flex-wrap: wrap;
    width: 100%;
  }

  .tk-composer-btns .pn-btn {
    flex: 1 1 140px;
    min-width: 0;
  }

  .tk-closed {
    flex-direction: column;
    align-items: stretch;
  }
}
