/* ==========================================================================
   board.css: the Board page (/play/history, /play/reruns)

   Concept: design/eli/Concepts/Reruns.png. Everything page-specific is scoped
   under .pg-board and prefixed bd-. Colours come from tokens and follow
   body[data-mode]: History orange, Reruns blue/purple.
   ========================================================================== */

/* ---- Rules other files still lean on ---------------------------------------
   These were global in the old stylesheet and other files render into them:
   .chips/.chip in the pack sheet (app/sheets.js), and the text boxes in the
   add-a-record sheet and the handle sheet (app/sheets.js, shell.js). They stay
   global until those sheets are restyled. */
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:9px; }
.chip {
  font:600 10px/1 var(--font-label); letter-spacing:.11em; text-transform:uppercase;
  padding:5px 7px; border-radius:5px; background:var(--surface-2); color:var(--text-2);
  border:1px solid var(--border); white-space:nowrap;
}
.chip.goal { background:var(--mode-tint); color:var(--mode-primary); border-color:transparent; }
.chip.gold { background:var(--gold-bg); color:var(--gold); border-color:transparent; }
input[type=text] {
  width:100%; padding:12px 13px; font:inherit; font-size:16px; color:var(--text);
  background:var(--page-deep); border:1px solid var(--hover); border-radius:9px;
  -webkit-appearance:none; appearance:none;
}
input[type=text]::placeholder { color:var(--text-muted); }
input[type=text]:focus { outline:2px solid var(--mode-primary); outline-offset:-1px; border-color:transparent; }

/* ---- the page ------------------------------------------------------------- */
.pg-board .bd {
  max-width: calc(620px + 2 * var(--gutter));
  padding-top: var(--s-6);
  /* Room for the sticky bar, so the last seat is never under it. */
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
}

/* Mode switch: History (book) / Reruns (dice). The active side takes a border
   in the mode's own gradient and a soft glow, as in the concept. */
.pg-board .mode-switch { padding: 0; gap: 0; border-radius: var(--r-md); background: var(--surface); }
.pg-board .mode-switch button {
  min-height: 68px; border-radius: var(--r-md); border-width: 2px;
  justify-content: center; gap: 14px;
}
.pg-board .mode-switch .i { width: 28px; height: 28px; }
.pg-board .mode-switch .ms-name { font-size: 19px; font-weight: 500; letter-spacing: -.005em; }
.pg-board .mode-switch .ms-sub { font-size: var(--fs-xs); opacity: 1; color: inherit; }
.pg-board .mode-switch [aria-pressed="false"] { color: var(--text-2); }
.pg-board .mode-switch [aria-pressed="false"] .ms-sub { color: var(--text-2); }
.pg-board .mode-switch [aria-pressed="true"] {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(var(--mode-rgb), .16), rgba(var(--mode-rgb), .06)) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(90deg, var(--mode-primary), var(--mode-accent)) border-box;
  box-shadow: 0 0 30px -6px rgba(var(--mode-rgb), .7), 0 0 0 1px rgba(var(--mode-rgb), .2);
}
.pg-board .mode-switch [aria-pressed="true"] .ms-name { font-weight: 600; }
/* The active side's icon and name sit on one line, the tagline under both. */
.pg-board .mode-switch [aria-pressed="true"] > span { text-align: left; }

/* Archive day line. */
.pg-board .bd-archive {
  display: flex; gap: 10px; align-items: flex-start; margin-top: var(--s-4);
  padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--hover);
  color: var(--text-2); font-size: var(--fs-sm);
}
.pg-board .bd-archive .i { width: 20px; height: 20px; color: var(--mode-primary); margin-top: 1px; }
.pg-board .bd-archive b { color: var(--text); font-weight: 600; }

/* Tags, title, blurb. */
.pg-board .bd-tags { margin-top: 22px; gap: 10px; }
.pg-board .bd-tags .tag { height: 30px; padding: 0 15px; font-size: 12px; letter-spacing: .06em; font-weight: 600; }
.pg-board .bd-tags .tag:not(.is-fill) { border-color: var(--hover); color: var(--text); }
.pg-board .bd-title {
  margin-top: 18px; font: 700 clamp(30px, 6.4vw, 36px)/1.12 var(--font-ui); letter-spacing: -.02em;
}
.pg-board .bd-blurb {
  margin-top: 10px; color: var(--text-2); color: color-mix(in srgb, var(--text) 80%, transparent);
  font-size: 17px; line-height: 1.45;
}

