/* Clash Esports member portal: shell, side menu, member header, cards, loading and error states.
   Dark boxes with a 4px team-colour edge (the .rc-* idea from rooms.css); colour stays in small marks. */
.portal { --team: var(--muted); --slow: 0.6s; }
.portal .pn-toggle {
  display: none; background: none; border: 0; color: var(--ink); cursor: pointer;
  min-width: 44px; min-height: 44px; font-size: 1.5rem; line-height: 1; padding: 0;
}
.portal .bar { gap: 12px; }
.portal .bar-actions { margin-inline-start: auto; }

.pn-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - var(--bar-full)); }
.pn-menu {
  position: sticky; top: var(--bar-full); align-self: start;
  height: calc(100vh - var(--bar-full)); display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px var(--margin) calc(24px + var(--safe-bottom));
  background: var(--surface); border-inline-end: 1px solid var(--surface-2);
}
.pn-menu ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.pn-menu a, .pn-menu .is-soon {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 8px 12px; border-inline-start: 4px solid transparent;
  text-decoration: none; font-weight: 600; font-size: var(--step-small); color: var(--ink);
  transition: background var(--slow) ease, border-color var(--slow) ease, color var(--slow) ease;
}
.pn-menu a.is-active { background: var(--bg); border-inline-start-color: var(--red); }
.pn-menu .pn-menu-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px;
  background: none; border: 0; border-inline-start: 4px solid transparent; color: var(--ink); text-align: start; cursor: pointer;
  font: 600 var(--step-small) var(--font-text); transition: background var(--slow) ease, border-color var(--slow) ease, color var(--slow) ease, opacity var(--slow) ease;
}
.pn-menu .pn-menu-btn:disabled { color: var(--muted); opacity: 0.6; cursor: default; }
.pn-menu .pn-menu-btn:not(:disabled) { border-inline-start-color: var(--yellow); }
.pn-menu .pn-menu-btn em { font-style: normal; font-size: 0.75rem; font-weight: 800; color: var(--yellow); border: 1px dashed var(--yellow); padding: 0 8px; border-radius: 99px; }
.pn-menu .pn-menu-btn em[hidden] { display: none; }
.pn-menu .is-soon { color: var(--muted); opacity: 0.6; cursor: default; }
.pn-menu .is-soon em { font-style: normal; font-size: 0.75rem; border: 1px solid var(--surface-2); padding: 0 8px; border-radius: 99px; }
.pn-logout {
  min-height: 44px; background: none; color: var(--muted); border: 1px solid var(--surface-2);
  font: 600 var(--step-small) var(--font-text); cursor: pointer; transition: color var(--slow) ease, border-color var(--slow) ease;
}
@media (hover: hover) and (pointer: fine) {
  .pn-menu a:not(.is-active):hover { background: var(--bg); }
  .pn-logout:hover { color: var(--ink); border-color: var(--muted); }
}

.pn-main { grid-template-columns: minmax(0, 1fr); padding: clamp(20px, 3vw, 40px) var(--margin) clamp(48px, 6vw, 96px); display: grid; gap: clamp(20px, 3vw, 32px); align-content: start; min-width: 0; }
.pn-main > section:empty { display: none; }

/* member header */
.pn-member { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.pn-avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--blue); font: 700 1.375rem var(--font-display); letter-spacing: 0.04em; text-transform: uppercase;
}
.pn-who { min-width: 0; }
.pn-name { font: 700 var(--step-lead) var(--font-display); line-height: 1.1; overflow-wrap: anywhere; }
.pn-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--step-small); }
.pn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; transition: background var(--slow) ease; }
.pn-status.is-ready .pn-dot { background: #3ecf8e; }
.pn-status.is-playing .pn-dot { background: var(--yellow); }

/* three cards */
.pn-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.pn-card {
  position: relative; background: var(--bg); border: 1px solid var(--surface-2); border-inline-start: 4px solid var(--team);
  padding: 20px; min-height: 116px; display: grid; align-content: space-between; gap: 12px;
  transition: border-color var(--slow) ease, background var(--slow) ease;
}
.pn-card.t-red { --team: var(--red); }
.pn-card.t-blue { --team: var(--blue); }
.pn-card.t-yellow { --team: var(--yellow); }
.pn-card dt { color: var(--muted); font-size: var(--step-small); font-weight: 600; }
.pn-card dd { margin: 0; font: 700 clamp(2rem, 1.4rem + 2vw, 3rem) var(--font-display); line-height: 1; font-variant-numeric: tabular-nums; }
.pn-card dd small { font-size: 0.45em; color: var(--muted); margin-inline-start: 6px; letter-spacing: 0.04em; }

/* skeleton: quiet, no spinner, no pulsing flash */
.pn-skel { background: var(--surface); border-radius: 2px; }
.pn-skel.line { height: 1em; width: 8em; max-width: 100%; }
.pn-skel.big { height: 2.4rem; width: 60%; }
.pn-skel.round { width: 56px; height: 56px; border-radius: 50%; }
.pn-card.is-skel { border-inline-start-color: var(--surface-2); }

/* error */
.pn-error {
  grid-column: 1 / -1; background: var(--bg); border: 1px solid var(--surface-2); border-inline-start: 4px solid var(--red);
  padding: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
}
.pn-error p { flex: 1 1 240px; }
.pn-retry {
  min-height: 44px; padding: 0 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--muted);
  font: 600 var(--step-small) var(--font-text); cursor: pointer; transition: background var(--slow) ease, border-color var(--slow) ease;
}
@media (hover: hover) and (pointer: fine) { .pn-retry:hover { background: var(--surface-2); border-color: var(--ink); } }
.pn-fade { animation: pn-in var(--slow) ease both; }
@keyframes pn-in { from { opacity: 0; } to { opacity: 1; } }

/* tablet / phone */
@media (max-width: 1080px) { .pn-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .portal .pn-toggle { display: inline-block; }
  .portal .bar { padding-inline: 4px var(--margin); }
  .portal .brand span { display: none; }
  .portal .bar-actions .link-quiet { display: none; }
  .pn-shell { grid-template-columns: minmax(0, 1fr); }
  .pn-menu {
    position: fixed; z-index: 35; top: var(--bar-full); inset-inline: 0; height: auto; max-height: calc(100vh - var(--bar-full)); overflow-y: auto;
    gap: 16px; padding: 8px var(--margin) calc(16px + var(--safe-bottom)); border-inline-end: 0; border-bottom: 1px solid var(--surface-2);
    visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity var(--slow) ease, transform var(--slow) var(--ease-out), visibility 0s linear var(--slow);
  }
  .pn-menu.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
  .pn-main { padding-top: 20px; }
  .pn-cards { grid-template-columns: minmax(0, 1fr); }
  .pn-card { min-height: 96px; }
}

