/* Portal layout only; colors, type and components come from the panel's app.css. */
.pt-top { max-width: 640px; margin: 0 auto; padding: var(--s-5) var(--gutter) 0; }
.pt-main { max-width: 640px; }
.pt-card h1 { font-size: 1.1rem; line-height: 1.5; }
.pt-code { font-size: clamp(1.8rem, 9vw, 2.6rem); letter-spacing: .3em; text-align: center;
  padding: var(--s-4) 0 var(--s-4) .3em; margin: 0; color: var(--text); word-break: break-all; }
.pt-cmd { font-size: 1rem; white-space: nowrap; }
.pt-small { font-size: .8rem; }
.pt-who { display: flex; align-items: center; gap: var(--s-4); }
.pt-who > * + * { margin-top: 0; }
.pt-head { image-rendering: pixelated; border-radius: var(--radius); flex: none; }
.pt-name { font-size: 1.4rem; margin: 0; overflow-wrap: anywhere; }
.pt-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.pt-actions form { margin: 0; }

/* ---- read pages (PR 2) ---- */
.pt-top { max-width: 1040px; display: grid; gap: var(--s-3); }
.pt-main { max-width: 1040px; }
.pt-nav { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: thin; padding-bottom: var(--s-1);
  -webkit-overflow-scrolling: touch; }
.pt-nav a { flex: none; padding: var(--s-1) var(--s-3); background: var(--slot); box-shadow: var(--block);
  color: var(--text); text-decoration: none; font-size: .82rem; white-space: nowrap; }
@media (min-width: 720px) { .pt-nav { flex-wrap: wrap; overflow-x: visible; } }
.pt-nav a[aria-current="page"] { background: var(--slot-hi); outline: 2px solid var(--text); outline-offset: -2px; }
.pt-stale { max-width: 1040px; margin: var(--s-3) auto 0; padding: var(--s-2) var(--s-3); background: var(--warn-bg);
  color: #fff; }
.pt-foot { max-width: 1040px; margin: 0 auto; padding: var(--s-4) var(--gutter) var(--s-6); display: grid; gap: var(--s-2); }
.pt-foot p { margin: 0; }
.pt-grid { display: grid; gap: var(--section-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.pt-grid > .card { margin: 0; }
.pt-card h2 { font-size: 1rem; }
.pt-card h3 { font-size: .85rem; color: var(--muted); margin: 0 0 var(--s-2); }
.pt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.pt-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); min-width: 0; }
.pt-num { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); }
.pt-tops { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.pt-text { white-space: pre-line; overflow-wrap: anywhere; }
.pt-empty { margin: 0; }
.pt-online { margin: 0 0 0 auto; color: var(--muted); }
.pt-online.is-up span { color: var(--leaf); }
.pt-who { flex-wrap: wrap; }

/* heads: mc-heads for Java; a lettered tile for Bedrock (mc-heads can't resolve Floodgate ids) */
.pt-head--24 { width: 24px; height: 24px; } .pt-head--32 { width: 32px; height: 32px; }
.pt-head--64 { width: 64px; height: 64px; } .pt-head--96 { width: 96px; height: 96px; }
.pt-head--tile { display: inline-grid; place-items: center; background: var(--grass-dark); color: #fff;
  font-weight: 800; box-shadow: var(--block); }
.pt-head--tile.pt-head--24 { font-size: .8rem; } .pt-head--tile.pt-head--32 { font-size: 1rem; }
.pt-head--tile.pt-head--64 { font-size: 1.8rem; } .pt-head--tile.pt-head--96 { font-size: 2.6rem; }
.pt-player { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); min-width: 0; }
.pt-player-name { overflow-wrap: anywhere; min-width: 0; }

/* progress: an SVG, because the CSP allows no inline style for a width */
.pt-track { display: block; width: 100%; height: 14px; border-radius: 4px; overflow: hidden; }
.pt-track.small { height: 10px; }
.pt-track-bg { fill: var(--leaf-track); }
.pt-fill { fill: var(--leaf); }
.pt-band-nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); color: var(--muted); }
.pt-band-nums b { color: var(--text); }
.pt-hero { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--text); }

/* directory */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pt-search { display: flex; gap: var(--s-2); margin: var(--s-3) 0; }
.pt-search input { flex: 1; min-width: 0; }
.pt-pgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.pt-pcard > a, .pt-pcard.is-private { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: var(--s-3); align-items: center; padding: var(--s-2) var(--s-3); background: var(--surface-2);
  box-shadow: var(--block); color: var(--text); text-decoration: none; height: 100%; }
.pt-pcard .pt-head { grid-row: 1 / 3; }
.pt-pcard-name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.pt-pcard.is-private { opacity: .8; }
.pt-dot { color: var(--leaf); font-size: .7rem; }
.pt-pager { display: flex; gap: var(--s-4); align-items: center; justify-content: center; margin-top: var(--s-4); }

/* tabs: plain links, the current one framed */
.pt-tabs { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-3) 0 0; }
.pt-tabs a { padding: var(--s-1) var(--s-3); background: var(--slot); color: var(--text); text-decoration: none;
  font-size: .85rem; box-shadow: var(--block); }
.pt-tabs.small a { font-size: .78rem; }
.pt-tabs a[aria-current="page"] { background: var(--slot-hi); outline: 2px solid var(--text); outline-offset: -2px; }