/* ---- seat cards ------------------------------------------------------------ */
.pg-board .bd-crew { margin-top: 24px; }
.pg-board .bd-seat {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 15px 14px 16px; margin-bottom: 13px;
  transition: border-color var(--t-med), box-shadow var(--t-med);
}
.pg-board .bd-seat.filled { border-color: var(--hover); }
.pg-board .bd-seat:focus-within { border-color: var(--mode-line); }
.pg-board .bd-seat.flagged { border-color: var(--red-line); }
.pg-board .bd-seat.is-open { z-index: 5; }
.pg-board .bd-seat-top { display: flex; align-items: flex-start; gap: 12px; }
.pg-board .bd-seat-h { flex: 1 1 auto; min-width: 0; }
.pg-board .bd-role { font: 700 20px/1.25 var(--font-ui); letter-spacing: -.01em; }
.pg-board .bd-asks { margin-top: 5px; color: var(--text-2); font-size: 15.5px; line-height: 1.4; }
.pg-board .bd-no {
  flex: 0 0 auto; margin-top: 5px; color: var(--text-2);
  font: 500 13px/1 var(--font-label); letter-spacing: .06em; white-space: nowrap;
}
.pg-board .bd-fold {
  flex: 0 0 auto; width: 30px; height: 30px; margin-top: -1px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: #2A2B31; color: var(--text);
  transition: background-color var(--t-fast);
}
.pg-board .bd-fold:hover { background: var(--hover); }
.pg-board .bd-fold .i { width: 16px; height: 16px; }
/* A 44px hit area around the 30px disc. */
.pg-board .bd-fold::after { content: ""; position: absolute; width: 44px; height: 44px; margin: -7px; }
.pg-board .bd-fold { position: relative; }

.pg-board .bd-picked { margin-top: 10px; font-weight: 600; font-size: var(--fs-md); color: var(--mode-highlight); }
.pg-board .bd-picked span { color: var(--text-muted); font-weight: 500; }
.pg-board .bd-picked[hidden], .pg-board .bd-seat-body[hidden] { display: none; }

.pg-board .bd-hint {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 8px;
  color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4;
}
.pg-board .bd-hint .i { width: 16px; height: 16px; color: var(--mode-highlight); margin-top: 1px; }

/* Constraint chips. Same component as the gallery; "Any" in a rolled pair is
   the same chip, as in the concept. */
.pg-board .bd-cons { margin-top: 12px; gap: 10px; }
.pg-board .bd-cons .constraint { min-height: 48px; padding: 7px 15px; border-radius: var(--r-sm); }
.pg-board .bd-cons .c-k { font-size: 10px; letter-spacing: .16em; }
.pg-board .bd-cons .c-v { font-size: 15px; }
.pg-board .bd-cons .constraint.is-open .c-v { font-size: 14.5px; }
/* OPEN SEAT is neutral in both modes (the History tint otherwise wins on specificity). */
.pg-board .bd-cons .constraint.is-open { background: var(--surface-2); }
.pg-board .bd-cons .constraint.is-open .c-k { color: var(--text-2); }
.pg-board .bd-cons .constraint.is-open .c-v { color: var(--text); font-weight: 600; }
/* Rolled chips are a deep solid tint with the value in the mode's light tone,
   sampled off the concept (#022651 ground, #6AB8F3 value in Reruns). */
