/* The shared kit (approved 564A, 22/11/2026; docs/kit.md): the tournament pages' tokens and parts for the older screens.
   Migrated so far: the profile, VCP Finals registration step 1 and Tìm đồng đội (app.js, #drawer[data-kit]).
   Light on the website; dark colours only inside the app's web view (html.in-app, set by dock.js) with the phone in dark
   mode. The --tp-* names and values are the same as tournament.css's, so a part looks the same on both kinds of page. */

:root {
  --tp-bg: #f2f3f7;
  --tp-card: #fff;
  --tp-ink: #0b1734;
  --tp-ink2: #1e2743;
  --tp-muted: #6b7690;
  --tp-soft: #e8edf5;
  --tp-brand-ink: var(--navy);
  --tp-optic-soft: #e2f7a5;
  --tp-seg-track: rgba(118, 128, 150, 0.14);
  --tp-seg-on: #fff;
  --tp-seg-shadow: 0 1px 3px rgba(7, 22, 52, 0.14);
  --tp-navy-card: linear-gradient(165deg, #0e2b68 0%, #081b4e 55%, #071634 100%);
  --tp-ico: #eef1f6;
  --tp-dim: #b3bccb;
  --tp-line: #c9d0dc;
  --tp-bar: #e3e8f0;
  --tp-hair: rgba(11, 23, 52, 0.1);
  --tp-red: #bf3a30;
  --tp-red-soft: #fbe8e6;
  --tp-circ-shadow: 0 0 0 0.5px rgba(7, 22, 52, 0.1), 0 2px 8px rgba(7, 22, 52, 0.1);
  --tp-font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  html.in-app {
    --tp-bg: #03060d;
    --tp-card: #0e1424;
    --tp-ink: #eef2f8;
    --tp-ink2: #c9d1df;
    --tp-muted: #8e99b1;
    --tp-soft: #232c40;
    --tp-brand-ink: var(--optic);
    --tp-optic-soft: rgba(200, 242, 62, 0.16);
    --tp-seg-track: rgba(255, 255, 255, 0.09);
    --tp-seg-on: #33405c;
    --tp-seg-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --tp-navy-card: linear-gradient(165deg, #111e3f 0%, #0c1731 60%, #091229 100%);
    --tp-ico: #232c40;
    --tp-dim: #56627a;
    --tp-line: #3a4560;
    --tp-bar: #2a3348;
    --tp-hair: rgba(255, 255, 255, 0.08);
    --tp-red: #ff8a80;
    --tp-red-soft: rgba(191, 58, 48, 0.2);
    --tp-circ-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
  /* Admin pages still built from the board's parts (Ảnh, Đề xuất sửa): the board's colours follow the dark tokens,
     as the profile's older sections do below. Only inside the admin area; the board itself is unchanged. */
  html.in-app #admin-view.adm, html.in-app .adm-sheet {
    --ink: var(--tp-ink);
    --muted: var(--tp-muted);
    --line: var(--tp-hair);
    --surface: var(--tp-card);
    --paper: var(--tp-bg);
    --row-hover: var(--tp-soft);
    --optic-soft: var(--tp-optic-soft);
    --down: var(--tp-red);
    --down-bg: var(--tp-red-soft);
  }
}

/* ---------- Parts ---------- */

.kit { font-family: var(--tp-font); color: var(--tp-ink); -webkit-tap-highlight-color: transparent; }
.kit .k-num { font-family: var(--font-score); font-weight: 500; font-variant-numeric: tabular-nums; }
.k-ic { display: block; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* The top of a screen: × (or ‹) at the left in a 44 px circle, the step bars or nothing, at most one circle right. */
.k-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.k-top-mid { display: flex; flex: 1; justify-content: center; gap: 5px; min-width: 0; }
.k-circ {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tp-card);
  box-shadow: var(--tp-circ-shadow);
  color: var(--tp-ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.k-circ:active { transform: scale(0.94); }
.k-circ .k-ic { width: 20px; height: 20px; stroke-width: 2.2; }

/* Steps: thin bars and "1/5". */
.k-bars { display: flex; flex: 1; justify-content: center; gap: 5px; }
.k-bars i { width: 34px; height: 4px; border-radius: 2px; background: var(--tp-bar); }
.k-bars i.is-on { background: var(--navy); }
@media (prefers-color-scheme: dark) { html.in-app .k-bars i.is-on { background: var(--optic); } }
.k-count { min-width: 44px; text-align: right; font: 500 17px/1 var(--font-score); color: var(--tp-muted); }

/* One main action, ball yellow; the others quiet. */
.k-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 27px;
  font: 600 17px/1.1 var(--tp-font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}
.k-btn .k-ic { width: 21px; height: 21px; stroke-width: 1.9; }
.k-btn.is-main { background: var(--optic); color: var(--navy-deep); }
.k-btn.is-ghost { min-height: 48px; background: var(--tp-card); color: var(--tp-ink); font-weight: 500; font-size: 16px; }
.k-btn:active { filter: brightness(0.96); }
.k-btn[disabled], .k-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.k-quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tp-muted);
  font: 400 15px/1.2 var(--tp-font);
  cursor: pointer;
}
.k-quiet .k-ic { width: 16px; height: 16px; stroke-width: 1.9; }
.k-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tp-ink);
  font: 400 16px/1.2 var(--tp-font);
  text-decoration: underline;
  text-decoration-color: rgba(107, 118, 144, 0.5);
  text-underline-offset: 4px;
  cursor: pointer;
}