/* ranked bar list: one hue, thin marks, the value in text tokens beside each bar */
.pt-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.pt-bar-row { display: grid; grid-template-columns: 2.6rem minmax(7rem, 13rem) 1fr 5.5rem; align-items: center;
  gap: var(--s-3); padding: var(--s-1) var(--s-2); }
.pt-bar-row:hover { background: var(--surface-2); }
.pt-bar-row.is-me { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); }
.pt-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.pt-bar-name { min-width: 0; }
.pt-bar { display: block; }
.pt-bar-row .pt-num { text-align: right; }
.pt-you { margin-top: var(--s-3); }
@media (max-width: 560px) {
  .pt-bar-row { grid-template-columns: 2.2rem 1fr 4.5rem; }
  .pt-bar-row .pt-bar { grid-column: 2 / 4; grid-row: 2; }
}

/* stat tiles and profile tables */
.pt-tiles { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); margin: 0 0 var(--s-4); }
.pt-tiles div { background: var(--surface-2); padding: var(--s-2) var(--s-3); box-shadow: var(--block); }
.pt-tiles dt { color: var(--muted); font-size: .78rem; }
.pt-tiles dd { margin: 0; font-size: 1.3rem; font-weight: 800; }
.pt-stat-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.pt-stat-tile { display: grid; gap: var(--s-1); background: var(--surface-2); padding: var(--s-3); box-shadow: var(--block); }
.pt-stat-label { color: var(--muted); font-size: .8rem; }
.pt-stat-hero { font-size: 1.8rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pt-stat-groups { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pt-table { width: 100%; border-collapse: collapse; }
.pt-table th { text-align: left; font-weight: 400; color: var(--muted); padding: 2px var(--s-2) 2px 0; }
.pt-table td { text-align: right; font-variant-numeric: tabular-nums; padding: 2px 0; }
.pt-table tr + tr { border-top: 1px solid var(--line); }
.pt-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pt-chips li { background: var(--surface-2); padding: var(--s-1) var(--s-3); box-shadow: var(--block); }
.pt-chips a { color: var(--text); text-decoration: none; }
.pt-title { color: var(--gold); margin: 0; }
.pt-who-text { min-width: 0; flex: 1; }

/* sections */
.pt-poll-row { grid-template-columns: minmax(7rem, 14rem) 1fr 6rem; }
@media (max-width: 560px) { .pt-poll-row { grid-template-columns: 1fr 5rem; } .pt-poll-row .pt-bar { grid-column: 1 / 3; grid-row: 2; } }
.pt-ach, .pt-obj, .pt-events, .pt-builds, .pt-shop, .pt-chron { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.pt-ach-row { display: grid; grid-template-columns: 1fr minmax(6rem, 10rem); gap: var(--s-3); align-items: center;
  padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.pt-ach-row:first-child { border-top: 0; }
.pt-ach-text p, .pt-obj-row p, .pt-event p, .pt-build p, .pt-shop-item p { margin: 0; }
.pt-ach-text { min-width: 0; overflow-wrap: anywhere; }
.pt-ach-pct { display: grid; gap: var(--s-1); justify-items: end; }
.pt-tier { font-size: .72rem; color: var(--muted); }
.pt-obj-row, .pt-event, .pt-build { display: grid; gap: var(--s-1); padding: var(--s-2) var(--s-3); background: var(--surface-2);
  box-shadow: var(--block); min-width: 0; overflow-wrap: anywhere; }
.pt-results { margin-top: var(--s-2); }
.pt-build-title { display: flex; gap: var(--s-2); align-items: baseline; }
.pt-shop { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.pt-shop-item { display: grid; gap: var(--s-1); padding: var(--s-2) var(--s-3); background: var(--surface-2); box-shadow: var(--block); }
.pt-shop-item.is-locked { opacity: .75; }
.pt-shop-item .pt-num { margin-left: 0; font-weight: 700; }
.pt-chron li { display: grid; grid-template-columns: 7rem 1fr; gap: var(--s-3); }
@media (max-width: 560px) { .pt-chron li { grid-template-columns: 1fr; gap: 0; } }
/* app.css indents .card > ul/ol for the panel; portal lists all sit flush. */
.card > ol:not(.flush)[class^="pt-"],
.card > ul:not(.chips):not(.timeline):not(.flush)[class^="pt-"] { padding-left: 0; }
.card > ol[class^="pt-"] > li + li,
.card > ul:not(.chips):not(.timeline)[class^="pt-"] > li + li { margin-top: 0; }
/* Forms that post an action */
.pt-form { display: grid; gap: var(--s-2); margin: 0; }
.pt-form textarea { font: inherit; color: var(--text); background: var(--field); border: 2px solid var(--line); border-radius: var(--radius);
  padding: var(--s-2) var(--s-3); width: 100%; box-sizing: border-box; resize: vertical; }
.pt-form textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.pt-form .btn { justify-self: start; }
.pt-buy { display: flex; gap: var(--s-2); align-items: center; margin: var(--s-1) 0 0; }
.pt-buy input[type="number"] { width: 5.5em; min-height: 44px; box-sizing: border-box; }
.pt-build form { margin: var(--s-1) 0 0; }
.pt-switches { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.pt-switch { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between;
  padding: var(--s-2) var(--s-3); background: var(--surface-2); box-shadow: var(--block); }
.pt-switch p, .pt-switch form { margin: 0; }
.pt-act h1 { margin-top: 0; }
