.pk-hero {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.pk-hero[hidden] { display: none; }
.pk-hero-text {
  margin: 0;
  max-width: 60ch;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.pk-hero .pk-actions { margin-top: 0; }
a.pk-btn { text-decoration: none; }
a.pk-btn:hover { text-decoration: none; }
.pk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}
.pk-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.pk-card h2, .pk-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
}
.pk-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.pk-banner {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text);
}
.pk-depth-preview {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.pk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.pk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pk-btn-primary {
  background: var(--primary);
  color: #fff;
}
.pk-btn-primary:hover { background: var(--primary-hover); }
.pk-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.pk-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.pk-btn-sm {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13px;
}
.pk-btn-card {
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--accent);
}
.pk-btn-native, .pk-btn-sms { display: none; }
.pk-is-mobile .pk-btn-native { display: inline-flex; order: -2; }
.pk-is-mobile .pk-btn-sms { display: inline-flex; }
.pk-is-mobile .pk-btn-copy { background: transparent; color: var(--text); border-color: var(--border); }
.pk-status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 14px;
  color: var(--accent);
}
.pk-match {
  display: grid;
  gap: 16px;
}
.pk-result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pk-result-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  width: fit-content;
}
.pk-rank-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 107, 128, 0.16);
  border: 1px solid rgba(255, 107, 128, 0.45);
  color: #ff9eb0;
}
.pk-win { background: rgba(34, 211, 238, 0.18); color: #22d3ee; }
.pk-loss { background: rgba(248, 113, 113, 0.18); color: #f87171; }
.pk-draw { background: rgba(124, 92, 255, 0.22); color: #c4b5fd; }
.pk-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.pk-side {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.pk-side-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.pk-side-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  margin: 4px 0;
  word-break: break-word;
}
.pk-side-score {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
}
.pk-side-pts {
  font-size: 13px;
  color: var(--muted);
}
.pk-vs-badge {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.pk-bar-row {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.pk-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(154, 164, 184, 0.16);
  overflow: hidden;
}
.pk-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6342f5, #22d3ee);
  transition: width 0.35s ease;
}
.pk-bar-fill-rival {
  background: linear-gradient(90deg, #475569, #94a3b8);
}
.pk-share-box {
  margin-top: 6px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(11, 15, 26, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.32);
  display: grid;
  gap: 12px;
}
.pk-share-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pk-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pk-mode-tab {
  min-height: 32px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pk-mode-tab[aria-pressed="true"] {
  background: rgba(91, 56, 245, 0.25);
  border-color: var(--accent);
  color: var(--text);
}
.pk-share-shuffle {
  background: none;
  border: 0;
  padding: 4px 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pk-share-shuffle:hover { text-decoration: underline; }
.pk-share-preview {
  margin: 0;
  padding: 10px 12px;
  white-space: pre-line;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.pk-card-canvas {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  display: block;
}
.pk-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pk-share-msg {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--accent);
  word-break: break-word;
}
.pk-share-msg:empty { display: none; }
.pk-board-wrap {
  margin-top: 24px;
}
.pk-board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pk-board-table th, .pk-board-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.pk-board-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}
.pk-empty {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}
@media (max-width: 780px) {
  .pk-grid { grid-template-columns: 1fr; }
  .pk-versus { grid-template-columns: 1fr; }
  .pk-vs-badge { text-align: center; }
  .pk-hero { padding: 16px; }
  .pk-hero-text { font-size: 18px; }
  .pk-hero .pk-btn { width: 100%; }
  .pk-share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pk-share-actions .pk-btn { width: 100%; }
}