.k-card { border-radius: 22px; background: var(--tp-card); }

/* A search field: 56 px, white, the magnifier in muted ink. */
.k-field { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border-radius: 18px; background: var(--tp-card); color: var(--tp-muted); }
.k-field .k-ic { width: 22px; height: 22px; stroke-width: 2; }
.k-field input {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  padding: 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--tp-ink);
  font: 400 17px/1.2 var(--tp-font);
  -webkit-appearance: none;
  appearance: none;
}
.k-field input::placeholder { color: var(--tp-muted); opacity: 1; }
.k-field input::-webkit-search-cancel-button { display: none; }
.k-field:focus-within { box-shadow: 0 0 0 2px var(--tp-brand-ink); }

/* Tabs: one bar. */
.k-seg { display: flex; gap: 2px; min-height: 50px; padding: 3px; overflow-x: auto; border-radius: 22px; background: var(--tp-seg-track); scrollbar-width: none; }
.k-seg::-webkit-scrollbar { display: none; }
.k-seg button {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--tp-ink2);
  font: 400 14px/1 var(--tp-font);
  white-space: nowrap;
  cursor: pointer;
}
.k-seg button em { font-style: normal; font-size: 13px; color: var(--tp-muted); }
.k-seg button[aria-selected="true"] { background: var(--tp-seg-on); color: var(--tp-ink); font-weight: 500; box-shadow: var(--tp-seg-shadow); }

/* Empty, error and not found: one look (icon, a few words, at most one button). */
.k-state { display: grid; justify-items: center; gap: 10px; padding: 36px 16px; text-align: center; }
.k-state-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--tp-soft); color: var(--navy); }
@media (prefers-color-scheme: dark) { html.in-app .k-state-ic { color: var(--tp-ink); } }
.k-state-ic .k-ic { width: 26px; height: 26px; stroke-width: 2; }
.k-state p { margin: 0; font: 400 16px/1.4 var(--tp-font); color: var(--tp-ink2); }
.k-state .k-btn { width: auto; min-height: 44px; padding: 0 22px; font-size: 15px; }

/* Three facts in three tiles: a big number over a short label. */
.k-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.k-facts > div { min-width: 0; padding: 12px; border-radius: 18px; background: var(--tp-card); }
.k-facts dt { order: 2; font: 400 13px/1.25 var(--tp-font); color: var(--tp-muted); }
.k-facts dd { margin: 0 0 4px; font: 500 26px/1 var(--font-score); color: var(--tp-ink); }
.k-facts > div { display: flex; flex-direction: column; }

/* A sheet from the bottom (the kit's own, for the profile's three tiles). */
.k-sheet { position: fixed; inset: 0; z-index: 40; }
.k-sheet-scrim { position: absolute; inset: 0; background: rgba(7, 22, 52, 0.45); }
.k-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--tp-bg);
  color: var(--tp-ink);
  font-family: var(--tp-font);
  overscroll-behavior: contain;
}
@media (min-width: 721px) {
  .k-sheet-panel { left: 50%; right: auto; bottom: auto; top: 50%; width: min(440px, calc(100% - 32px)); max-height: calc(100% - 64px); border-radius: 26px; transform: translate(-50%, -50%); }
}
.k-sheet-title { margin: 4px 0 2px; font: 600 22px/1.25 var(--tp-font); letter-spacing: -0.01em; }
.k-sheet-sub { margin: 0 0 14px; font: 400 15px/1.35 var(--tp-font); color: var(--tp-muted); }

/* ---------- The drawer's screens in the kit (app.js renderDrawer sets #drawer[data-kit]) ---------- */