body[data-mode="reruns"] .pg-board .bd-cons .constraint:not(.is-open) { background: #06285A; }
body[data-mode="reruns"] .pg-board .bd-cons .constraint:not(.is-open) .c-k { color: #4A90E8; }
body[data-mode="reruns"] .pg-board .bd-cons .constraint:not(.is-open) .c-v { color: #7CC2F8; }
body[data-mode="history"] .pg-board .bd-cons .constraint:not(.is-open) { background: #3A1F0A; }
body[data-mode="history"] .pg-board .bd-cons .constraint:not(.is-open) .c-k { color: #F08A45; }
body[data-mode="history"] .pg-board .bd-cons .constraint:not(.is-open) .c-v { color: #F7CD86; }

/* The name box. */
.pg-board .bd-combo { position: relative; margin-top: 8px; }
.pg-board .bd-input {
  min-height: 50px; padding: 12px 15px; border-radius: var(--r-sm);
  background: var(--page-deep); border: 1px solid var(--hover);
  font-size: 17px; outline: none;
}
.pg-board .bd-input::placeholder { color: var(--text-muted); opacity: 1; }
.pg-board .bd-input:focus { outline: none; border-color: var(--mode-primary); box-shadow: 0 0 0 3px rgba(var(--mode-rgb), .22); }
.pg-board .bd-input:disabled { opacity: .45; }
.pg-board .bd-seat.filled .bd-input { border-color: var(--mode-line); }

.pg-board .bd-stuck {
  display: inline-block; margin-top: 10px; padding: 2px 0; background: none; border: 0; cursor: pointer;
  color: var(--text-2); font: 400 14.5px/1.3 var(--font-ui);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: currentColor;
}
.pg-board .bd-stuck:hover, .pg-board .bd-stuck[aria-expanded="true"] { color: var(--text); }

.pg-board .bd-link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600;
  color: var(--mode-primary); text-decoration: underline; text-underline-offset: 3px;
}
.pg-board .bd-link:hover { color: var(--mode-highlight); }

/* Small buttons inside a seat. */
.pg-board .btn.bd-sm { min-height: 40px; padding: 8px 14px; font-size: var(--fs-sm); gap: 8px; border-radius: var(--r-sm); }
.pg-board .btn.bd-sm .i { width: 18px; height: 18px; }
.pg-board .btn-primary.bd-sm { min-height: 40px; box-shadow: none; }
.pg-board .bd-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---- the autocomplete panel ------------------------------------------------ */
.pg-board .bd-acp {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--surface); border: 1px solid var(--hover); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); overflow: hidden auto; max-height: min(360px, 52vh);
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.pg-board .bd-acp[hidden] { display: none; }
.pg-board .ac-note {
  padding: 9px 14px; font: 500 10.5px/1.45 var(--font-label); letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.pg-board .ac-note.is-foot { border-bottom: 0; border-top: 1px solid var(--border); }
/* One row: face, then name / source / why, each on its own line. A grid, not a
   flex row: the reason can never squeeze the name to one letter per line. */
.pg-board .ac {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 9px 14px; min-height: 54px;
  background: none; border: 0; border-bottom: 1px solid var(--border);
  color: var(--text); font: inherit; cursor: pointer;
}
.pg-board .ac:last-child { border-bottom: 0; }
.pg-board .ac:hover { background: rgba(255,255,255,.03); }
.pg-board .ac[aria-selected="true"] { background: var(--mode-tint); box-shadow: inset 3px 0 0 var(--mode-primary); }
.pg-board .ac-face {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text); font: 700 12.5px/1 var(--font-label); letter-spacing: .02em;
}
.pg-board .ac-face img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.pg-board .ac:hover .ac-face img, .pg-board .ac[aria-selected="true"] .ac-face img { filter: none; }
.pg-board .ac-face.is-mono { background: hsl(var(--h, 0) 32% 24%); color: hsl(var(--h, 0) 60% 86%); }
.pg-board .ac-face.is-raw { background: var(--mode-tint); color: var(--mode-primary); }
.pg-board .ac-face.is-raw .i { width: 17px; height: 17px; }
.pg-board .ac-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pg-board .ac-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pg-board .ac-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; overflow-wrap: break-word; min-width: 0; }
.pg-board .ac-sub {
  color: var(--text-2); font-size: 13px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pg-board .ac-why {
  color: var(--red-soft); font-size: 12.5px; line-height: 1.4; overflow-wrap: normal; word-break: normal;
}
.pg-board .ac-ok {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 5px;
  border-radius: var(--r-pill); background: var(--green-bg); color: var(--green-soft);
  font: 600 10.5px/1.4 var(--font-label); letter-spacing: .06em; text-transform: uppercase;
}
.pg-board .ac-ok .i { width: 12px; height: 12px; }
.pg-board .ac.blocked .ac-name, .pg-board .ac.blocked .ac-sub { opacity: .6; }
.pg-board .ac.blocked .ac-face { opacity: .55; }
.pg-board .ac.raw .ac-name { color: var(--mode-highlight); }

/* The ways out, at the foot of the panel. */
.pg-board .ac-x {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0;
  border-top: 1px solid var(--border); color: var(--mode-primary); cursor: pointer;
  font: 600 14.5px/1.35 var(--font-ui);
}
.pg-board .ac-x:hover, .pg-board .ac-x:focus-visible { background: var(--mode-tint); }
.pg-board .ac-x-ic {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px dashed var(--mode-line); color: var(--mode-primary);
}
.pg-board .ac-x-ic .i { width: 17px; height: 17px; }
.pg-board .ac-x-t span { display: block; color: var(--text-2); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.pg-board .ac-x.ac-fit { border-top: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }

/* ---- a seat that needs an answer --------------------------------------------- */
.pg-board .bd-flag {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--red-line); background: var(--red-bg); font-size: var(--fs-sm); line-height: 1.45;
}
.pg-board .bd-flag.is-rule { border-color: var(--amber-line); background: var(--amber-bg); }
.pg-board .bd-flag.is-rescue { border-color: var(--mode-line); background: var(--mode-tint); }
.pg-board .bd-flag-t { display: block; font-size: 15px; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.pg-board .bd-flag.is-nobody .bd-flag-t { color: var(--red-soft); }
.pg-board .bd-flag.is-rule .bd-flag-t { color: var(--amber); }
.pg-board .bd-flag p { color: var(--text); }
.pg-board .bd-flag p + p { margin-top: 5px; }
.pg-board .bd-flag .bd-flag-sub { color: var(--text-2); }
.pg-board .bd-found b { font-weight: 600; }

.pg-board .bd-receipt {
  margin-top: 10px; padding: 10px 13px; border-radius: var(--r-sm);
  border: 1px solid var(--green-line); background: var(--green-bg); font-size: var(--fs-sm);
}
.pg-board .bd-receipt-k {
  display: inline-flex; align-items: center; gap: 6px; color: var(--green-soft);
  font: 600 10.5px/1.4 var(--font-label); letter-spacing: .14em; text-transform: uppercase;
}
.pg-board .bd-receipt-k .i { width: 14px; height: 14px; }
.pg-board .bd-receipt p { margin-top: 3px; }

/* ---- Stuck on this seat? ------------------------------------------------------- */
.pg-board .bd-relief {
  margin-top: 10px; padding: 4px 14px 12px; border-radius: var(--r-md);
  background: var(--page-deep); border: 1px solid var(--border);
}
.pg-board .bd-way { padding: 12px 0; border-bottom: 1px solid var(--border); }
.pg-board .bd-way-t {
  font: 600 11px/1.3 var(--font-label); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2);
}
.pg-board .bd-way-s { margin-top: 5px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.pg-board .bd-way .btn { margin-top: 10px; }
.pg-board .bd-relief > .bd-link { margin-top: 12px; }
.pg-board .bd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pg-board .bd-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px;
  border-radius: var(--r-pill); border: 1px solid var(--mode-line); background: var(--mode-tint);
  color: var(--mode-highlight); font: 500 var(--fs-sm)/1 var(--font-ui); cursor: pointer;
}
.pg-board .bd-chip .i { width: 15px; height: 15px; }
.pg-board .bd-chip:hover { border-color: var(--mode-primary); }
.pg-board .bd-ro {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; margin-top: 8px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font: inherit; cursor: pointer;
}
.pg-board .bd-ro:hover { border-color: var(--hover); background: var(--surface-2); }
.pg-board .bd-ro-l { flex: 1 1 auto; min-width: 0; }
.pg-board .bd-ro-l b { display: block; font-weight: 600; font-size: 14.5px; }
.pg-board .bd-ro-l span { display: block; color: var(--text-2); font-size: 13px; }
.pg-board .bd-ro-c {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end;
  font: 700 15px/1 var(--font-label); color: var(--red-soft);
}
.pg-board .bd-ro-c small { font: 500 9.5px/1.4 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.pg-board .bd-relief-on {
  display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--amber-line); background: var(--amber-bg); border-radius: var(--r-sm); font-size: var(--fs-sm);
}
.pg-board .bd-relief-on .i { width: 18px; height: 18px; color: var(--amber); }
.pg-board .bd-relief-on b { font-weight: 600; }
.pg-board .bd-relief-on .bd-link { margin-left: auto; flex: 0 0 auto; }
.pg-board .bd-seat.conceded .bd-input { opacity: .4; }

/* ---- the wrong-mode rescue -------------------------------------------------- */
.pg-board .bd-rescue {
  display: flex; gap: 14px; align-items: flex-start; margin-top: var(--s-4);
  padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--mode-line);
  background: linear-gradient(90deg, rgba(var(--mode-rgb), .16), rgba(var(--mode-rgb), .04) 70%), var(--surface);
  box-shadow: var(--mode-glow);
}
.pg-board .bd-rescue-ic {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--mode-tint); color: var(--mode-primary);
}
.pg-board .bd-rescue-ic .i { width: 24px; height: 24px; }
.pg-board .bd-rescue-body { flex: 1 1 auto; min-width: 0; }
.pg-board .bd-rescue h2 { font-size: 18px; font-weight: 700; }
.pg-board .bd-rescue p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-base); }
.pg-board .bd-rescue p b { color: var(--text); font-weight: 600; }
.pg-board .bd-rescue .btn { min-height: 46px; padding: 10px 16px; }
.pg-board .bd-rescue .btn-primary { box-shadow: none; }
.pg-board .bd-rescue .btn-primary .i { width: 18px; height: 18px; }