/* ---------- T4/T5/T6: place chips, zone box, floor map, open-a-PC sheet, session ---------- */
.portal { --pick: #6a6a73; }
.t-red { --team: var(--red); --pick: var(--red); }
.t-blue { --team: var(--blue); --pick: var(--blue); }
.t-yellow { --team: var(--yellow); --pick: #b8920a; }
.t-both { --team: var(--blue); --pick: var(--blue); }
.t-none { --team: #a9a9b0; --pick: #6a6a73; }

.pn-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pn-chips::-webkit-scrollbar { display: none; }
.pn-chip {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--surface-2);
  font: 600 0.875rem var(--font-text); white-space: nowrap; cursor: pointer;
  transition: background-color var(--slow) ease, color var(--slow) ease, border-color var(--slow) ease;
}
.pn-chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* the "full" dot takes no room until a place is full (no empty gap after the name) */
.pn-chipdot { flex: none; width: 0; height: 6px; border-radius: 50%; background: var(--yellow); margin-inline-start: 0; opacity: 0;
  transition: opacity var(--slow) ease, width var(--slow) ease, margin var(--slow) ease; }
.pn-chip.is-full .pn-chipdot { width: 6px; margin-inline-start: 8px; opacity: 1; }
.pn-chip-skel { flex: none; height: 44px; border-radius: 999px; }
@media (hover: hover) and (pointer: fine) { .pn-chip:not(.is-on):hover { border-color: var(--muted); } }

/* zone box: dark, 4px team edge; Team = red over blue */
.pn-zone, .pn-sheet-box, .pn-done-box, .pn-sess {
  position: relative; background: var(--surface); padding: 16px 16px 16px 14px; border-inline-start: 4px solid var(--team, var(--surface-2));
}
.pn-zone.t-both, .pn-sheet-box.t-both, .pn-done-box.t-both, .pn-sess.t-both { border-inline-start-color: transparent; }
.t-both.pn-zone::before, .t-both.pn-sheet-box::before, .t-both.pn-done-box::before, .t-both.pn-sess::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: -4px; width: 4px;
  background: linear-gradient(var(--red) 50%, var(--blue) 50%);
}
.pn-zone-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pn-zone-name { font: 700 1.5rem var(--font-display); line-height: 1.1; text-transform: uppercase; }
.pn-zone-price { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.pn-zone-grid, .pn-done-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pn-zone-grid dt, .pn-done-grid dt { font-size: 0.75rem; color: var(--muted); }
.pn-zone-grid dd, .pn-done-grid dd { margin: 0; font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pn-ztime-row { display: block; font-size: 1rem; }
.pn-ztime-row small { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-inline-end: 6px; }
.pn-zone-full { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--surface-2); display: grid; gap: 10px; font-size: 0.875rem; line-height: 1.5; }
.pn-zone-full[hidden], .pn-notice[hidden], .pn-warn[hidden] { display: none; }
.pn-wait-slot { display: grid; gap: 8px; }
.pn-wait-slot:empty { display: none; }

/* floor map */
.pn-map { background: var(--surface); padding: 12px 6px 14px; display: grid; gap: 12px; }
.pn-map-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pn-map-title { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pn-upd { font-size: 0.6875rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn-notice { font-size: 0.875rem; color: var(--yellow); }
.pn-hall { display: grid; justify-content: center; }
.pn-grid { display: grid; gap: 4px; justify-content: center; }
.pn-grid.is-room { gap: 8px; }
.pn-seatwrap { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pn-seat {
  width: 100%; aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 7px; box-sizing: border-box; cursor: pointer;
  font: 700 0.75rem var(--font-text); font-variant-numeric: tabular-nums;
  background: #1e1e23; border: 1px solid #6a6a73; color: var(--ink);
  transition: background-color var(--slow) ease, border-color var(--slow) ease, color var(--slow) ease;
}
.is-room .pn-seat { font-size: 0.875rem; }
.pn-seat.is-busy { background: #0d0d10; border-color: #1f1f24; color: #4a4a52; cursor: not-allowed; }
.pn-seat.is-reserved { border-style: dashed; border-color: var(--yellow); color: var(--yellow); cursor: not-allowed; }
/* out of order: always red and outlined, so it never looks like a red-room pick (filled) or in use (dark) */
.pn-seat.is-out { background: rgba(255, 77, 79, 0.1); border-color: #ff4d4f; color: #ff6b6d; text-decoration: line-through; text-decoration-color: #ff4d4f; cursor: not-allowed; }
/* locked by staff (nothing broken): calm lilac with a small padlock, no strike-through; the staff panel uses the same lilac */
.pn-seat.is-locked { background: rgba(185, 162, 255, 0.08); border-color: #b9a2ff; color: #cdbdff; cursor: not-allowed; }
.pn-seat.is-picked { background: var(--pick); border-color: var(--pick); color: #fff; }
/* optional layout fields: seat caption + orientation mark, and the grid rectangles (screen, door, bar, wall, note) */
.pn-seatwrap.has-rot { position: relative; }
.pn-cap { font-size: 0.625rem; color: var(--muted); line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-rot { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1; pointer-events: none; transform: rotate(var(--rot, 0deg)); }
.pn-rot::before { content: ''; position: absolute; top: 3px; left: 50%; width: 40%; height: 2px; margin-left: -20%; border-radius: 2px; background: currentColor; color: var(--muted); opacity: 0.8; }
.pn-lbl { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; box-sizing: border-box; border-radius: 4px; text-align: center; overflow: hidden; }
.pn-lbl span { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 2px 4px; }
.pn-lbl.is-screen, .pn-lbl.is-door { background: none; }
.pn-lbl.is-screen { border-bottom: 2px solid var(--surface-2); }
.pn-lbl.is-door { border-top: 2px solid var(--surface-2); }
.pn-lbl.is-bar { background: var(--surface-2); }
.pn-lbl.is-bar span { color: var(--ink); }
.pn-lbl.is-wall { background: var(--surface-2); border-radius: 1px; }
.pn-lbl.is-note { border: 1px dashed var(--surface-2); }
.pn-lbl.is-note span { text-transform: none; letter-spacing: 0; }
.pn-left { font-size: 0.6875rem; color: var(--muted); min-height: 14px; white-space: nowrap; }
.pn-area { align-self: end; font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--surface-2); padding-bottom: 4px; }
.pn-room { border: 1px solid var(--surface-2); padding: 18px 10px; display: grid; justify-items: center; gap: 12px; }
.pn-roomlbl { font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.pn-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 0.75rem; color: var(--muted); padding-top: 4px; }
.pn-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pn-lg { width: 14px; height: 14px; border-radius: 4px; box-sizing: border-box; display: inline-grid; place-items: center; font-style: normal; font-size: 0.625rem; background: #1e1e23; border: 1px solid #6a6a73; }
.pn-lg.is-busy { background: #0d0d10; border-color: #1f1f24; }
.pn-lg.is-reserved { border: 1px dashed var(--yellow); }
.pn-lg.is-out { background: rgba(255, 77, 79, 0.1); border-color: #ff4d4f; color: #ff4d4f; font-weight: 700; }
.pn-lg.is-locked { background: rgba(185, 162, 255, 0.08); border-color: #b9a2ff; }
.pn-lg.is-locked::after { content: ''; width: 8px; height: 8px; background: #b9a2ff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2.5 0h5V7a2.5 2.5 0 0 0-5 0z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2.5 0h5V7a2.5 2.5 0 0 0-5 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.pn-lg.is-pick { background: var(--pick); border-color: var(--pick); }

/* buttons */
.pn-cta, .pn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 16px; border-radius: 12px;
  font: 800 1.0625rem var(--font-text); cursor: pointer; text-decoration: none;
  transition: background-color var(--slow) ease, color var(--slow) ease, border-color var(--slow) ease, opacity var(--slow) ease;
}
.pn-cta { background: var(--ink); color: var(--bg); border: 0; }
.pn-cta:disabled { opacity: 0.55; cursor: progress; }
.pn-cta.is-soon { background: var(--surface-2); color: var(--muted); cursor: default; }
.pn-cta.is-soon em { font-style: normal; font-size: 0.75rem; font-weight: 600; border: 1px solid #3a3a42; padding: 0 8px; border-radius: 99px; }
.pn-ghost { background: var(--surface); color: var(--ink); border: 1px solid #3a3a42; font-weight: 600; font-size: 1rem; }
.pn-ghost:disabled { opacity: 0.55; }
.pn-warn { font-size: 0.875rem; color: var(--yellow); line-height: 1.5; }
.pn-kicker { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* open-a-PC sheet: bottom sheet on phones, side panel on desktop */
.pn-sheet {
  position: fixed; z-index: 40; inset-inline: 0; bottom: 0; background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 10px var(--margin) calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.5);
  display: grid; gap: 12px; max-width: 560px; margin-inline: auto;
  visibility: hidden; opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity var(--slow) ease, transform var(--slow) var(--ease-out), visibility 0s linear var(--slow);
}
.pn-sheet.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
.pn-grab { justify-self: center; width: 40px; height: 4px; border-radius: 2px; background: #3a3a42; }
.pn-sheet-box { background: #1a1a1f; }
.pn-sheet-top { display: flex; justify-content: space-between; align-items: center; }
.pn-sheet-pc { font: 700 1.625rem var(--font-display); text-transform: uppercase; }
.pn-change { background: none; border: 0; color: var(--muted); font-size: 0.875rem; min-height: 44px; min-width: 44px; cursor: pointer; }
.pn-sheet-sub { font-size: 0.875rem; color: var(--muted); }

/* "PC N is on" and the running session */
.pn-done {
  position: fixed; z-index: 50; inset: 0; background: var(--bg); overflow-y: auto; display: grid; justify-items: center; align-items: start;
  padding: calc(56px + env(safe-area-inset-top, 0px)) var(--margin) calc(32px + env(safe-area-inset-bottom, 0px));
  visibility: hidden; opacity: 0; transition: opacity var(--slow) ease, visibility 0s linear var(--slow);
}
.pn-done.is-open { visibility: visible; opacity: 1; transition-delay: 0s; }
.pn-done-in { width: 100%; max-width: 480px; display: grid; gap: 20px; }
.pn-done-title { font: 700 clamp(2.5rem, 12vw, 3.5rem) var(--font-display); line-height: 0.95; text-transform: uppercase; }
.pn-done-box { padding: 16px 14px; line-height: 1.5; }
.pn-done-btns { display: grid; gap: 12px; margin-top: 12px; }
.pn-lock { overflow: hidden; }
.pn-sess { display: grid; gap: 12px; }
.pn-sess-name { font: 700 1.75rem var(--font-display); text-transform: uppercase; line-height: 1.1; }
.pn-sess-name small { font: 600 0.875rem var(--font-text); color: var(--muted); text-transform: none; margin-inline-start: 8px; }
.pn-sess .pn-done-grid { margin-top: 0; }

@media (hover: hover) and (pointer: fine) {
  .pn-cta:not(:disabled):not(.is-soon):hover { background: #fff; }
  .pn-ghost:not(:disabled):hover { border-color: var(--muted); }
  .pn-seat.is-free:hover { border-color: var(--ink); }
}

/* desktop: zone box beside the map; the sheets sit in the left column under the zone box (no overlay on the map) */
@media (min-width: 1081px) {
  .pn-main { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; }
  .pn-main > * { grid-column: 1 / -1; }
  .pn-main > #zones { grid-column: 1; }
  .pn-main > #floor { grid-column: 2; grid-row: span 2; }
  .pn-main > #dock { grid-column: 1; }
  .pn-map { padding: 20px 24px 24px; }
  .pn-seat { font-size: 0.875rem; }
  .pn-sheet {
    position: static; display: none; width: auto; max-width: none; margin: 0; border-radius: 0; padding: 16px 0 0;
    background: none; box-shadow: none; transform: none; opacity: 0; visibility: visible; pointer-events: none;
    /* closing fades out as softly as opening fades in: display is held for the fade (browsers without allow-discrete just close at once) */
    transition: display var(--slow) allow-discrete;
    animation: pn-out var(--slow) ease both;
  }
  .pn-sheet.is-open { display: grid; opacity: 1; pointer-events: auto; animation: pn-in var(--slow) ease both; }
  @keyframes pn-out { from { opacity: 1; } to { opacity: 0; } }
  /* the sheets share one place under the zone box, so one closing while the next opens is a cross-fade, not a jump */
  #dock { display: grid; }
  #dock > .pn-sheet { grid-area: 1 / 1; }
  .pn-grab { display: none; }
}
@media (max-width: 1080px) { #dock { display: contents; } }
/* the floor keeps its real left/right in Arabic; counts stay in reading order */
.pn-grid { direction: ltr; }
.pn-zone-grid dd#pn-zfree { unicode-bidi: isolate; direction: ltr; text-align: start; }
[dir="rtl"] .pn-zone-grid dd#pn-zfree { text-align: right; direction: rtl; } /* Arabic "11 من 36" reads right to left */

/* ---------- T7: waiting list ---------- */
#waitpill { display: grid; gap: 8px; }
.pn-wpill {
  width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px;
  background: var(--surface); border: 1px dashed var(--yellow); border-radius: 10px; color: var(--ink); cursor: pointer;
  font: 400 0.875rem var(--font-text); text-align: start; transition: background-color var(--slow) ease;
}
.pn-wpill b { color: var(--yellow); font-weight: 700; white-space: nowrap; }
.pn-wnote { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; background: var(--surface); border-inline-start: 4px solid var(--yellow); font-size: 0.875rem; line-height: 1.5; }
.pn-wsheet .pn-sheet-box { display: grid; gap: 10px; }
.pn-wline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pn-wbig { font: 700 3.5rem var(--font-display); line-height: 0.9; direction: ltr; unicode-bidi: isolate; }
.pn-wsub { font-size: 0.9375rem; color: var(--muted); line-height: 1.5; }
.pn-wtext { font-size: 0.875rem; line-height: 1.5; }
.pn-bars { display: flex; gap: 6px; }
.pn-bar { width: 28px; height: 6px; border-radius: 3px; background: #2a2a31; transition: background-color var(--slow) ease; }
.pn-bar.is-past { background: #6a6a73; }
.pn-bar.is-you { background: var(--yellow); }
.pn-wbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pn-wbtns .pn-cta, .pn-wbtns .pn-ghost { min-height: 48px; font-size: 0.9375rem; }
.pn-kicker-y { color: var(--yellow); }
.pn-clock { display: block; font: 700 4rem var(--font-display); line-height: 1; margin-top: 6px; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; text-align: start; }
[dir="rtl"] .pn-clock { text-align: right; }
.pn-offer .pn-done-box { display: grid; gap: 4px; background: var(--surface); }
#places { scroll-margin-top: calc(var(--bar-full) + 12px); }
.pn-offer { z-index: 49; }
.pn-sheet > .pn-wtext { margin: 0; padding-inline: 4px; }
/* several rooms (2026-11-20): one row per room, the place big on the start side, Leave as a quiet text button on the end */
.pn-wtime { font-size: 0.8125rem; }
.pn-wnb { white-space: nowrap; } /* "Joined at 7:40 PM ·" and "waiting 1 h 12 min" each stay in one piece */
.pn-wrows { list-style: none; margin: 0; padding: 0; display: grid; }
.pn-wrow { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 12px 0; }
.pn-wrow + .pn-wrow { border-top: 1px solid #26262c; }
.pn-wrow-pos { font: 700 2.25rem var(--font-display); line-height: 1; direction: ltr; unicode-bidi: isolate; text-align: start; font-variant-numeric: tabular-nums; }
[dir="rtl"] .pn-wrow-pos { text-align: right; }
.pn-wrow-main { display: grid; gap: 2px; min-width: 0; }
.pn-wrow-name { font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--ink); }
.pn-wrow-eta { font-size: 0.875rem; line-height: 1.45; color: var(--ink); opacity: 0.85; }
.pn-wrow-time { font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.pn-wrow-leave { min-height: 40px; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #3a3a42; transition: color var(--slow) ease; }
.pn-wrow-leave:disabled { opacity: 0.5; cursor: default; }
.pn-wmode-all { flex-basis: 100%; font-size: 0.8125rem; color: var(--muted); }
.pn-wbtns .pn-wadd-btn { grid-column: 1 / -1; }
/* "Also wait in another room": the rooms they are not in */
.pn-wadd { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid #26262c; }
.pn-wadd-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pn-wadd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "state act" "msg msg"; align-items: center; column-gap: 12px; padding: 10px 0; }
.pn-wadd-row + .pn-wadd-row { border-top: 1px solid #222228; }
.pn-wadd-name { grid-area: name; font-weight: 700; font-size: 0.9375rem; line-height: 1.4; }
.pn-wadd-state { grid-area: state; display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.pn-wadd-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); flex: none; }
.pn-wadd-row.is-free .pn-wadd-state::before { background: var(--ink); }
.pn-wadd-row.is-off .pn-wadd-state::before { background: #3a3a42; }
.pn-wadd-row.is-off .pn-wadd-name { color: var(--muted); }
.pn-wadd-row > .pn-ghost, .pn-wadd-row > .pn-change { grid-area: act; }
.pn-wadd-row > .pn-warn { grid-area: msg; margin-top: 6px; }
.pn-wadd-join { min-height: 40px; min-width: 88px; padding: 0 16px; font-size: 0.875rem; }
.pn-wadd-show { min-height: 40px; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #3a3a42; }
/* the zone box of a full room while they wait: their place here, or the join button with a line that the other places stay */
.pn-wslot-in { margin: 0; color: var(--ink); }
.pn-wslot-see { justify-self: start; min-height: 40px; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #3a3a42; }
.pn-wslot-also { margin: 0; font-size: 0.8125rem; }
.pn-offer-others { font-size: 0.875rem; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .pn-wrow-leave { transition: none; } }

/* demo build: small tag next to the logo (remove when the real API is wired) */
.demo-tag { margin-inline-start: 10px; padding: 2px 8px; border: 1px dashed var(--yellow); border-radius: 6px; color: var(--yellow); font: 700 12px/1.4 var(--font-text); letter-spacing: .08em; }
/* the DEMO tag and demo notes: only in mock mode (js/clash-api.js sets html.api-mock); staging relabels the tag (.is-env) */
html:not(.api-mock) .demo-tag:not(.is-env), html:not(.api-mock) .demo-note { display: none; }

/* ---------- S8: History view ---------- */
.pn-main.is-history > section:not(#history), .pn-main.is-history > #dock { display: none; }
.pn-main.is-games > section:not(#games), .pn-main.is-games > #dock { display: none; }
.pn-hist[hidden] { display: none; }
.pn-hist { display: grid; gap: 16px; align-content: start; max-width: 880px; }
.pn-htitle { font: 700 var(--step-lead) var(--font-display); line-height: 1.1; text-transform: uppercase; }
.pn-hlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pn-hrow {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 16px 12px 14px;
  background: var(--surface); border-inline-start: 4px solid var(--team, var(--surface-2)); position: relative;
  animation: pn-in var(--slow) ease both;
}
.pn-hrow.t-both { --team: var(--blue); }
.pn-hrow.is-skel { border-inline-start-color: var(--surface-2); animation: none; }
.pn-hmain { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
.pn-htext { font-weight: 600; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.pn-htext.is-clamp { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-hsub { font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
.pn-hlive { color: var(--yellow); }
.pn-hflag { font-size: 0.75rem; font-weight: 700; color: var(--ink); border: 1px solid #3a3a42; padding: 0 8px; border-radius: 99px; white-space: nowrap; }
.pn-hside { flex: none; text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: baseline; gap: 6px; }
.pn-hside b { font: 700 1.25rem var(--font-display); letter-spacing: 0.02em; }
.pn-hside small { font-size: 0.75rem; color: var(--muted); }
.pn-hrow.is-neg .pn-hside b { color: var(--muted); }
.pn-hempty { padding: 28px 16px; background: var(--surface); border-inline-start: 4px solid var(--surface-2); color: var(--muted); }
.pn-hmorebox { display: grid; gap: 8px; justify-items: center; margin-top: 8px; }
.pn-hmore { width: auto; min-width: 200px; min-height: 48px; font-size: 0.9375rem; }
.pn-htabs { flex-wrap: wrap; overflow: visible; }
.pn-menu .pn-menu-btn.is-active { background: var(--bg); border-inline-start-color: var(--red); }
@media (min-width: 1081px) { .pn-main.is-history > #history { grid-column: 1 / -1; } }
@media (min-width: 1081px) { .pn-main.is-games > #games { grid-column: 1 / -1; } }

/* ---------- S8b: Buy time sheet ---------- */
.pn-shop { align-content: start; }
.pn-shop .pn-sheet-box { display: grid; gap: 4px; }
.pn-shop .pn-sheet-top { align-items: flex-start; }
.pn-shop .pn-sheet-top > div { display: grid; gap: 2px; }
.pn-shop .pn-done-grid dd small { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.pn-shop-zones { padding-bottom: 0; }
.pn-shop-list { display: grid; gap: 8px; }
.pn-prod, .pn-shop-sum {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; padding: 10px 14px;
  background: #1a1a1f; color: var(--ink); border: 0; border-inline-start: 4px solid var(--team, var(--surface-2)); text-align: start;
}
.pn-prod { cursor: pointer; font: 400 1rem var(--font-text); transition: background-color var(--slow) ease; }
.pn-prod-main { display: grid; gap: 2px; min-width: 0; }
.pn-prod-main b { font-weight: 600; overflow-wrap: anywhere; }
.pn-prod-main small { font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
.pn-prod-price { display: flex; align-items: baseline; gap: 6px; flex: none; font-variant-numeric: tabular-nums; }
.pn-prod-price b { font: 700 1.25rem var(--font-display); letter-spacing: 0.02em; }
.pn-prod-price small { font-size: 0.75rem; color: var(--muted); }
.pn-shop-sum.is-ok { border-inline-start-color: var(--yellow); }
.pn-shop-hint { color: var(--ink); font-weight: 600; }
.pn-shop-empty { padding: 8px 4px; color: var(--muted); }
.pn-prod-skel { height: 64px; border-radius: 0; }
.pn-shop .pn-change:disabled { opacity: 0.5; }
.pn-chip:disabled { opacity: 0.55; cursor: default; }
.pn-zone-buy { margin-top: 12px; }
.pn-zone-buy .pn-ghost { min-height: 44px; font-size: 0.9375rem; }
.pn-sheet .pn-buy.pn-ghost { margin-top: 0; }
@media (hover: hover) and (pointer: fine) { .pn-prod:hover { background: var(--surface-2); } }

/* card payments: method buttons, top-up amounts, return sheet */
.pn-method:disabled { opacity: 0.55; cursor: default; }
.pn-method:not(:disabled) { border-inline-start-color: var(--yellow); }
.pn-sheet > .pn-ghost { width: 100%; }
.pn-top-amts { padding-bottom: 0; }
.pn-top-custom { display: grid; gap: 6px; }
.pn-top-field {
  display: flex; align-items: center; gap: 10px; background: #1a1a1f; border-inline-start: 4px solid var(--surface-2); padding: 0 14px; min-height: 52px;
  transition: border-color var(--slow) ease;
}
.pn-top-field:focus-within { border-inline-start-color: var(--yellow); }
.pn-top-field input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 700 1.25rem var(--font-display); letter-spacing: 0.02em;
  min-height: 48px; text-align: start; -moz-appearance: textfield; appearance: textfield;
}
.pn-top-field input::-webkit-outer-spin-button, .pn-top-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pn-top-field input::placeholder { color: var(--muted); font: 400 1rem var(--font-text); letter-spacing: 0; }
.pn-top-field small { font-size: 0.75rem; color: var(--muted); }
.pn-wbtns .pn-cta:only-child, .pn-wbtns .pn-ghost:only-child { grid-column: 1 / -1; }
.pn-pay .pn-sheet-box { display: grid; gap: 10px; }
.pn-pay .pn-sheet-top { align-items: flex-start; }
.pn-pay .pn-sheet-top > div { display: grid; gap: 2px; }
.pn-pay-sub { margin: 0; color: var(--muted); }
.pn-pay-ref { display: grid; gap: 2px; margin: 0; }
.pn-pay-ref b { font: 700 1.25rem var(--font-display); letter-spacing: 0.08em; }
.pn-pay-bar { display: block; height: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.pn-pay-bar::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 40%; background: var(--yellow); opacity: 0.7; animation: pn-pay-slide 2.4s ease-in-out infinite alternate; }
/* moved with transform (no layout on every frame); 150% of its own 40% = the far end of the bar */
@keyframes pn-pay-slide { from { transform: none; } to { transform: translateX(150%); } }
[dir="rtl"] .pn-pay-bar::after { animation-name: pn-pay-slide-rtl; }
@keyframes pn-pay-slide-rtl { from { transform: none; } to { transform: translateX(-150%); } }

/* Web Push: notify button in the waiting sheet, and the in-page toast (calm: fades in/out over 0.6 s) */
.pn-push-btn { min-height: 48px; width: 100%; font-size: 0.9375rem; }
.pn-push-on { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pn-push-state { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.pn-push-note { margin: 0; }
.pn-toast {
  position: fixed; z-index: 60; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100vw - 32px);
  top: calc(var(--bar-full, 64px) + 12px); padding: 12px 18px; background: var(--surface-2); color: var(--ink);
  border: 0; border-inline-start: 4px solid var(--yellow); font: 600 0.9375rem/1.5 var(--font-text); text-align: start; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0s linear 0.6s;
}
.pn-toast.is-on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }

/* payment note under the pay buttons: prices in EGP, accepted cards, link to the refund policy */
.pn-paynote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; font-size: 0.8125rem; color: var(--muted); }
.pn-paynote .pn-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border: 1px solid #3a3a42; border-radius: 4px; background: var(--surface); color: var(--ink); font: 700 0.6875rem/1 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.pn-paynote .pn-badge-mc { gap: 0; padding: 0 8px 0 4px; }
.pn-paynote .pn-badge-mc i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.pn-paynote .pn-badge-mc i + i { margin-inline-start: -4px; background: var(--yellow); opacity: 0.9; }
.pn-paynote .pn-badge-mc span { margin-inline-start: 6px; }
.pn-paynote a { color: var(--ink); text-underline-offset: 0.25em; white-space: nowrap; }

/* Arabic durations ("2 س 30 د", PortalFmt in js/portal-map.js): each unit sits just after its number, right to left,
   also in the hold countdown (which is left to right only for the English "04:59") */
.pn-dur small { margin-inline-start: 3px; }
.pn-clock[dir="rtl"] { direction: rtl; }
/* seat captions live in the left-to-right seat grid: in Arabic "باقي" goes on its own line above the time, both right to left */
[dir="rtl"] .pn-left { direction: rtl; white-space: pre-line; text-align: center; line-height: 1.25; }
.pn-clock .pn-dur small { font-size: 0.4em; color: var(--muted); margin-inline-start: 6px; }

/* ---------- signup + login extras (portal/signup.html, login.html): .sg-* ---------- */
.sg-box { max-width: 560px; }
.sg-social { margin: 24px auto 0; display: grid; gap: 12px; width: 100%; max-width: 400px; }
.sg-social-slot { height: 40px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.sg-social-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-sizing: border-box; width: 100%; height: 40px; padding: 0 56px; cursor: pointer;
  background: #131314; color: #e3e3e3; border: 1px solid #8e918f; border-radius: 4px;
  font: 500 14px/1 Roboto, var(--font-text); letter-spacing: 0.25px; white-space: nowrap;
  transition: border-color 0.6s var(--ease-soft), background-color 0.6s var(--ease-soft), opacity 0.6s var(--ease-soft);
}
.sg-social-btn.is-apple { background: #000; color: #fff; }
.sg-social-btn svg { flex: none; }
@media (hover: hover) and (pointer: fine) { .sg-social-btn:not(:disabled):hover { border-color: var(--blue-strong); } }
.sg-social-btn:focus-visible { outline: 3px solid var(--blue-strong); outline-offset: 2px; }
.sg-social-btn.is-soon, .sg-social-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.sg-badge {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: 0.3px; padding: 4px 8px;
  border: 1px solid currentColor; border-radius: 99px; opacity: 0.85;
}
.sg-badge:empty { display: none; }
.sg-google-note { margin-top: 20px; padding: 12px 14px; background: var(--bg); border-inline-start: 4px solid var(--blue); font-size: var(--step-small); line-height: 1.6; }
.sg-google-note[hidden], .sg-social[hidden], .sg-or[hidden], .sg-ids[hidden], .sg-skip-note[hidden], .sg-done[hidden], .sg-turnstile[hidden], .sg-id-prev[hidden], .sg-id-btns[hidden], .sg-form[hidden] { display: none; }
.sg-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 4px; color: var(--muted); font-size: var(--step-small); }
.sg-or::before, .sg-or::after { content: ""; flex: 1; height: 1px; background: var(--surface-2); }

.sg-form { margin-top: 20px; display: grid; gap: 28px; }
.sg-step { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 18px; }
.sg-step legend { display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 18px; font-weight: 800; font-size: var(--step-body); }
.sg-num {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); font: 700 0.9375rem var(--font-display);
}
.sg-two { display: grid; gap: 18px; }
@media (min-width: 520px) { .sg-two { grid-template-columns: 1fr 1fr; } }
.sg-hint { color: var(--muted); font-size: var(--step-small); line-height: 1.6; }
.sg-opt { color: var(--muted); font-weight: 400; }
.sg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sg-privacy { text-align: center; }
.sg-field input[type="date"], #sg-birth { min-height: 52px; }
#sg-birth { text-align: start; }

/* ID: choice + two photo cards */
.sg-choice { display: grid; gap: 4px; }
.sg-radio { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: var(--step-small); font-weight: 600; }
.sg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sg-dot { flex: none; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 50%; background: var(--bg); display: grid; place-items: center; transition: border-color 0.6s var(--ease-soft); }
.sg-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform 0.6s var(--ease-soft); }
.sg-radio input:checked + .sg-dot { border-color: var(--blue-strong); }
.sg-radio input:checked + .sg-dot::after { transform: scale(1); }
.sg-radio input:focus-visible + .sg-dot { outline: 3px solid var(--blue-strong); outline-offset: 3px; }
.sg-ids { display: grid; gap: 16px; }
@media (min-width: 520px) { .sg-ids { grid-template-columns: 1fr 1fr; } .sg-ids > .pl-err { grid-column: 1 / -1; } }
.sg-id { display: grid; gap: 10px; align-content: start; padding: 14px; background: var(--bg); border-inline-start: 4px solid var(--surface-2); }
.sg-id-title { font-weight: 700; font-size: var(--step-small); }
.sg-id-btns { display: grid; gap: 8px; }
.sg-pick {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px; cursor: pointer;
  border: 2px solid var(--surface-2); background: var(--surface); font-size: var(--step-small); font-weight: 600; text-align: center;
  transition: border-color 0.6s var(--ease-soft);
}
@media (hover: hover) and (pointer: fine) { .sg-pick:hover { border-color: var(--blue-strong); } }
.sg-pick:focus-within { outline: 3px solid var(--blue-strong); outline-offset: 2px; }
.sg-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.sg-id-prev { display: grid; gap: 8px; justify-items: start; }
.sg-id-prev img { width: 100%; max-height: 180px; object-fit: contain; background: var(--surface); }
.sg-link { min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--blue-strong); font: 600 var(--step-small) var(--font-text); cursor: pointer; text-decoration: underline; }
.sg-skip-note { padding: 12px 14px; background: var(--bg); border-inline-start: 4px solid var(--yellow); font-size: var(--step-small); line-height: 1.6; }
.sg-turnstile { min-height: 65px; }
.pl-msg a, .sg-google-note a { color: var(--blue-strong); }
.sg-links { justify-content: center; }
.sg-done { text-align: center; display: grid; gap: 16px; justify-items: center; padding: 12px 0; }
.sg-done-text { font-size: var(--step-body); line-height: 1.7; max-width: 38ch; }
.sg-done-actions { display: grid; gap: 8px; justify-items: center; margin-top: 8px; }
.sg-done h2:focus { outline: none; }

/* ---------- busy overlay: sign-up and Google steps ---------- */
.bz { position: absolute; inset: 0; z-index: 20; display: block; padding: 0; text-align: center;
  background: rgba(8, 8, 10, 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; outline: 0;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.bz.is-on { opacity: 1; visibility: visible; transition: opacity 0.4s ease, visibility 0s; }
.bz-in { position: sticky; top: calc(50vh - 90px); display: grid; justify-items: center; gap: 14px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto;
  padding: 22px 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--surface-2); }
.bz-ring { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 2px solid var(--surface-2); background: var(--bg); }
.bz-ring img { display: block; width: 100%; height: 100%; object-fit: cover; animation: bz-spin 1.8s linear infinite; }
.bz-line { margin: 0; min-height: 1.5em; font-weight: 600; font-size: var(--step-small); color: var(--ink); }
.bz-line.is-2 { color: var(--muted); font-weight: 400; }
@keyframes bz-spin { to { transform: rotate(360deg); } }
@keyframes bz-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ---------- forced "choose a new password" screen (js/portal-pass.js) ---------- */
.pw-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; overflow-y: auto; padding: 24px 16px;
  background: var(--bg); opacity: 0; transition: opacity 0.6s var(--ease-soft); }
.pw-wrap.is-on { opacity: 1; }
.pw-wrap[hidden] { display: none; }
.pw-box { margin: auto; }
.pw-form { margin-top: 24px; }
.pw-box .pl-links { margin-top: 12px; }
.fg-form { margin-top: 24px; }
.fg-ident { color: var(--muted); }
.pl-links[hidden] { display: none; }

/* ---------- switch PC: the open-a-PC sheet asks to move the running session (js/portal-map.js) ---------- */
.pn-swq { margin: 0; padding: 10px 14px; background: #1a1a1f; border-inline-start: 4px solid var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.pn-sheet > .pn-swbtns { margin: 0; }
/* share a free PC with a friend: a thin "or" line, then one quiet card with a blue share mark (no flash) */
.pn-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pn-or::before, .pn-or::after { content: ""; flex: 1; height: 1px; background: var(--surface-2); }
.pn-share { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px;
  border: 1px solid var(--surface-2); border-inline-start: 4px solid var(--blue, #1f6bff); border-radius: 12px; background: var(--surface); color: var(--ink);
  text-align: start; cursor: pointer; font-family: var(--font-text); transition: background var(--slow) ease, border-color var(--slow) ease; }
.pn-share:hover, .pn-share[aria-expanded="true"] { background: #16161b; border-color: #34343e; border-inline-start-color: var(--blue, #1f6bff); }
.pn-share:focus-visible { outline: 2px solid var(--blue, #1f6bff); outline-offset: 2px; }
.pn-share-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #141c2e; color: #4a88ff; }
.pn-share-txt { min-width: 0; display: grid; gap: 2px; }
.pn-share-txt b { font-weight: 700; font-size: 0.9375rem; }
.pn-share-txt small { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.pn-sharebox { display: grid; gap: 10px; }
.pn-sharemsg { margin: 0; padding: 12px 14px; background: #111115; border: 1px solid var(--surface-2); border-radius: 10px; color: var(--ink); font-size: 0.875rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; user-select: text; }
.pn-shareto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pn-shareopt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 1px solid var(--surface-2); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 600 0.875rem var(--font-text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color var(--slow) ease; }
.pn-shareopt:hover { border-color: #34343e; }
.pn-shareopt.is-wa { border-inline-start: 3px solid #4cc283; }

/* ---------- time by section: the Total card opens a dialog (js/portal-time.js) ---------- */
.pn-card-btn { width: 100%; margin: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--slow) ease, background var(--slow) ease; }
.pn-card-btn .pn-crow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.pn-card-btn .pn-cl { color: var(--muted); font-size: var(--step-small); font-weight: 600; }
.pn-card-btn .pn-cv { display: block; font: 700 clamp(2rem, 1.4rem + 2vw, 3rem) var(--font-display); line-height: 1; font-variant-numeric: tabular-nums; }
.pn-card-btn .pn-cv small { font-size: 0.45em; color: var(--muted); margin-inline-start: 6px; letter-spacing: 0.04em; }
.pn-cmore { display: inline-flex; align-items: center; gap: 6px; color: var(--yellow); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.pn-cmore i { width: 7px; height: 7px; border-block-start: 2px solid currentColor; border-inline-end: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--slow) var(--ease-out); }
[dir="rtl"] .pn-cmore i { transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) {
  .pn-card-btn:hover { background: #0e0e11; border-color: #2c2c33; }
  .pn-card-btn:hover .pn-cmore i { transform: translateX(3px) rotate(45deg); }
  [dir="rtl"] .pn-card-btn:hover .pn-cmore i { transform: translateX(-3px) rotate(-45deg); }
}
.pn-card-btn:focus-visible { outline: 3px solid var(--blue-strong); outline-offset: 3px; }

html.tm-lock { overflow: hidden; }
.tm-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px; }
.tm-wrap[hidden] { display: none; }
.tm-back { position: absolute; inset: 0; background: rgba(6, 6, 8, 0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.6s var(--ease-soft); }
.tm-box { position: relative; width: min(880px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 24px 22px; background: #0f0f12; border: 1px solid var(--surface-2); border-radius: 18px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(14px) scale(0.985); transition: opacity 0.6s var(--ease-soft), transform 0.6s var(--ease-out); outline: 0; }
.tm-box::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 3px; background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%); }
.tm-wrap.is-on .tm-back, .tm-wrap.is-on .tm-box { opacity: 1; }
.tm-wrap.is-on .tm-box { transform: none; }
.tm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tm-kicker { margin: 0 0 4px; color: var(--yellow); font: 700 0.875rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; }
.tm-title { margin: 0; font: 700 clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem) var(--font-display); line-height: 1.05; text-transform: uppercase; }
.tm-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--surface-2);
  color: var(--ink); font-size: 1.625rem; line-height: 1; cursor: pointer; transition: background var(--slow) ease, border-color var(--slow) ease; }
@media (hover: hover) and (pointer: fine) { .tm-x:hover { background: var(--surface-2); border-color: var(--muted); } }

.tm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 12px; }
.tm-sec { --c: var(--muted); position: relative; display: grid; gap: 6px; align-content: start; padding: 16px 16px 14px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 15%, #141418) 0%, #141418 62%); border: 1px solid color-mix(in srgb, var(--c) 34%, #1e1e23);
  transition: background var(--slow) ease, border-color var(--slow) ease; }
.tm-sec::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 3px; background: var(--c); }
.tm-free { --c: var(--yellow); }
.tm-normal { --c: var(--blue); }
.tm-vip { --c: var(--red); }
.tm-team { --c: var(--blue); }
.tm-team::before { background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }
.tm-cave { --c: #ff8a3d; }
.tm-elite { --c: #a970ff; }
.tm-stream { --c: #ff4fa3; }
.tm-duo { --c: #22c7d6; }
.tm-other { --c: #8a8a93; }
.tm-sec-top { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tm-sec-name { margin: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; font: 700 1.25rem var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.tm-sec-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.tm-sec-share { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.tm-sec-val { margin: 2px 0 0; font: 700 clamp(2.125rem, 1.8rem + 0.9vw, 2.5rem) var(--font-display); line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.tm-sec-val .pn-dur small, .tm-total-v .pn-dur small { font-size: 0.45em; color: var(--muted); }
.tm-sec-long { margin: 0; color: var(--muted); font-size: 0.875rem; }
.tm-bar { display: block; height: 4px; margin: 6px 0 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.tm-bar span { display: block; height: 100%; border-radius: inherit; background: var(--c); transition: width 0.6s var(--ease-out); }
.tm-sec-zones, .tm-sec-exp { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.tm-sec-zones span { color: var(--ink); opacity: 0.8; }
.tm-sec-exp { color: color-mix(in srgb, var(--c) 55%, var(--ink)); }
.tm-sec.is-zero { background: #131317; border-color: var(--surface-2); }
.tm-sec.is-zero .tm-sec-val { color: var(--muted); }

.tm-total { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 16px 18px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--surface-2); border-inline-start: 4px solid var(--yellow); }
.tm-total-l { flex: 1 1 auto; font: 700 1.25rem var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.tm-total-v { font: 700 clamp(2.25rem, 1.9rem + 1vw, 2.75rem) var(--font-display); line-height: 1; font-variant-numeric: tabular-nums; }
.tm-total-long { color: var(--muted); font-size: 0.875rem; }
.tm-empty { margin: 12px 0 0; color: var(--ink); font-size: 0.9375rem; }
.tm-foot { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.tm-note { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
.tm-buy { min-height: 44px; padding: 0 20px; border-radius: 10px; background: transparent; color: var(--yellow); border: 1px solid var(--yellow);
  font: 600 var(--step-small) var(--font-text); cursor: pointer; transition: background var(--slow) ease, color var(--slow) ease; }
@media (hover: hover) and (pointer: fine) { .tm-buy:hover { background: var(--yellow); color: #0b0b0d; } }

/* phone: a sheet from the bottom, one row per section (name and zones on one side, the time on the other) */
@media (max-width: 600px) {
  .tm-wrap { place-items: end stretch; padding: 0; }
  .tm-box { width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: 18px 18px 0 0; padding: 22px 16px calc(18px + var(--safe-bottom)); transform: translateY(28px); }
  .tm-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tm-sec { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 14px 12px; }
  .tm-sec-top { grid-column: 1; grid-row: 1; }
  .tm-sec-val { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; font-size: 2.125rem; text-align: end; }
  .tm-sec-long { grid-column: 1; grid-row: 2; }
  .tm-bar, .tm-sec-zones, .tm-sec-exp { grid-column: 1 / -1; }
  .tm-total-v { font-size: 2.25rem; }
}

/* PC lock (js/portal-map.js lockInner): a PC opened from the portal stays locked until the member sits down */
.pn-lockslot:empty { display: none; }
.pn-lockbox {
  display: grid; grid-template-columns: 40px 1fr; align-items: center; column-gap: 12px; row-gap: 14px; padding: 14px;
  border: 1px solid var(--surface-2); border-inline-start: 4px solid var(--lk, var(--red)); border-radius: 12px; background: var(--bg);
  transition: border-color var(--slow) ease;
}
.pn-lockbox.is-open { --lk: #3fbf7f; padding-block: 10px; padding-inline-end: 10px; grid-template-columns: 40px 1fr auto; }
.pn-lockbox.is-failed { --lk: var(--yellow); grid-template-columns: 40px 1fr; }
.pn-lock-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--lk, var(--red)); }
.pn-lock-txt { min-width: 0; }
.pn-lock-title { margin: 0; font: 700 0.9375rem/1.3 var(--font-text); color: var(--ink); }
.pn-lock-line { margin: 2px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.pn-unlock, .pn-lockagain { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-family: var(--font-text);
  transition: background-color var(--slow) ease, color var(--slow) ease, opacity var(--slow) ease; }
.pn-unlock { grid-column: 1 / -1; min-height: 50px; border: 0; border-radius: 12px; background: var(--red, #e5232f); color: #fff; font-weight: 800; font-size: 1rem; }
.pn-lockagain { min-height: 44px; padding: 0 14px; border: 1px solid var(--surface-2); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.pn-lockbox.is-failed .pn-lockagain { grid-column: 1 / -1; }
.pn-unlock:disabled, .pn-lockagain:disabled { opacity: 0.55; cursor: progress; }
.pn-lockagain:focus-visible, .pn-unlock:focus-visible { outline: 2px solid var(--blue-strong, #4a88ff); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .pn-unlock:not(:disabled):hover { background: var(--red-strong, #ff3946); }
  .pn-lockagain:not(:disabled):hover { background: var(--surface-2); }
}
@media (max-width: 360px) { .pn-lockbox.is-open { grid-template-columns: 40px 1fr; } .pn-lockbox.is-open .pn-lockagain { grid-column: 1 / -1; } }

/* every PC is a desk (floor sheet): a small screen bar on the far edge and a round chair. Seat rot: 0 chair below,
   180 chair above, 90 chair on the left (screen right), 270 chair on the right (screen left). Captions stay under the desk. */
.pn-grid { gap: 5px 4px; }
.pn-grid.is-room { gap: 10px 8px; }
.pn-seatwrap { gap: 3px; }
.pn-rot { display: none; }
.pn-seatwrap > .pn-seat { order: 1; }
.pn-seatwrap > .pn-cap, .pn-seatwrap > .pn-left { order: 3; }
.pn-seat { position: relative; aspect-ratio: 1.3; border-radius: 6px; padding-top: 4px; }
.pn-seat::before {
  content: ''; position: absolute; top: 3px; left: 20%; right: 20%; height: 3px; border-radius: 2px;
  background: #3d8bff; opacity: 0.85; transition: opacity var(--slow) ease, background-color var(--slow) ease;
}
.is-room .pn-seat::before { top: 4px; height: 4px; }
.pn-seat.is-busy::before { opacity: 0.25; }
.pn-seat.is-reserved::before { background: var(--yellow); opacity: 0.6; }
.pn-seat.is-out::before { background: #ff4d4f; }
.pn-seat.is-locked::before { background: #b9a2ff; opacity: 0.6; }
.pn-seat.is-picked::before { background: #fff; }
.pn-seatwrap::after {
  content: ''; order: 2; flex: none; width: 36%; max-width: 18px; aspect-ratio: 1; border-radius: 50%; box-sizing: border-box;
  background: #1a1a1f; border: 2px solid #3a3a42;
}
.pn-seatwrap:has(.pn-rot[style*="rot:180deg"])::after { order: 0; }
/* a locked PC: its chair becomes a small lilac padlock (under the number, never over it) */
.pn-seatwrap:has(> .pn-seat.is-locked)::after { border: 0; border-radius: 0; background: #b9a2ff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2.5 0h5V7a2.5 2.5 0 0 0-5 0z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2.5 0h5V7a2.5 2.5 0 0 0-5 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.pn-seatwrap:has(.pn-rot[style*="rot:180deg"]) .pn-seat { padding: 0 0 4px; }
.pn-seatwrap:has(.pn-rot[style*="rot:180deg"]) .pn-seat::before { top: auto; bottom: 3px; }
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"]), .pn-seatwrap:has(.pn-rot[style*="rot:270deg"]) { align-self: center; }
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"]) .pn-seat, .pn-seatwrap:has(.pn-rot[style*="rot:270deg"]) .pn-seat { width: 74%; aspect-ratio: 0.9; }
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"])::after, .pn-seatwrap:has(.pn-rot[style*="rot:270deg"])::after {
  position: absolute; width: 11px; top: 50%; transform: translateY(-50%);
}
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"])::after { right: calc(100% + 2px); }
.pn-seatwrap:has(.pn-rot[style*="rot:270deg"])::after { left: calc(100% + 2px); }
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"]) .pn-seat { padding: 0 5px 0 0; }
.pn-seatwrap:has(.pn-rot[style*="rot:270deg"]) .pn-seat { padding: 0 0 0 5px; }
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"]) .pn-seat::before, .pn-seatwrap:has(.pn-rot[style*="rot:270deg"]) .pn-seat::before {
  top: 22%; bottom: 22%; width: 3px; height: auto;
}
.pn-seatwrap:has(.pn-rot[style*="rot:90deg"]) .pn-seat::before { left: auto; right: 3px; }
.pn-seatwrap:has(.pn-rot[style*="rot:270deg"]) .pn-seat::before { right: auto; left: 3px; }
/* walls: a thin bar, also in a row that holds desks; doors: the word over a dashed line */
.pn-lbl.is-wall { align-self: center; height: 8px; background: #2c2c33; border-radius: 3px; }
.pn-hall .pn-lbl.is-door { border-top: 0; border-bottom: 2px dashed #3a3a42; align-self: end; }
.pn-hall .pn-lbl.is-door span { font-size: 0.625rem; }
/* the parts of a hall (Normal / Normal +21): a faint outline around their PCs, the name in the row above */
.pn-part { margin: -4px; border: 1px solid #26262d; border-radius: 10px; background: rgba(255, 255, 255, 0.015); pointer-events: none; }
.pn-area { color: var(--ink); font-weight: 700; border-bottom: 0; padding-bottom: 6px; }

/* ---------- Request a game view (js/portal-games.js): same boxes as History, colour only in small marks ---------- */
.pn-games { max-width: 720px; }
.pn-gintro { color: var(--muted); line-height: 1.6; }
.pn-gform { display: grid; gap: 12px; }
.pn-gfield { display: grid; gap: 6px; }
.pn-gfield > span { font-weight: 600; font-size: 0.875rem; }
.pn-gfield input, .pn-gfield textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; background: #1a1a1f; color: var(--ink); border: 0; border-inline-start: 4px solid var(--surface-2); border-radius: 0;
  font: 400 1rem var(--font-text); line-height: 1.5; text-align: start; outline: 0; resize: vertical; -webkit-appearance: none; appearance: none;
  transition: border-color var(--slow) ease;
}
.pn-gfield input:focus, .pn-gfield textarea:focus { border-inline-start-color: var(--yellow); }
.pn-gfield input:focus-visible, .pn-gfield textarea:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; }
.pn-gfield input::placeholder, .pn-gfield textarea::placeholder { color: var(--muted); }
.pn-gform [hidden] { display: none; }
.pn-gok { padding: 8px 14px; background: var(--surface); border-inline-start: 4px solid #3fbf7f; font-size: 0.875rem; line-height: 1.5; }
.pn-gsend { margin-top: 4px; }
.pn-glists { display: grid; gap: 12px; align-content: start; }
.pn-gh { font: 700 1.125rem var(--font-display); line-height: 1.2; text-transform: uppercase; margin-top: 8px; }
.pn-glist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pn-grow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 10px 10px 14px;
  background: var(--surface); border-inline-start: 4px solid var(--surface-2); animation: pn-in var(--slow) ease both;
}
[dir="rtl"] .pn-grow { padding: 10px 14px 10px 10px; }
.pn-grow.is-mine { border-inline-start-color: var(--ink); }
.pn-grow.is-skel { animation: none; }
.pn-gmain { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
.pn-gname { font-weight: 600; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; text-align: start; }
.pn-gsub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
.pn-gtag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink); border: 1px solid #3a3a42; padding: 0 8px; border-radius: 99px; white-space: nowrap; }
.pn-gtag i { width: 6px; height: 6px; border-radius: 50%; background: var(--team, var(--muted)); }
.pn-gtag.t-yellow { --team: var(--yellow); }
.pn-gtag.t-green { --team: #3fbf7f; }
.pn-gtag.t-muted { --team: var(--muted); color: var(--muted); }
.pn-gside { flex: none; }
.pn-gvote { width: auto; min-width: 56px; min-height: 44px; padding: 0 16px; font-size: 1rem; font-weight: 700; }
.pn-gvoted { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; gap: 6px; font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.pn-gsoon { display: grid; gap: 8px; justify-items: start; padding: 20px 16px; background: var(--surface); border-inline-start: 4px solid var(--surface-2); }
.pn-gsoon em { font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--muted); border: 1px solid #3a3a42; padding: 0 8px; border-radius: 99px; }
.pn-gsoon p { color: var(--muted); line-height: 1.5; }

/* ---------- Requests view: tabs and the Help request / Complaint parts (js/portal-games.js, js/portal-tickets.js) ---------- */
.pn-rpanel { display: grid; gap: 16px; align-content: start; }
.pn-rpanel[hidden] { display: none; }
.pn-rtabs { flex-wrap: wrap; }
.pn-tkcats { flex-wrap: wrap; overflow: visible; }
.pn-tkpc input { max-width: 140px; }
.pn-tkcount { color: var(--muted); font-size: 0.75rem; text-align: end; }
.pn-tknote { border-inline-start-color: var(--muted); color: var(--ink); }
.pn-tkurgent { font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }
.pn-tkurgent a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pn-tk { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 4px; align-items: start; padding: 12px 14px; }
.pn-tkhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.pn-tktext { font-size: 0.9375rem; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; text-align: start; }
.pn-tkreply { display: grid; gap: 4px; margin-top: 8px; padding: 10px 12px; background: #1a1a1f; border-inline-start: 4px solid #3fbf7f; }

/* forgot password: code and new-password steps */
.fg-step[hidden] { display: none; }
.fg-step h2:focus { outline: none; }
.fg-code { text-align: center; letter-spacing: 0.4em; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.fg-step .fg-form { margin-top: 16px; }

/* forgot password: confirm on WhatsApp */
.fg-wa-go { margin-top: 20px; }
.fg-wa-go .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; width: 100%; }
.fg-wa-manual { margin-top: 24px; }
.fg-wa-facts { display: grid; gap: 12px; margin: 12px 0 0; }
.fg-wa-facts dt { color: var(--muted); font-size: 0.8125rem; margin-bottom: 4px; }
.fg-wa-facts dd { margin: 0; padding: 10px 12px; background: var(--surface-2); border-inline-start: 3px solid var(--muted); font-size: var(--step-small); line-height: 1.6; overflow-wrap: anywhere; text-align: start; }
.fg-wa-facts dd[dir="ltr"] { text-align: left; font-variant-numeric: tabular-nums; }
.fg-wa-copyrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.fg-copy { min-height: 44px; padding: 0 18px; background: none; border: 1px solid var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: border-color 0.6s ease, background-color 0.6s ease; }
.fg-copy:hover, .fg-copy:focus-visible { border-color: var(--muted); }
.fg-copied { color: var(--muted); font-size: 0.8125rem; }
.fg-wait { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--muted); font-size: var(--step-small); line-height: 1.6; }
.fg-wait[hidden] { display: none; }
.fg-wait .bz-ring { width: 28px; height: 28px; flex: none; border-width: 1px; }
.fg-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fg-step .pl-msg { margin-top: 16px; }
[dir="rtl"] .fg-wa-facts dd[dir="ltr"], html[dir="rtl"] .fg-wa-facts dd[dir="ltr"] { border-inline-start: 0; border-right: 3px solid var(--muted); }

/* waiting list: "when it's your turn" - ask me first (default) | open a PC for me automatically (js/portal-wait.js).
   Two quiet radio cards; the chosen one gets a white edge and a filled dot, the automatic one a small yellow line of warning. */
.pn-opts { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.pn-opts-q { padding: 0; margin-bottom: 2px; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.pn-opt {
  position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start;
  padding: 12px 14px; border-radius: 12px; background: #1a1a1f; border: 1px solid #2a2a31; cursor: pointer;
  transition: border-color var(--slow) ease, background-color var(--slow) ease;
}
.pn-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pn-opt-dot { grid-row: 1 / span 2; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid #6a6a73; box-sizing: border-box; display: grid; place-items: center; transition: border-color var(--slow) ease; }
.pn-opt-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform var(--slow) var(--ease-out); }
.pn-opt-t { font-weight: 700; font-size: 0.9375rem; line-height: 1.4; color: var(--ink); }
.pn-opt-l { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.pn-opt.is-auto .pn-opt-l { color: var(--yellow); }
.pn-opt.is-on { border-color: var(--ink); background: #1e1e23; }
.pn-opt.is-on .pn-opt-dot { border-color: var(--ink); }
.pn-opt.is-on .pn-opt-dot::after { transform: scale(1); }
.pn-opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.pn-opt:has(input:disabled) { cursor: progress; opacity: 0.6; }
@media (hover: hover) and (pointer: fine) { .pn-opt:not(.is-on):hover { border-color: #3a3a42; } }
/* the waiting sheet: which one they chose, with a small Change */
.pn-wmode { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding-top: 8px; border-top: 1px solid #26262c; font-size: 0.875rem; line-height: 1.5; }
.pn-wmode-q { color: var(--muted); }
.pn-wmode-v { font-weight: 700; color: var(--ink); }
.pn-wmode-v.is-auto { color: var(--yellow); }
.pn-wmode-ch { margin-inline-start: auto; min-height: 36px; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #3a3a42; }
.pn-wmode-edit { display: grid; }
/* in the sheet the row above already asks the question: the legend stays for screen readers only */
.pn-wmode-edit .pn-opts-q { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .pn-opt, .pn-opt-dot, .pn-opt-dot::after { transition: none; } }
