/*
  星球拓荒 / Planet Pioneers: the planet fills the screen under the site bar. Glass panels sit
  around it: the month and your haul on the left, the pioneers and the homestead panel
  (cargo hold, projects, shop, goals) on the right, the five task cards along the bottom.
*/

html,
body {
  height: 100%;
}

body.pv-body {
  margin: 0;
  overflow: hidden;
  color: #eef1ee;
  background:
    radial-gradient(ellipse 60% 55% at 50% 46%, rgba(76, 120, 190, 0.28), transparent 70%),
    radial-gradient(ellipse at 50% 50%, #142039 0%, #0b1324 50%, #050912 100%);
  font-family: var(--gh-font-body);
  overscroll-behavior: none;
  --pv-glass: rgba(9, 16, 23, 0.74);
  --pv-line: rgba(255, 255, 255, 0.1);
  --pv-soft: #9fb0bd;
  --pv-gold: #ffbe0b;
  --pv-left: 240px;
  --pv-right: 312px;
  --pv-bottom: 178px;
}

.pv-stage {
  position: fixed;
  inset: 56px 0 0;
  -webkit-user-select: none;
  user-select: none;
}

#ppCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
  opacity: 0;
  transition: opacity 900ms ease;
}

.pv-stage.is-ready #ppCanvas {
  opacity: 1;
}

/* ---------- shared glass ---------- */

.pv-month,
.pv-players,
.pv-haul,
.pv-side,
.pv-tasks,
.pv-fish,
.pv-pop,
.pv-card,
.pv-tip,
.pv-toast {
  border: 1px solid var(--pv-line);
  background: var(--pv-glass);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
}

.pv-stage h2,
.pv-stage h3 {
  margin: 0;
  font-weight: 700;
}

.pv-stage button {
  font: inherit;
  color: inherit;
}

.pv-month,
.pv-players,
.pv-haul,
.pv-side,
.pv-tasks {
  display: none;
}

.pv-stage.is-playing .pv-month,
.pv-stage.is-playing .pv-players,
.pv-stage.is-playing .pv-haul,
.pv-stage.is-playing .pv-side,
.pv-stage.is-playing .pv-tasks {
  display: block;
}

/* ---------- tokens ---------- */

.pv-token {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  flex: none;
}

.pv-token.is-light {
  color: #2a2016;
}

.pv-boot {
  font-size: 0.66rem;
  font-style: normal;
  color: #7d8a96;
}

.pv-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
  vertical-align: middle;
}

/* ---------- buttons ---------- */

.pv-primary,
.pv-secondary,
.pv-link,
.pv-buy,
.pv-icon,
.pv-opt,
.pv-nudge {
  cursor: pointer;
  border: 0;
}

.pv-primary {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--pv-gold);
  color: #1a1300 !important;
  font-weight: 800;
}

.pv-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.pv-secondary {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.pv-secondary.is-on {
  border-color: #9fffa8 !important;
  background: rgba(159, 255, 168, 0.16);
}

.pv-link {
  padding: 6px 4px;
  background: none;
  color: #bfe9ff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pv-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1rem;
}

.pv-icon.is-small {
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
}

.pv-icon:hover {
  background: rgba(255, 255, 255, 0.16);
}

.pv-icon.is-off {
  opacity: 0.45;
}

.pv-volumes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--pv-soft);
  font-size: 0.82rem;
}

.pv-volumes label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-volumes input {
  width: 130px;
  accent-color: var(--pv-gold);
}

button:disabled {
  cursor: default;
  opacity: 0.4;
}

/* ---------- the month (top left) ---------- */

.pv-month {
  position: absolute;
  top: 12px;
  left: 12px;
  width: var(--pv-left);
  box-sizing: border-box;
  padding: 10px 12px 10px;
  border-radius: 14px;
}