/* ---- the sticky bar ---------------------------------------------------------- */
.pg-board .bd-bar {
  position: fixed; z-index: 30; left: 0; right: 0;
  bottom: calc(10px + env(safe-area-inset-bottom));
  padding: 0 calc(var(--gutter) + env(safe-area-inset-right)) 0 calc(var(--gutter) + env(safe-area-inset-left));
  pointer-events: none;
}
.pg-board .bd-bar-in {
  pointer-events: auto;
  max-width: 694px; margin: 0 auto; padding: 6px 6px 6px 28px;
  background: rgba(11,11,14,.94); background: color-mix(in srgb, var(--page-deep) 94%, transparent);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 -12px 40px -8px rgba(0,0,0,.75);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pg-board .bd-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pg-board .bd-count {
  color: var(--text-2); font: 500 13px/1.3 var(--font-mono); letter-spacing: .24em; text-transform: uppercase;
}
.pg-board .bd-bar.is-ready .bd-count { color: var(--mode-highlight); }
.pg-board .bd-go {
  flex: 0 0 auto; min-width: 308px; min-height: 60px; padding: 0 26px; border-radius: 10px;
  justify-content: center;
}
.pg-board .bd-go .btn-title { font-size: 20px; font-weight: 600; gap: 10px; letter-spacing: -.005em; }
.pg-board .bd-go .i { width: 22px; height: 22px; transition: transform var(--t-med) var(--ease-out); }
.pg-board .bd-go:hover .i { transform: translateX(3px); }
.pg-board .bd-go[disabled] { opacity: .7; cursor: progress; }
.pg-board .bd-bar.is-ready .bd-go { box-shadow: 0 10px 34px -8px rgba(var(--mode-rgb), .95), inset 0 1px 0 rgba(255,255,255,.25); }
.pg-board .bd-go.is-override { background: linear-gradient(180deg, var(--gold-strong), var(--amber)); color: var(--history-ink); }
.pg-board .bd-bar-note {
  margin: 6px 8px 10px -14px; font-size: var(--fs-sm); line-height: 1.35; color: var(--text-2);
}
.pg-board .bd-bar-note.is-bad, .pg-board .bd-bar-note.is-err { color: var(--red-soft); }
.pg-board .bd-bar-note.is-warn { color: var(--amber); }
.pg-board .bd-bar-note[hidden] { display: none; }

/* The toast has to clear the bar. */
body[data-page="board"] .toast { bottom: calc(104px + env(safe-area-inset-bottom)); }

/* ---- below the seats: No repeats, More boards ------------------------------- */
.pg-board .bd-extras { margin-top: var(--s-7); }
.pg-board .bd-rule {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.pg-board .bd-rule-ic { width: 44px; height: 44px; flex: 0 0 44px; }
.pg-board .bd-rule-ic .i { width: 22px; height: 22px; color: var(--mode-primary); }
.pg-board .bd-rule-text { flex: 1 1 auto; min-width: 0; }
.pg-board .bd-rule-t { font-size: 16px; font-weight: 700; }
.pg-board .bd-rule-s { margin-top: 3px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.pg-board .bd-switch {
  position: relative; flex: 0 0 auto; width: 52px; height: 30px; border-radius: var(--r-pill);
  border: 1px solid var(--hover); background: var(--surface-2); cursor: pointer; padding: 0;
  transition: background var(--t-med), border-color var(--t-med);
}
.pg-board .bd-knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text-2); transition: transform var(--t-med) var(--ease-out), background var(--t-med);
}
.pg-board .bd-switch[aria-checked="true"] { background: var(--mode-gradient); border-color: transparent; }
.pg-board .bd-switch[aria-checked="true"] .bd-knob { transform: translateX(22px); background: var(--text); }
.pg-board .bd-switch::after { content: ""; position: absolute; inset: -8px; }

.pg-board .bd-more { margin-top: var(--s-6); }
.pg-board .bd-more .section-h { margin: 0 0 10px; }
.pg-board .bd-more .section-h h3 { font: 600 11px/1 var(--font-label); letter-spacing: .2em; color: var(--text-2); }
.pg-board .bd-more .packs { padding: 2px var(--gutter) 6px; margin: 0 calc(-1 * var(--gutter)); }
.pg-board .bd-more .pack { border-radius: 14px; border-color: var(--border); background: var(--surface); }
.pg-board .bd-more .pack.locked { background: var(--surface-2); }

/* ---- phones ------------------------------------------------------------------- */
@media (max-width: 560px) {
  .pg-board .bd { padding-top: var(--s-4); }
  .pg-board .mode-switch button { min-height: 60px; gap: 10px; padding: 8px 10px; }
  .pg-board .mode-switch .i { width: 24px; height: 24px; }
  .pg-board .mode-switch .ms-name { font-size: 17px; }
  .pg-board .mode-switch .ms-sub { font-size: 11px; }
  .pg-board .bd-tags { margin-top: 18px; gap: 8px; }
  .pg-board .bd-tags .tag { height: 28px; padding: 0 12px; font-size: 11px; }
  .pg-board .bd-title { margin-top: 14px; }
  .pg-board .bd-blurb { font-size: 16px; }
  .pg-board .bd-seat { padding: 14px 12px 12px 14px; }
  .pg-board .bd-role { font-size: 19px; }
  .pg-board .bd-asks { font-size: 15px; }
  .pg-board .bd-bar { bottom: calc(8px + env(safe-area-inset-bottom)); padding-left: calc(10px + env(safe-area-inset-left)); padding-right: calc(10px + env(safe-area-inset-right)); }
  .pg-board .bd-bar-in { padding: 6px 6px 6px 14px; }
  .pg-board .bd-count { font-size: 11px; letter-spacing: .16em; }
  .pg-board .bd-count span { display: block; }
  .pg-board .bd-count span:first-child { color: var(--text); font-size: 13px; }
  .pg-board .bd-go { min-width: 0; min-height: 52px; padding: 0 16px; }
  .pg-board .bd-go .btn-title { font-size: 17px; gap: 8px; }
  .pg-board .bd-go .i { width: 19px; height: 19px; }
  .pg-board .bd-bar-note { margin-left: -4px; }
  .pg-board .bd-rescue { flex-direction: column; gap: 10px; }
  .pg-board .bd-rescue .bd-acts > * { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .pg-board .mode-switch .ms-sub { display: none; }
  .pg-board .bd-count { letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-board .bd-go .i, .pg-board .bd-knob, .pg-board .bd-seat { transition: none; }
}
.pg-board .bd-hint b { color: var(--text); font-weight: 600; }