#drawer[data-kit] { background: var(--tp-bg); color: var(--tp-ink); }
#drawer[data-kit] .drawer-body { --pad-x: 16px; --pad-top: 12px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
#drawer[data-kit] :focus-visible { outline: 2px solid var(--tp-brand-ink); outline-offset: 2px; }
.pk-top { margin-bottom: 12px; }
/* The main action of a screen kept in view at the bottom of the drawer, over the page colour. */
.pk-bar { position: sticky; bottom: 0; z-index: 2; margin: 18px -16px 0; padding: 12px 16px calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(242, 243, 247, 0), var(--tp-bg) 30%); }
@media (prefers-color-scheme: dark) { html.in-app .pk-bar { background: linear-gradient(to bottom, rgba(3, 6, 13, 0), var(--tp-bg) 30%); } }
.k-sheet .pk-bar { margin: 14px 0 0; padding: 0; background: none; }

/* ----- The profile ----- */

.pk-hero { position: relative; padding: 20px 18px 18px; border-radius: 26px; background: var(--tp-navy-card); color: #fff; }
.pk-hero :focus-visible { outline-color: var(--optic); }
.pk-id { display: flex; align-items: center; gap: 16px; }
.pk-id .avatar-xl { width: 92px; height: 92px; font-size: 34px; box-shadow: 0 0 0 3px #081b4e, 0 0 0 5px var(--optic); }
.pk-who { flex: 1; min-width: 0; }
.pk-name { margin: 0; font: 500 23px/1.2 var(--tp-font); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pk-tags span { padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); font: 400 13px/1.4 var(--tp-font); }
.pk-tags .is-veteran { background: var(--gold); color: var(--navy-deep); font-weight: 500; }
.pk-hero .profile-facts { font-weight: 400; font-size: 14px; }
.pk-pts { display: flex; align-items: flex-end; gap: 18px; margin: 18px 0 0; }
.pk-pts dd { margin: 0; }
.pk-num { font: 500 78px/0.9 var(--font-score); color: var(--optic); letter-spacing: 0.01em; }
.pk-other { padding-bottom: 6px; font: 400 13px/1.2 var(--tp-font); color: rgba(255, 255, 255, 0.65); }
.pk-other dd { margin-top: 4px; font: 500 28px/1 var(--font-score); color: #fff; }
.pk-delta { margin-left: 4px; font-style: normal; font-size: 15px; }
.pk-delta.is-down { color: #ffb4ad; }
.pk-delta.is-up { color: #9ee8b8; }
.pk-delta.is-same { font: 400 12px var(--tp-font); color: rgba(255, 255, 255, 0.6); }
.pk-label { margin: 4px 0 0; font: 400 13px/1.2 var(--tp-font); color: rgba(255, 255, 255, 0.65); }
.pk-hero > .k-btn { margin-top: 16px; }
.pk-hero .k-btn svg, .pk-two .k-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
/* 584: "Tạo poster" joins the row when "Nhắn tin" is the main action; each button its icon over a short label. */
.pk-two.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Someone's profile with the social module (owner 23/11/2026, 639): a bento, "Tải ảnh profile" the big tile with its
   icon large in the middle; Hẹn giao lưu · Tạo poster · Tìm đồng đội beside it, one line each, larger icons. */
.pk-two.is-four { grid-template-columns: 1.1fr 1fr; grid-template-rows: repeat(3, auto); gap: 8px; }
.pk-two.is-four .k-btn { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 54px; padding: 0 14px; border-radius: 16px; font-size: 15px; line-height: 1.2; text-align: left; white-space: nowrap; text-decoration: none; }
.pk-two.is-four .k-btn svg { width: 27px; height: 27px; stroke-width: 1.7; }
.pk-two.is-four #card-open { grid-row: 1 / 4; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; border-radius: 22px; background: var(--tp-optic-soft); color: var(--tp-ink); font-size: 18px; font-weight: 600; text-align: center; white-space: normal; }
.pk-two.is-four #card-open svg { width: 72px; height: 72px; stroke-width: 1.5; }
@media (max-width: 350px) { .pk-two.is-four .k-btn { gap: 8px; padding: 0 10px; font-size: 14px; white-space: normal; } .pk-two.is-four .k-btn svg { width: 24px; height: 24px; } }
.pk-two.is-three .k-btn { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 6px; border-radius: 20px; font-size: 14px; line-height: 1.15; text-align: center; }
.pk-two .k-btn[aria-busy="true"] { opacity: 0.6; }
/* The rest of the profile as white cards on the page colour; headings at 600, words at 400. */
#drawer[data-kit="profile"] .profile-section { margin-top: 10px; padding: 14px 16px; border-radius: 22px; background: var(--tp-card); }
#drawer[data-kit="profile"] .profile-heading { font: 600 15px/1.3 var(--tp-font); color: var(--tp-ink); }
#drawer[data-kit="profile"] .rank-tiles { padding: 0; }
#drawer[data-kit="profile"] .rank-num { font-weight: 500; font-size: 30px; color: var(--tp-ink); }
#drawer[data-kit="profile"] .rank-total { font-weight: 500; font-size: 16px; }
#drawer[data-kit="profile"] .spread-caption b { font-weight: 600; }
#drawer[data-kit="profile"] .profile-section:has(> .spread) { margin-top: -22px; padding-top: 22px; border-radius: 0 0 22px 22px; }
#drawer[data-kit="profile"] .results, #drawer[data-kit="profile"] .title-list-view li { font-weight: 400; }
#drawer[data-kit="profile"] .result-text { font-weight: 400; }
#drawer[data-kit="profile"] .timeline b, #drawer[data-kit="profile"] .timeline strong { font-weight: 500; }
#drawer[data-kit="profile"] .profile-leave { margin-top: 14px; }
#drawer[data-kit="profile"] .private-card { color: var(--ink); }

/* "Đây là tôi" · "Chờ duyệt" · "Hồ sơ của tôi" (558): one small pill under the tags, 44 px to tap. */
.pk-hero .me-slot { margin-top: 10px; }
.pk-hero .me-pill {
  position: relative;
  min-height: 32px;
  padding: 0 13px 0 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: transparent;
  color: #fff;
  font: 400 14px/1 var(--tp-font);
}
.pk-hero .me-pill::after { content: ""; position: absolute; inset: -6px -4px; }
.pk-hero .me-pill svg { width: 17px; height: 17px; }
.pk-hero .me-pill.is-wait { border-color: rgba(200, 242, 62, 0.55); background: rgba(200, 242, 62, 0.08); color: var(--optic); }
.pk-hero .me-pill.is-yes { border-color: var(--optic); background: var(--optic); color: var(--navy-deep); font-weight: 500; }
.pk-hero .me-pill.is-yes::after { display: none; }

/* The three tiles of "Hồ sơ của tôi" (558 d). */
.pk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pk-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 12px 6px;
  border: 0;
  border-radius: 20px;
  background: var(--tp-card);
  color: var(--tp-ink);
  font: 400 13px/1.25 var(--tp-font);
  text-align: center;
  cursor: pointer;
}
.pk-tile-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tp-optic-soft); color: var(--navy); }
@media (prefers-color-scheme: dark) { html.in-app .pk-tile-ic { color: var(--optic); } }

/* Their sheets. */
.pv-opts { display: grid; gap: 10px; }
.pv-opt {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 14px;
  border: 0;
  border-radius: 20px;
  background: var(--tp-card);
  color: var(--tp-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pv-opt[aria-checked="true"] { background: #f8fee7; box-shadow: inset 0 0 0 2px var(--optic); }
@media (prefers-color-scheme: dark) { html.in-app .pv-opt[aria-checked="true"] { background: rgba(200, 242, 62, 0.08); } }
.pv-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tp-ico); color: var(--navy); }
.pv-opt[aria-checked="true"] .pv-ic { background: var(--optic); color: var(--navy-deep); }
.pv-text b { display: block; font: 500 16px/1.25 var(--tp-font); }
.pv-text small { display: block; margin-top: 2px; font: 400 13px/1.3 var(--tp-font); color: var(--tp-muted); }
.pv-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--tp-line); color: transparent; }
.pv-opt[aria-checked="true"] .pv-dot { background: var(--navy); box-shadow: none; color: #fff; }
.pv-dot .k-ic { width: 15px; height: 15px; }
.pv-logged { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--up-bg, #e3f3ea); color: var(--up, #16804d); font: 400 13px/1.3 var(--tp-font); }
.pv-logged .k-ic { width: 15px; height: 15px; }
.av-now { display: grid; place-items: center; margin: 4px 0 14px; }
.av-now .avatar-xl { width: 140px; height: 140px; font-size: 52px; box-shadow: 0 0 0 4px var(--tp-bg), 0 0 0 7px var(--optic); }
.av-count { margin: 0 0 8px; font: 400 13px/1.3 var(--tp-font); color: var(--tp-muted); }
.av-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: hidden; border-radius: 16px; }
.av-photo { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--tp-soft); cursor: pointer; }
.av-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.av-photo[aria-checked="true"] { box-shadow: inset 0 0 0 4px var(--optic); }
.av-photo[aria-checked="true"] img { opacity: 0.9; }
.av-ck { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; }
.av-photo[aria-checked="true"] .av-ck { display: grid; }
.av-ck .k-ic { width: 14px; height: 14px; }
.hd-h { margin: 14px 4px 6px; font: 500 13px/1.2 var(--tp-font); color: var(--tp-muted); }
.hd-list { margin: 0; padding: 4px 0; list-style: none; }
.hd-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 8px 4px 14px; }
.hd-row + .hd-row { box-shadow: inset 0 1px 0 var(--tp-hair); }
.hd-row span { flex: 1; min-width: 0; font: 400 14px/1.3 var(--tp-font); }
.hd-row .k-btn { flex: none; width: auto; min-height: 44px; padding: 0 16px; background: var(--tp-soft); font-size: 14px; }