.pv-month-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pv-month-top b {
  font-family: var(--gh-font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.pv-month-top span {
  flex: 1;
  color: var(--pv-soft);
  font-size: 0.85rem;
}

.pv-month-tools {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.pv-bar {
  position: relative;
  height: 6px;
  margin: 8px 0 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.pv-bar > i:first-child {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #7cc464, #ffbe0b);
}

.pv-bar i + i,
.pv-bar i:nth-child(n + 2) {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: #fff;
}

.pv-bar i:nth-child(2) { left: calc(50% - 2px); }
.pv-bar i:nth-child(3) { left: calc(83.3% - 2px); }
.pv-bar i:nth-child(4) { left: calc(100% - 4px); }
.pv-bar i.is-past { background: #7d8a96; }

.pv-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0;
}

.pv-facts div {
  display: grid;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.pv-facts dt {
  color: var(--pv-soft);
  font-size: 0.68rem;
}

.pv-facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

/* ---------- pioneers (top right) ---------- */

.pv-players {
  position: absolute;
  top: 12px;
  right: 12px;
  width: var(--pv-right);
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 14px;
}

.pv-players h2,
.pv-haul h2 {
  margin-bottom: 6px;
  color: var(--pv-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.pv-players ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-players li {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 0.86rem;
}

.pv-players li.is-me {
  background: rgba(74, 163, 255, 0.14);
}

.pv-players li b {
  min-width: 28px;
  text-align: right;
  font-size: 1rem;
}

.pv-name em {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 190, 11, 0.18);
  color: #ffd34d;
  font-size: 0.66rem;
  font-style: normal;
}

.pv-wish {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--pv-soft);
  font-size: 0.7rem;
}

.pv-wish .pv-token {
  width: 18px;
  height: 18px;
  font-size: 0.6rem;
}

/* ---------- haul (left) ---------- */

.pv-haul {
  position: absolute;
  top: 178px;
  left: 12px;
  bottom: calc(var(--pv-bottom) + 20px);
  width: var(--pv-left);
  box-sizing: border-box;
  padding: 10px 12px;
  overflow-y: auto;
  border-radius: 14px;
}

.pv-haul h2 small {
  float: right;
  color: #fff;
  font-size: 0.8rem;
}

.pv-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.pv-items > .pv-none {
  grid-column: 1 / -1;
}

.pv-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.pv-item:hover,
.pv-item.is-on {
  border-color: var(--pv-gold);
  background: rgba(255, 190, 11, 0.12);
}

@keyframes pv-pop-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
}

.pv-none {
  margin: 4px 0;
  color: var(--pv-soft);
  font-size: 0.8rem;
}

.pv-rule,
.pv-stock {
  margin: 10px 0 0;
  color: var(--pv-soft);
  font-size: 0.74rem;
  line-height: 1.45;
}

.pv-stock {
  color: #ffd34d;
}

/* ---------- side panel (right) ---------- */

.pv-side {
  position: absolute;
  top: 150px;
  right: 12px;
  bottom: calc(var(--pv-bottom) + 20px);
  width: var(--pv-right);
  box-sizing: border-box;
  display: none;
  border-radius: 14px;
  overflow: hidden;
}

.pv-stage.is-playing .pv-side {
  display: flex;
  flex-direction: column;
}

.pv-tabs {
  display: flex;
  border-bottom: 1px solid var(--pv-line);
}

.pv-tabs button {
  flex: 1;
  padding: 9px 4px;
  border: 0;
  background: none;
  color: var(--pv-soft);
  font-weight: 700;
  cursor: pointer;
}

.pv-tabs button[aria-selected="true"] {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--pv-gold);
}

.pv-tab-body {
  flex: 1;
  padding: 10px 12px 14px;
  overflow-y: auto;
  font-size: 0.84rem;
}

.pv-tab-body h3 {
  margin: 12px 0 6px;
  color: var(--pv-soft);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.pv-tab-body h3 small {
  margin-left: 6px;
  color: #fff;
}

.pv-panel-lede,
.pv-panel-note {
  margin: 0 0 8px;
  color: #cfd8de;
  font-size: 0.78rem;
  line-height: 1.5;
}

.pv-panel-note {
  margin-top: 8px;
  color: var(--pv-soft);
}

.pv-muted {
  color: var(--pv-soft);
}

/* cargo hold */
.pv-hold {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr) 34px;
  gap: 3px;
}

.pv-hold-cell {
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 800;
}

.pv-hold.is-stamping .pv-hold-cell {
  cursor: crosshair;
}

.pv-hold-cell.is-full {
  border-color: rgba(255, 255, 255, 0.35);
  background: var(--c);
  color: #1d1710;
}

.pv-hold-cell.is-ghost {
  border: 2px solid #9fffa8;
  background: color-mix(in srgb, var(--c) 60%, transparent);
}

.pv-hold-cell.is-bad {
  border: 2px solid #ff6b57;
  background: rgba(255, 107, 87, 0.25);
}

.pv-hold-reward {
  align-self: center;
  color: #ffd34d;
  font-size: 0.6rem;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
}

.pv-hold-reward.is-done {
  color: #9fffa8;
  font-size: 0.9rem;
}

.pv-stamping {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 190, 11, 0.12);
}

/* projects and shop */
.pv-projects,
.pv-shop {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-projects li,
.pv-shop li {
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.pv-projects li.is-done {
  border-color: rgba(159, 255, 168, 0.4);
  background: rgba(159, 255, 168, 0.08);
}

.pv-projects p {
  margin: 4px 0 0;
  color: #cfd8de;
  font-size: 0.76rem;
}

.pv-proj-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.pv-lv {
  color: #ffd34d;
  font-size: 0.74rem;
}

.pv-slots {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.pv-slot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  opacity: 0.45;
}

.pv-slot.is-filled {
  border: 1px solid #9fffa8;
  background: rgba(159, 255, 168, 0.12);
  opacity: 1;
}

.pv-shop li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
}

.pv-shop span {
  grid-column: 1;
  color: var(--pv-soft);
  font-size: 0.74rem;
}

.pv-buy {
  grid-row: 1 / span 2;
  grid-column: 2;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--pv-gold);
  color: #1a1300 !important;
  font-weight: 800;
}

.pv-prices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.pv-prices span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}

.pv-goal-pts span {
  margin-right: 10px;
}

.pv-score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0;
}

