/* Stonewater Penitentiary: a stone prison wall with barred cells; each prisoner's face looks out through the bars */
.pz-wall { position: relative; overflow: hidden; color: #eef0f3;
  background:
    linear-gradient(rgba(20,22,27,.35), rgba(20,22,27,.6)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(0,0,0,.35) 30px 32px),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(0,0,0,.28) 62px 64px),
    linear-gradient(#5c6068, #44484f); }
.pz-wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: #2b2f36; box-shadow: 0 -3px 0 #6f747d; }
.pz-wall-in { position: relative; z-index: 2; display: grid; gap: 14px; padding-top: 14px; padding-bottom: 34px; }
.pz-sign { justify-self: center; text-align: center; margin-top: 6px; padding: 12px 26px 14px; border-radius: 6px;
  background: linear-gradient(#3a3f47, #2b2f36); border: 3px solid #8d939c; box-shadow: 0 0 0 3px #1f2227, 0 6px 22px rgba(0,0,0,.4); }
.pz-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #f4c95a; }
.pz-sign h1 { font-size: var(--step-4); font-weight: 850; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.pz-sign p:last-child { margin: var(--sp-1) 0 0; font-weight: 700; font-size: var(--step--1); color: #d5d9df; min-height: 1.55em; }

/* the cells in the header: a dark cell, the face, iron bars over it, a name plate under it */
.pz-cells { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); min-height: 112px; }
.pz-cell { position: relative; width: 92px; height: 112px; border-radius: 4px 4px 0 0;
  background: radial-gradient(ellipse at 50% 40%, #2a2d33 0%, #15171b 75%); border: 4px solid #2b2f36; border-bottom-width: 22px;
  box-shadow: inset 0 0 18px rgba(0,0,0,.8), 0 4px 0 rgba(0,0,0,.25); display: grid; place-items: center; }
.pz-cell-face { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 3px; margin-top: -4px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.5); background: #3a3e45; }
.pz-cell-face.blank { opacity: .35; }
.pz-bars { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 13px, #8b9099 13px 17px, #5a5f68 17px 18px, transparent 18px 22px);
  box-shadow: inset 0 6px 0 #7b8089, inset 0 -6px 0 #7b8089; opacity: .92; }
.pz-tag { position: absolute; left: -4px; right: -4px; bottom: -21px; height: 18px; line-height: 18px; text-align: center; font-size: 11px;
  font-weight: 800; color: #1f2227; background: #c7cbd1; border-radius: 0 0 3px 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.pz-tag.dim { color: #2b2f36; background: #9ea3aa; }
.pz-cell.full { animation: pz-in .4s ease-out; }
@keyframes pz-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.pz-wall .mk-status { text-align: center; margin-top: var(--sp-2); }

.pz-main { padding-top: var(--sp-5); padding-bottom: var(--sp-7); display: grid; gap: var(--sp-5); }
.pz-intro { background: var(--surface-1); border: 1px solid var(--border); border-left: 4px solid #8d939c; border-radius: var(--radius); box-shadow: var(--hi);
  padding: var(--sp-4) var(--sp-5); }
.pz-intro p { margin: 0 0 var(--sp-2); max-width: 70ch; }
.pz-intro p:last-child { margin: 0; }
.pz-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.pz-count { font-size: var(--step--1); font-weight: 750; color: var(--fg-muted); }
.pz-empty { grid-column: 1 / -1; margin: 0; padding: var(--sp-5) var(--sp-4); background: var(--surface-1); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); color: var(--fg-muted); font-weight: 650; text-align: center; width: 100%; display: grid; place-items: center; }
/* reserve room for what the script fills in, so the page doesn't jump when the feed arrives */
#prisoners { min-height: 120px; }
#guards { min-height: 56px; }
.pz-join { margin: var(--sp-3) 0 0; color: var(--fg-muted); max-width: 70ch; min-height: 3.1em; }
@media (max-width: 520px) { .pz-join { min-height: 6.2em; } }
.pz-join code, .pz-intro code { background: var(--surface-3); color: var(--fg); padding: 1px 6px; border-radius: var(--radius-xs); font-family: var(--font-mono); font-size: .92em; }
.pz-join b { color: var(--reward); }

.pz-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pz-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--sp-4); align-items: center; padding: var(--sp-4);
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--hi); }
.pz-face { width: 64px; height: 64px; image-rendering: pixelated; border-radius: var(--radius-xs); background: var(--surface-3); }
.pz-face.blank, .pz-gface.blank { opacity: .4; }
.pz-body { display: grid; gap: var(--sp-2); min-width: 0; }
.pz-top { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.pz-top b { font-size: var(--step-1); overflow-wrap: anywhere; }
.pz-pill { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: var(--radius-pill);
  border: 1px solid currentColor; color: var(--fg-muted); }
.pz-pill.on { color: var(--accent); }
.pz-left { font-size: var(--step--1); color: var(--fg-muted); }
.pz-left .num { font-size: var(--step-2); font-weight: 850; font-variant-numeric: tabular-nums; color: var(--fg); }
.pz-bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.pz-bar > span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width .6s var(--ease); }

.pz-guards { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pz-guard { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--hi); }
.pz-guard.on { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.pz-guard > span { display: grid; line-height: 1.25; }
.pz-gface { width: 36px; height: 36px; image-rendering: pixelated; border-radius: var(--radius-xs); background: var(--surface-3); }

@media (max-width: 520px) {
  .pz-cells { min-height: 96px; }
  .pz-cell { width: 76px; height: 96px; }
  .pz-cell-face { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .pz-cell.full { animation: none; } .pz-bar > span { transition: none; } }