/* ----- VCP Finals registration, step 1: "Bạn là ai?" ----- */

.rk { display: flex; flex-direction: column; min-height: calc(100dvh - 32px); }
.rk-kick { margin: 18px 4px 4px; font: 400 15px/1.2 var(--tp-font); color: var(--tp-muted); }
.rk-ask { margin: 0 4px 18px; font: 600 32px/1.15 var(--tp-font); letter-spacing: -0.01em; color: var(--tp-ink); }
.rk-ask:focus { outline: none; }
.rk-results:empty { display: none; }
.rk-results { margin-top: 8px; overflow: hidden; border-radius: 18px; background: var(--tp-card); }
.rk-picked { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 14px; border-radius: 20px; background: var(--tp-card); box-shadow: inset 0 0 0 2px var(--optic); }
.rk-picked .avatar { width: 52px; height: 52px; font-size: 19px; }
.rk-picked-text { flex: 1; min-width: 0; }
.rk-picked-text b { display: block; font: 500 17px/1.25 var(--tp-font); }
.rk-picked-text small { font: 400 14px/1.3 var(--tp-font); color: var(--tp-muted); }
.rk-ck { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { html.in-app .rk-ck { background: var(--optic); color: var(--navy-deep); } }
.rk-manual { margin: 6px 4px 0; align-self: flex-start; }
.rk-facts { margin-top: 18px; }
.rk .reg-manual { padding: 14px; border-radius: 20px; background: var(--tp-card); }
.rk .reg-manual label, .rk .reg-manual .label { font-weight: 500; }
.rk .form-error { margin: 12px 4px 0; }
.rk .pk-bar { margin-top: auto; padding-top: 18px; }
#drawer[data-kit="register"] .picker-results .picker-row, #drawer[data-kit="register"] .picker-results b { font-weight: 500; }

/* ----- Tìm đồng đội ----- */

.pt-title { margin: 4px 0 14px; font: 600 28px/1.15 var(--tp-font); letter-spacing: -0.01em; }
.pt-kit { display: flex; flex-direction: column; min-height: calc(100dvh - 32px); }
.pt-kit .pt-me.is-picking { display: block; padding: 0; border: 0; background: none; }
.pt-kit #partner-me-list:not(:empty) { margin-top: 8px; overflow: hidden; border-radius: 18px; background: var(--tp-card); }
.pt-kit .pt-me.k-card { display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0; padding: 8px 8px 8px 12px; border: 0; }
.pt-kit .pt-me .avatar { width: 40px; height: 40px; font-size: 15px; }
.pt-me-text { flex: 1; min-width: 0; }
.pt-me-text b { display: block; font: 500 16px/1.25 var(--tp-font); }
.pt-me-text small { display: block; font: 400 13px/1.3 var(--tp-font); color: var(--tp-muted); }
.pt-kit .pt-me .k-link { padding: 0 8px; font-size: 15px; }
.pt-kit .pt-mine { display: grid; gap: 6px; margin-top: 10px; }
.pt-kit .pt-mine-row { display: grid; gap: 2px; min-height: 56px; padding: 10px 14px; border: 0; border-radius: 18px; background: var(--tp-optic-soft); color: var(--tp-ink); text-align: left; font: 400 13px/1.3 var(--tp-font); cursor: pointer; }
.pt-kit .pt-mine-row b { font-weight: 500; font-size: 15px; }
.pt-seg { margin: 12px 0; }
.pt-kit .pt-list { display: grid; gap: 8px; }
.pt-kit .pt-row { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px 10px 12px; border: 0; border-radius: 22px; background: var(--tp-card); box-shadow: none; }
.pt-kit .pt-row.is-fit { box-shadow: inset 0 0 0 2px var(--optic); }
.pt-kit .pt-row-main { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; min-height: 52px; padding: 0; border: 0; background: none; color: var(--tp-ink); text-align: left; cursor: pointer; }
.pt-kit .pt-row-main .avatar { width: 50px; height: 50px; flex: none; font-size: 18px; }
.pt-kit .pt-who { flex: 1; min-width: 0; }
.pt-kit .pt-who b { display: block; overflow: hidden; font: 500 16px/1.25 var(--tp-font); white-space: nowrap; text-overflow: ellipsis; }
.pt-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pt-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; background: var(--tp-optic-soft); font: 400 13px/1.2 var(--tp-font); color: var(--tp-ink); }
.pt-kit .pt-score { flex: none; font-size: 28px; line-height: 1; color: var(--tp-ink); }
.pt-zalo-circ, .pt-call-circ { display: grid; flex: none; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; }
.pt-zalo-circ img { display: block; width: 44px; height: 44px; }
.pt-call-circ { background: var(--tp-soft); color: var(--navy); }
.pt-call-circ svg { width: 20px; height: 20px; }
.pt-kit .pt-row.is-loading { min-height: 74px; }
.pt-kit .pk-bar { margin-top: auto; }