.pv-score div {
  display: grid;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.pv-score dt {
  color: var(--pv-soft);
  font-size: 0.68rem;
}

.pv-score dd {
  margin: 0;
  font-weight: 800;
}

/* ---------- task cards (bottom) ---------- */

.pv-tasks {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: var(--pv-bottom);
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 16px;
}

.pv-stage.is-playing .pv-tasks {
  display: flex;
  gap: 12px;
}

.pv-row {
  display: flex;
  flex: 1;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}

.pv-task {
  position: relative;
  display: flex;
  flex: 1 0 150px;
  flex-direction: column;
  max-width: 210px;
  padding: 0 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  overflow: hidden;
}

.pv-task[data-season="0"] { box-shadow: inset 0 -4px 0 #7cc464; }
.pv-task[data-season="1"] { box-shadow: inset 0 -4px 0 #ffbe0b; }
.pv-task[data-season="2"] { box-shadow: inset 0 -4px 0 #ff8a5c; }
.pv-task[data-season="-1"] { box-shadow: inset 0 -4px 0 #4fb3d9; }

.pv-task.is-new {
  border-color: rgba(255, 190, 11, 0.6);
}

.pv-task.is-picked {
  border-color: #9fffa8;
  background: rgba(159, 255, 168, 0.12);
}

.pv-task.is-picked::after {
  content: "已选";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #9fffa8;
  color: #0b1a10;
  font-size: 0.7rem;
  font-weight: 800;
}

.pv-task.is-off {
  opacity: 0.45;
}

.pv-task-face {
  display: grid;
  gap: 1px;
  padding: 8px 10px 4px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

/* The whole card is the button, not just its name. */
.pv-task-face::before {
  content: "";
  position: absolute;
  inset: 0;
}

.pv-task.is-open .pv-task-opts {
  position: relative;
  z-index: 1;
}

.pv-task-face[aria-disabled="true"] {
  cursor: default;
}

.pv-task:not(.is-picked):not(.is-off):hover {
  border-color: var(--pv-gold);
  background: linear-gradient(180deg, rgba(255, 190, 11, 0.14), rgba(255, 255, 255, 0.04));
}

.pv-task-name {
  font-size: 1rem;
  font-weight: 800;
}

.pv-task-season {
  color: var(--pv-soft);
  font-size: 0.68rem;
}

.pv-task-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 2px 10px 4px;
}

.pv-act {
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  font-weight: 700;
}

.pv-or {
  color: var(--pv-soft);
  font-size: 0.72rem;
}

.pv-opt {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--c, var(--pv-gold));
  color: #10151a !important;
  font-size: 0.78rem;
  font-weight: 800;
}

.pv-cond,
.pv-bonus {
  margin: 2px 10px 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.pv-cond {
  color: #ff9b8b;
}

.pv-cond.is-met {
  color: #9fffa8;
}

.pv-bonus {
  color: #ffd34d;
}

.pv-turn {
  display: flex;
  flex: 0 0 220px;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
}

.pv-hint {
  margin: 0;
  font-weight: 800;
}

.pv-pools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pv-pool {
  padding: 3px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--c) 30%, transparent);
  border: 1px solid var(--c);
  font-size: 0.8rem;
}

.pv-next {
  margin: 0;
  color: var(--pv-soft);
  font-size: 0.7rem;
}

/* ---------- fishing ---------- */

.pv-fish {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 14;
  width: min(330px, calc(100% - 32px));
  max-height: calc(100% - var(--pv-bottom) - 36px);
  box-sizing: border-box;
  padding: 12px 14px;
  overflow-y: auto;
  border-radius: 16px;
  transform: translateX(-50%);
  animation: pv-card-in 300ms ease both;
}

.pv-fish h2 {
  font-size: 1.1rem;
}

.pv-dice {
  display: flex;
  gap: 10px;
  margin: 6px 0;
}

.pv-die {
  display: grid;
  flex: 1;
  justify-items: center;
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
}

.pv-die b {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 1.5rem;
}

.pv-die.is-black b {
  background: #1d2733;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.pv-die.is-white b {
  background: #f4f6f8;
  color: #1d2733;
}

.pv-die span {
  color: var(--pv-soft);
  font-size: 0.72rem;
}

.pv-nudge {
  margin: 2px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.pv-fish-grid {
  display: grid;
  grid-template-columns: 18px repeat(6, 1fr);
  gap: 3px;
  font-size: 0.7rem;
}

.pv-fish-axis {
  display: grid;
  place-items: center;
  color: var(--pv-soft);
}

.pv-fish-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(79, 179, 217, 0.12);
}

.pv-fish-cell.is-aim {
  background: rgba(255, 190, 11, 0.35);
  box-shadow: inset 0 0 0 2px var(--pv-gold);
}

.pv-fish-cell.is-rolled {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.pv-fish-got {
  margin: 8px 0;
  font-weight: 700;
}

/* ---------- popover, tooltip, toast, feed ---------- */

.pv-pop {
  position: absolute;
  z-index: 20;
  display: grid;
  gap: 4px;
  width: 230px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(9, 16, 23, 0.92);
}

.pv-pop[hidden] {
  display: none;
}

.pv-pop h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.pv-pop h3 small {
  color: var(--pv-soft);
  font-size: 0.72rem;
  font-weight: 400;
}

.pv-pop-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  cursor: pointer;
}

.pv-pop-btn:hover:not(:disabled) {
  border-color: var(--pv-gold);
  background: rgba(255, 190, 11, 0.12);
}

.pv-pop-btn span {
  grid-column: 2;
  color: var(--pv-soft);
  font-size: 0.74rem;
}

.pv-pop-btn .pv-token {
  grid-row: 1 / span 2;
}

.pv-tip {
  position: absolute;
  z-index: 15;
  max-width: 320px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.8rem;
  pointer-events: none;
}

.pv-tip[hidden] {
  display: none;
}

.pv-toast {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 25;
  padding: 9px 16px;
  border-radius: 12px;
  font-weight: 700;
  transform: translateX(-50%);
  pointer-events: none;
}

.pv-toast[hidden] {
  display: none;
}

.pv-toast.is-in {
  animation: pv-toast-in 260ms ease both;
}

.pv-toast.is-bad {
  border-color: rgba(255, 107, 87, 0.6);
  color: #ffc2b8;
}

@keyframes pv-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}

.pv-feed {
  position: absolute;
  left: calc(var(--pv-left) + 24px);
  bottom: calc(var(--pv-bottom) + 20px);
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  max-width: 420px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.pv-feed li {
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(9, 16, 23, 0.7);
  font-size: 0.8rem;
  line-height: 1.4;
  transition: opacity 1.2s ease;
  animation: pv-pop-in 260ms ease both;
}

.pv-feed li.is-good {
  border-left: 3px solid #9fffa8;
}

.pv-feed li.is-bad {
  border-left: 3px solid #ff6b57;
}

.pv-feed li.is-info {
  border-left: 3px solid var(--pv-gold);
}

.pv-feed li.is-old {
  opacity: 0.35;
}

/* ---------- cards: menu, rules, scoring ---------- */

.pv-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 30;
  display: grid;
  gap: 14px;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  box-sizing: border-box;
  padding: 26px 28px 22px;
  overflow-y: auto;
  border-radius: 20px;
  background: rgba(8, 13, 22, 0.86);
  transform: translate(-50%, -50%);
  animation: pv-card-in 380ms ease both;
}

.pv-card[hidden] {
  display: none;
}

@keyframes pv-card-in {
  from {
    opacity: 0;
    margin-top: 14px;
  }
}

.pv-card h1,
.pv-card h2 {
  margin: 0;
  font-family: var(--gh-font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  background: linear-gradient(100deg, #9fffa8 0%, #ffd34d 45%, #c99a3e 70%, #dcbc6a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pv-card h2 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
}

.pv-lede {
  margin: 0;
  color: #dfe6ea;
  line-height: 1.6;
}

.pv-howto {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #cfd8de;
  font-size: 0.9rem;
  line-height: 1.5;
}

.pv-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.pv-seats legend {
  margin-bottom: 6px;
  color: var(--pv-soft);
  font-size: 0.8rem;
}

.pv-seats button {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.pv-seats button[aria-pressed="true"] {
  border-color: var(--pv-gold);
  background: rgba(255, 190, 11, 0.16);
  font-weight: 800;
}

.pv-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pv-credit {
  margin: 0;
  color: #7d8a96;
  font-size: 0.72rem;
}

.pv-rules {
  display: grid;
  gap: 6px;
  color: #cfd8de;
  font-size: 0.88rem;
  line-height: 1.6;
}

.pv-rules h3 {
  margin-top: 6px;
  color: #ffd34d;
  font-size: 0.95rem;
}

.pv-rules p,
.pv-rules ol {
  margin: 0;
}

.pv-results {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-results li {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}

.pv-results b {
  margin-left: auto;
  color: #9fffa8;
}

.pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.pv-table th,
.pv-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.pv-table th {
  color: var(--pv-soft);
  font-weight: 600;
}

.pv-table td:first-child {
  text-align: left;
  white-space: nowrap;
}

.pv-table tr.is-me td {
  background: rgba(74, 163, 255, 0.12);
}

.pv-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.pv-fallback[hidden] {
  display: none;
}

/* ---------- smaller screens ---------- */

@media (max-width: 1180px) {
  body.pv-body {
    --pv-left: 210px;
    --pv-right: 280px;
  }

  .pv-turn {
    flex-basis: 180px;
  }
}

.pv-side-toggle {
  display: none !important;
}

@media (max-width: 860px) {
  body.pv-body {
    --pv-bottom: 214px;
  }

  .pv-month {
    right: 12px;
    width: auto;
    padding: 8px 10px;
  }

  .pv-facts {
    grid-template-columns: repeat(4, 1fr);
  }

  .pv-players {
    display: none !important;
  }

  .pv-side-toggle {
    display: inline-grid !important;
  }

  .pv-haul {
    top: auto;
    right: 12px;
    bottom: calc(var(--pv-bottom) + 18px);
    width: auto;
    max-height: 132px;
    padding: 8px 10px;
  }

  .pv-items {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }

  .pv-rule {
    display: none;
  }

  .pv-stage.is-playing .pv-side {
    display: none;
  }

  .pv-stage.is-playing.show-side .pv-side {
    display: flex;
    top: 120px;
    left: 12px;
    right: 12px;
    width: auto;
    z-index: 12;
  }

  .pv-stage.is-playing .pv-tasks {
    flex-direction: column;
    gap: 6px;
  }

  .pv-turn {
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .pv-task {
    flex-basis: 132px;
  }

  .pv-feed {
    left: 12px;
    bottom: calc(var(--pv-bottom) + 160px);
    max-width: calc(100% - 24px);
  }
}

/* ---------- tutorial ---------- */

.pv-stage.is-touring .pv-toast {
  z-index: 45;
}

.pv-stage.is-touring .pv-tip {
  display: none;
}

.pv-tour-spot {
  position: absolute;
  z-index: 40;
  border: 2px solid var(--pv-gold);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(4, 8, 14, 0.62), 0 0 24px rgba(255, 190, 11, 0.6);
  pointer-events: none;
  transition: left 200ms ease, top 200ms ease, width 200ms ease, height 200ms ease;
}

.pv-tour-spot[hidden] {
  display: none;
}

.pv-tour-spot.is-blank {
  border: 0;
  box-shadow: 0 0 0 9999px rgba(4, 8, 14, 0.62);
  transition: none;
}

.pv-tour-spot.is-round {
  border-radius: 50%;
  animation: pv-tour-pulse 1.4s ease-in-out infinite;
}

.pv-tour-spot.is-nudge:not(.is-blank) {
  animation: pv-tour-flash 450ms ease;
}

@keyframes pv-tour-pulse {
  50% {
    box-shadow: 0 0 0 9999px rgba(4, 8, 14, 0.62), 0 0 36px rgba(255, 190, 11, 0.9);
  }
}

@keyframes pv-tour-flash {
  30% {
    border-color: #fff;
    box-shadow: 0 0 0 9999px rgba(4, 8, 14, 0.62), 0 0 0 6px rgba(255, 190, 11, 0.8), 0 0 40px rgba(255, 190, 11, 1);
  }
}

.pv-tour-hand {
  position: absolute;
  z-index: 42;
  width: 34px;
  height: 34px;
  margin: -4px 0 0 -13px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  animation: pv-tour-tap 1.1s ease-in-out infinite;
}

.pv-tour-hand[hidden] {
  display: none;
}

.pv-tour-hand.is-drag {
  animation: pv-tour-drag 2.2s ease-in-out infinite;
}

@keyframes pv-tour-tap {
  0%,
  100% {
    transform: translate(0, 10px);
  }

  45% {
    transform: translate(0, 0) scale(0.92);
  }
}

@keyframes pv-tour-drag {
  0%,
  100% {
    transform: translate(-70px, 10px);
    opacity: 0;
  }

  15%,
  80% {
    opacity: 1;
  }

  60% {
    transform: translate(70px, -10px);
  }
}

.pv-tour-bubble[hidden] {
  display: none;
}

.pv-tour-bubble {
  position: absolute;
  z-index: 43;
  width: min(340px, calc(100% - 24px));
  box-sizing: border-box;
  padding: 14px 16px 12px;
  border: 1px solid rgba(255, 190, 11, 0.5);
  border-radius: 14px;
  background: rgba(10, 16, 24, 0.96);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
}

.pv-tour-bubble.is-nudge {
  animation: pv-tour-shake 420ms ease;
}

@keyframes pv-tour-shake {
  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.pv-tour-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--pv-gold);
  font-size: 0.72rem;
  font-weight: 700;
}

.pv-tour-count i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pv-gold) var(--p), rgba(255, 255, 255, 0.14) var(--p));
}

.pv-tour-text {
  margin: 0;
  color: #eef1ee;
  font-size: 0.92rem;
  line-height: 1.65;
}

.pv-tour-text b {
  color: #ffd34d;
}

.pv-tour-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.pv-tour-actions button {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef1ee;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.pv-tour-actions .pv-tour-next {
  border-color: transparent;
  background: var(--pv-gold);
  color: #1a1300;
  font-weight: 800;
}

.pv-tour-actions .pv-tour-quit {
  margin-left: auto;
  border-color: transparent;
  background: none;
  color: var(--pv-soft);
  font-size: 0.76rem;
}

.pv-tour-wait {
  color: var(--pv-soft);
  font-size: 0.76rem;
}

.pv-tour-wait::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--pv-gold);
  vertical-align: 1px;
  animation: pv-tour-blink 1.2s ease-in-out infinite;
}

@keyframes pv-tour-blink {
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-tour-hand,
  .pv-tour-spot.is-round,
  .pv-tour-wait::before {
    animation: none;
  }
}