/* The profile's older sections in the app's dark mode: the board's own colours follow the kit's dark tokens. */
@media (prefers-color-scheme: dark) {
  html.in-app #drawer[data-kit] {
    --ink: var(--tp-ink);
    --muted: var(--tp-muted);
    --line: var(--tp-hair);
    --surface: var(--tp-card);
    --paper: var(--tp-bg);
    --row-hover: var(--tp-soft);
    --down-bg: rgba(191, 58, 48, 0.2);
  }
  html.in-app #drawer[data-kit="profile"] .spread-bar { background: #2a3348; }
  html.in-app #drawer[data-kit="profile"] .spread-bar.is-own { background: var(--optic); }
  html.in-app #drawer[data-kit="profile"] .spread-pin span { background: var(--optic); color: var(--navy-deep); }
  html.in-app #drawer[data-kit="profile"] .spread-pin { background: var(--optic); }
  html.in-app #drawer[data-kit="profile"] .results li { background: var(--tp-soft); }
  html.in-app #drawer[data-kit="profile"] .results li.is-penalty { background: var(--down-bg); }
  html.in-app #drawer[data-kit="profile"] .results li.place-1 { background: rgba(217, 167, 42, 0.18); }
  html.in-app #drawer[data-kit] .rk-results, html.in-app #drawer[data-kit] #partner-me-list:not(:empty) { color: var(--tp-ink); }
  html.in-app #drawer[data-kit="profile"] .casual-chip { background: var(--tp-soft); color: var(--tp-ink); }
}

/* ---------- Thành tích (575A–579): club titles and Baseline podium places (app.js honoursCardHtml) ---------- */

.ox-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ox-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--tp-ico); font: 400 12px/1 var(--tp-font); color: var(--tp-ink2); white-space: nowrap; }
.ox-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1f9d55; }
.ox-chip.is-club { background: #effad2; }
.ox-chip.is-club::before { background: #9ece14; }
#drawer[data-kit="profile"] #pk-honours { margin-top: 10px; }
#drawer[data-kit="profile"] #pk-honours[hidden] { display: none; }
#drawer[data-kit="profile"] .ox-card { margin-top: 0; padding: 0; overflow: hidden; }
.ox-card > .ox-head { padding: 14px 16px 0; }
.ox-head { display: flex; align-items: center; gap: 8px; }
.ox-title { flex: 1; min-width: 0; margin: 0; font: 400 15px/1.3 var(--tp-font); color: var(--tp-muted); text-align: left; }
.ox-chev { display: grid; place-items: center; color: var(--tp-dim); }
.ox-open { display: block; width: 100%; padding: 14px 16px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ox-open:active { background: var(--tp-soft); }
.ox-medals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ox-card > .ox-medals { padding: 0 16px; }
.ox-m { display: grid; justify-items: center; gap: 8px; }
.ox-m small { font: 400 13px/1.2 var(--tp-font); color: var(--tp-muted); min-height: 16px; }

/* A medal: a coloured disc with its count, a navy ribbon above (as on the boards). */
.ox-medal { position: relative; display: grid; place-items: center; width: 62px; height: 62px; margin-top: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe28a, #e8b73a 55%, #c8901c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 3px 8px rgba(200, 144, 28, 0.25); color: #fff; }
.ox-medal b { font-size: 30px; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18); }
.ox-medal.is-silver { background: radial-gradient(circle at 35% 30%, #f1f4f8, #c3cad5 55%, #9aa4b3); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1), 0 3px 8px rgba(120, 132, 150, 0.25); }
.ox-medal.is-bronze { background: radial-gradient(circle at 35% 30%, #f6c49a, #d98a4e 55%, #b0602a); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 3px 8px rgba(176, 96, 42, 0.25); }
.ox-medal.is-zero { background: var(--tp-ico); box-shadow: none; color: var(--tp-dim); }
.ox-medal.is-zero b { text-shadow: none; }
.ox-ribbon { position: absolute; top: -13px; left: 50%; width: 26px; height: 16px; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--navy) 0 38%, var(--optic) 38% 62%, var(--navy) 62%); clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%); }
.ox-medal.is-zero .ox-ribbon { opacity: 0.45; }
.ox-medal.is-small { width: 32px; height: 32px; margin: 0; flex: none; }
.ox-medal.is-small b { font-size: 17px; }
.ox-medal.is-other { background: var(--tp-ico); box-shadow: none; color: var(--tp-muted); }
.ox-medal.is-other svg { width: 17px; height: 17px; }
.ox-medal.is-skeleton { background: var(--tp-soft); box-shadow: none; animation: ox-pulse 1.4s ease-in-out infinite; }
.ox-medals.is-loading small { width: 46px; height: 10px; border-radius: 5px; background: var(--tp-soft); }
@keyframes ox-pulse { 50% { opacity: 0.55; } }
.ox-wait { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; padding: 0 16px 16px; font: 400 14px/1.3 var(--tp-font); color: var(--tp-muted); }
.ox-spin { width: 14px; height: 14px; border: 2px solid var(--tp-line); border-top-color: var(--navy); border-radius: 50%; animation: ox-spin 0.9s linear infinite; }
@keyframes ox-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ox-medal.is-skeleton, .ox-spin { animation: none; } }
.ox-none { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px 16px; font: 400 15px/1.3 var(--tp-font); color: var(--tp-ink2); }
.ox-note { display: flex; align-items: center; gap: 6px; margin: 8px 6px 0; font: 400 12px/1.3 var(--tp-font); color: var(--tp-muted); }
.ox-note .k-ic { flex: none; }

/* The confirmed player's own box (577): dashed, only they see it. */
.ox-add { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 16px; border: 1.5px dashed var(--tp-line); border-radius: 22px;
  background: var(--tp-card); color: var(--tp-ink); font: inherit; text-align: left; cursor: pointer; }
.ox-add:active { background: var(--tp-soft); }
.ox-add-plus { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--optic); color: var(--navy-deep); }
.ox-add-text { display: grid; gap: 6px; }
.ox-add-text b { font: 500 16px/1.2 var(--tp-font); }
.ox-add-line { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 16px 6px; }
.ox-add-line .k-ic { width: 16px; height: 16px; }
.ox-broken { display: flex; align-items: center; gap: 12px; margin: 0 12px 12px; padding: 10px 10px 10px 12px; border-radius: 18px; background: var(--tp-bg); }
.ox-broken-ic { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fdf0d8; color: #b7791f; }
.ox-broken-text { display: grid; flex: 1; gap: 5px; justify-items: start; min-width: 0; }
.ox-broken-text b { font: 500 15px/1.2 var(--tp-font); }
.ox-fix.k-btn { flex: none; width: auto; min-height: 44px; padding: 0 18px; font-size: 15px; }

/* "Thành tích": every title by year (575, the third screen). */
.ox-page-title { margin: 4px 4px 10px; font: 600 28px/1.15 var(--tp-font); letter-spacing: -0.01em; }
.ox-page-title:focus { outline: none; }
.ox-sum { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 4px 6px; font: 400 15px/1 var(--tp-font); color: var(--tp-ink2); }
.ox-sum > span { display: inline-flex; align-items: center; gap: 8px; }
.ox-year { margin: 18px 6px 8px; font: 500 15px/1.2 var(--tp-font); color: var(--tp-muted); }
.ox-list { margin: 0; padding: 2px 0; list-style: none; overflow: hidden; }
.ox-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; color: var(--tp-ink); text-decoration: none; }
.ox-list li + li .ox-row { box-shadow: inset 0 1px 0 var(--tp-hair); }
a.ox-row:active { background: var(--tp-soft); }
.ox-place .ox-medal.is-small { width: 36px; height: 36px; }
.ox-row-text { display: grid; flex: 1; gap: 3px; min-width: 0; }
.ox-row-text b { font: 500 15px/1.3 var(--tp-font); overflow-wrap: anywhere; }
.ox-row-text small { font: 400 13px/1.25 var(--tp-font); color: var(--tp-muted); }
.ox-yours { display: grid; gap: 10px; margin-top: 18px; padding: 14px; }
.ox-yours-who { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 15px/1.3 var(--tp-font); }
.ox-yours-who b { font-weight: 500; }
.ox-yours-who small { color: var(--tp-muted); }
.ox-yours-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ox-yours-acts .k-btn { background: var(--tp-bg); }
.k-btn.ox-danger { color: var(--tp-red); }

/* The sheet: paste → "Đây là bạn?" (577); "Lấy link ở đâu?" (576). */
.ox-sheet-src { margin: 2px 0 10px; }
.ox-field { background: var(--tp-card); box-shadow: inset 0 0 0 1px var(--tp-hair); }
.ox-field .k-ic { width: 20px; height: 20px; }
.ox-where { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; }
.ox-pair { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.ox-pair .avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.ox-pair-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--optic); color: var(--navy-deep); }
.ox-pair-ic .k-ic { width: 17px; height: 17px; }
.ox-initial { background: var(--tp-soft); color: var(--navy); }
.ox-ask { margin: 0 0 10px; font: 600 22px/1.2 var(--tp-font); text-align: center; }
.ox-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; text-align: center; }
.ox-names p { display: grid; gap: 4px; justify-items: center; margin: 0; }
.ox-names b { font: 500 15px/1.25 var(--tp-font); overflow-wrap: anywhere; }
.ox-names small { font: 400 13px/1.2 var(--tp-font); color: var(--tp-muted); }
.ox-facts > div { background: var(--tp-card); }
.ox-facts dd small { font-size: 15px; }
.ox-bar { display: grid; gap: 4px; }
.ox-notme { justify-content: center; }
.ox-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; padding: 0; list-style: none; }
.ox-step { display: grid; justify-items: center; gap: 8px; padding: 12px 6px 14px; border-radius: 18px; background: var(--tp-card); font: 400 13px/1.25 var(--tp-font); text-align: center; }
.ox-step-n { font: 500 15px/1 var(--font-score); color: var(--tp-muted); }
.ox-step-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--tp-optic-soft); color: var(--navy); }
.ox-example { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px; border-radius: 16px; background: var(--tp-card); font: 400 14px/1.3 var(--tp-font); color: var(--tp-muted); overflow-wrap: anywhere; }
.ox-example b { font-weight: 500; color: var(--tp-ink); }
.ox-example .k-ic { width: 18px; height: 18px; flex: none; }
.k-sheet.ox-help { z-index: 41; }

@media (prefers-color-scheme: dark) {
  html.in-app .ox-chip.is-club { background: rgba(200, 242, 62, 0.14); }
  html.in-app .ox-broken-ic { background: rgba(183, 121, 31, 0.2); color: #f2c46b; }
}

/* 584b: the profile as a personal page — Bài viết · Ảnh · Trận under the card (switch socialFeed; social-core.js). */
.pk-tabs { margin: 14px 0 10px; min-height: 44px; }
.pk-tabs button { min-height: 38px; font-size: 15px; }
.pk-pane[hidden] { display: none; }
.pk-post-list { display: grid; gap: 10px; }
.pk-post { display: grid; gap: 8px; padding: 12px 14px; overflow: hidden; border-radius: 22px; background: var(--tp-card); color: var(--tp-ink); text-decoration: none; }
.pk-post-hd { display: flex; align-items: center; gap: 10px; }
.pk-post-hd > span:last-child { display: grid; }
.pk-post-hd b { font: 500 15px/1.2 var(--tp-font); }
.pk-post-hd small { display: flex; align-items: center; gap: 4px; color: var(--tp-muted); font-size: 12px; }
.pk-post-vis { display: inline-flex; }
.pk-post-vis-ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pk-post-av { position: relative; display: grid; flex: none; place-items: center; width: var(--s); height: var(--s); overflow: hidden; border-radius: 50%; background: var(--tp-soft); color: var(--navy); font: 500 15px/1 var(--tp-font); }
.pk-post-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pk-post-text { display: -webkit-box; overflow: hidden; font: 400 15px/1.4 var(--tp-font); white-space: pre-wrap; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.pk-post-img { width: calc(100% + 28px); max-height: 260px; margin: 0 -14px; object-fit: cover; }
.pk-post-ft { display: flex; gap: 12px; color: var(--tp-muted); font-size: 14px; }


/* Pickleball: the tier chip on the profile card, and "Chưa có DUPR" in the place of the rating. */
.pk-tags .is-tier { background: var(--optic); color: var(--navy-deep); font-weight: 600; }
.pk-num.is-none { font: 600 30px/1.1 var(--tp-font); color: rgba(255, 255, 255, 0.72); letter-spacing: 0; }
