#pf-preview {
  padding: 20px 8px;
  background-color: transparent;
  color-scheme: light dark;
}
#pf-hand {
  --pf-bg: light-dark(#f7f8f6, #171c1b);
  --pf-panel: light-dark(#fff, #222a27);
  --pf-ink: light-dark(#182c25, #eff5ef);
  --pf-sub: light-dark(#65746c, #a8b8ae);
  --pf-line: light-dark(#dce3dc, #3a4840);
  --pf-soft: light-dark(#e9eee8, #2b3831);
  --pf-main: light-dark(#235c43, #b4dfbc);
  --pf-on: light-dark(#fff, #172d20);
  --pf-red: light-dark(#b53743, #ff9d9f);
  --pf-blue: light-dark(#25628d, #98cbea);
  --pf-green: light-dark(#287346, #99d2a5);
  max-width: 440px;
  margin: 0 auto;
  background: var(--pf-bg);
  color: var(--pf-ink);
  border: 1px solid var(--pf-line);
  border-radius: 24px;
  overflow: hidden;
  font:
    400 15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Noto Sans JP',
    sans-serif;
  box-shadow: 0 10px 36px light-dark(#132b2010, #0003);
}
#pf-hand * {
  box-sizing: border-box;
  font-family: inherit;
}
#pf-hand button,
#pf-hand input {
  font: inherit;
  color: inherit;
}
#pf-hand button {
  min-height: 44px;
  border: 1px solid var(--pf-line);
  border-radius: 12px;
  background: var(--pf-panel);
  padding: 10px 13px;
  font-weight: 500;
}
#pf-hand button:disabled {
  opacity: 0.4;
  cursor: default;
}
#pf-hand button[aria-pressed='true'] {
  background: var(--pf-main);
  color: var(--pf-on);
  border-color: var(--pf-main);
}
#pf-hand button.pf-primary {
  background: var(--pf-main);
  color: var(--pf-on);
  border-color: var(--pf-main);
}
#pf-hand button.pf-link {
  border: 0;
  background: transparent;
  color: var(--pf-sub);
  padding: 8px 0;
}
#pf-hand button.pf-icon {
  width: 44px;
  padding: 8px;
  display: grid;
  place-items: center;
}
#pf-hand button:focus-visible,
#pf-hand input:focus-visible {
  outline: 3px solid var(--pf-blue);
  outline-offset: 2px;
}
#pf-hand .pf-chrome {
  padding: 22px 22px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
#pf-hand .pf-brand {
  letter-spacing: 2px;
  font-weight: 650;
  font-size: 14px;
}
#pf-hand .pf-brand span {
  font-weight: 400;
  color: var(--pf-sub);
}
#pf-hand .pf-prototype {
  font-size: 11px;
  color: var(--pf-sub);
  border: 1px solid var(--pf-line);
  padding: 3px 8px;
  border-radius: 99px;
}
#pf-hand .pf-progress {
  display: flex;
  gap: 4px;
  margin: 0 22px;
}
#pf-hand .pf-progress span {
  flex: 1;
  padding: 8px 0 10px;
  border-top: 3px solid var(--pf-line);
  font-size: 11px;
  color: var(--pf-sub);
}
#pf-hand .pf-progress span.pf-active {
  border-color: var(--pf-main);
  color: var(--pf-main);
  font-weight: 600;
}
#pf-content {
  padding: 16px 22px 22px;
  min-height: 430px;
}
#pf-hand h2 {
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 5px 0 22px;
  font-weight: 650;
}
#pf-hand h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 10px;
}
#pf-hand p {
  margin: 0;
}
#pf-hand .pf-small {
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
#pf-hand .pf-stack {
  display: grid;
  gap: 12px;
}
#pf-hand .pf-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
#pf-hand label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
#pf-hand .pf-field-unit {
  position: relative;
}
#pf-hand .pf-field-unit input {
  padding-right: 44px;
}
#pf-hand .pf-field-unit span {
  position: absolute;
  right: 12px;
  top: 13px;
  font-size: 14px;
  color: var(--pf-sub);
}
#pf-hand .pf-positions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
#pf-hand .pf-position {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#pf-hand .pf-position small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
}
#pf-hand .pf-footer {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
#pf-hand .pf-footer .pf-primary {
  flex: 1;
}
#pf-hand .pf-footer button.pf-back {
  flex: 0 0 70px;
}
#pf-message {
  color: var(--pf-red);
  font-size: 13px;
  padding: 0 22px 16px;
}
#pf-message:empty {
  display: none;
}
#pf-hand .pf-hand-slots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 0 22px;
}
#pf-hand .pf-slot {
  width: 64px;
  height: 82px;
  font-size: 24px;
  display: grid;
  place-items: center;
  background: var(--pf-panel);
  border: 1px dashed var(--pf-line);
  border-radius: 12px;
  font-weight: 600;
}
#pf-hand .pf-slot.pf-filled {
  border-style: solid;
}
#pf-hand .pf-spades {
  color: var(--pf-ink);
}
#pf-hand .pf-hearts {
  color: var(--pf-red);
}
#pf-hand .pf-diamonds {
  color: var(--pf-blue);
}
#pf-hand .pf-clubs {
  color: var(--pf-green);
}
#pf-hand .pf-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
#pf-hand .pf-suit {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
#pf-hand button.pf-playing-card {
  min-width: 0;
  padding: 8px 0;
  font-size: 15px;
  border-radius: 7px;
  min-height: 44px;
}
#pf-hand button.pf-playing-card[aria-pressed='true'] {
  color: var(--pf-on);
}
#pf-hand .pf-hand-caption {
  text-align: center;
  margin-bottom: 18px;
}
#pf-hand .pf-context {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--pf-line);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
#pf-hand .pf-mini-cards {
  display: flex;
  gap: 5px;
}
#pf-hand .pf-mini-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 43px;
  padding: 4px;
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
  border-radius: 7px;
  font-weight: 650;
}
#pf-hand .pf-context-copy {
  flex: 1;
}
#pf-hand .pf-context-copy strong {
  font-size: 14px;
  font-weight: 600;
}
#pf-hand .pf-pot {
  text-align: right;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-pot strong {
  display: block;
  font-size: 18px;
  color: var(--pf-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#pf-hand .pf-inferred {
  margin: 18px 0;
  color: var(--pf-sub);
  font-size: 12px;
}
#pf-hand .pf-inferred summary {
  min-height: 32px;
  padding: 5px 0;
}
#pf-hand .pf-actor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
#pf-hand .pf-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pf-soft);
  color: var(--pf-ink);
  font-size: 16px;
  font-weight: 600;
}
#pf-hand .pf-actor-title {
  font-size: 19px;
  font-weight: 600;
}
#pf-hand .pf-actor-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--pf-sub);
  margin-left: 5px;
}
#pf-hand .pf-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 20px;
}
#pf-hand .pf-action-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  font-size: 15px;
}
#pf-hand .pf-action-grid small {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}
#pf-hand .pf-raise-box {
  padding-top: 16px;
  border-top: 1px solid var(--pf-line);
}
#pf-hand .pf-presets {
  display: flex;
  gap: 6px;
  margin: 9px 0;
}
#pf-hand .pf-presets button {
  flex: 1;
  padding: 8px 4px;
  font-size: 13px;
}
#pf-hand .pf-full {
  width: 100%;
  margin-top: 4px;
}
#pf-hand .pf-ledger {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
#pf-hand .pf-ledger li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pf-line);
  font-size: 13px;
}
#pf-hand .pf-ledger .pf-seat-label {
  width: 44px;
  font-weight: 600;
}
#pf-hand .pf-ledger .pf-entry {
  flex: 1;
}
#pf-hand .pf-ledger .pf-amount {
  font-variant-numeric: tabular-nums;
}
#pf-hand .pf-hero-tag {
  font-size: 11px;
  color: var(--pf-main);
}
#pf-hand .pf-review-box {
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
  border-radius: 16px;
  padding: 18px;
}
#pf-hand .pf-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#pf-hand .pf-review-top .pf-hand-slots {
  margin: 0;
}
#pf-hand .pf-review-top strong {
  font-size: 21px;
  font-weight: 600;
}
#pf-hand .pf-review-meta {
  margin-top: 18px;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-pot-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 4px;
  font-size: 15px;
}
#pf-hand .pf-pot-total strong {
  font-weight: 600;
}
#pf-hand .pf-done-mark {
  width: 68px;
  height: 68px;
  background: var(--pf-soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 20px auto;
  color: var(--pf-main);
  font-size: 28px;
}
#pf-hand .pf-success {
  text-align: center;
}
#pf-hand .pf-success h2 {
  margin-bottom: 12px;
}
#pf-hand .pf-success .pf-small {
  margin-bottom: 24px;
}
@media (max-width: 380px) {
  #pf-content {
    padding: 14px 14px 20px;
  }
  #pf-hand .pf-chrome {
    padding: 18px 14px 12px;
  }
  #pf-hand .pf-progress {
    margin: 0 14px;
  }
  #pf-hand .pf-suit {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  #pf-hand h2 {
    font-size: 21px;
  }
  #pf-preview {
    padding: 12px 0;
  }
}

#pf-hand .pf-table {
  position: relative;
  height: 272px;
  margin: 14px 0 22px;
  isolation: isolate;
}
#pf-hand .pf-felt {
  position: absolute;
  inset: 35px 25px;
  border-radius: 48%;
  background: var(--pf-soft);
  border: 7px solid var(--pf-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--pf-sub);
  font-size: 12px;
}
#pf-hand .pf-felt strong {
  font-size: 19px;
  color: var(--pf-ink);
  font-weight: 600;
}
#pf-hand button.pf-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 66px;
  min-height: 51px;
  padding: 5px 2px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 5px light-dark(#182b2510, #0003);
}
#pf-hand .pf-seat small {
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}
#pf-hand .pf-seat:disabled {
  opacity: 1;
}
#pf-hand .pf-seat.pf-folded {
  opacity: 0.45;
  box-shadow: none;
}
#pf-hand .pf-seat.pf-turn {
  outline: 2px solid var(--pf-main);
  outline-offset: 3px;
}
#pf-hand .pf-seat.pf-self:after {
  content: '自分';
  position: absolute;
  top: -16px;
  font-size: 10px;
  color: var(--pf-main);
  font-weight: 600;
}
#pf-hand .pf-table.pf-nine {
  height: 334px;
}
#pf-hand .pf-table.pf-nine button.pf-seat {
  width: 59px;
  min-height: 48px;
  font-size: 12px;
}
#pf-hand .pf-mode {
  display: flex;
  background: var(--pf-soft);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
  margin: 16px 0;
}
#pf-hand .pf-mode button {
  flex: 1;
  background: transparent;
  border: 0;
  font-size: 13px;
  padding: 8px 5px;
}
#pf-hand .pf-mode button[aria-pressed='true'] {
  background: var(--pf-panel);
  color: var(--pf-ink);
  box-shadow: 0 1px 4px light-dark(#182c2515, #0003);
}
#pf-hand .pf-range {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 2px;
  margin: 12px 0;
}
#pf-hand button.pf-range-cell {
  min-width: 0;
  min-height: 26px;
  padding: 4px 0;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.7px;
}
#pf-hand button.pf-range-cell.pf-suited {
  background: var(--pf-soft);
}
#pf-hand button.pf-range-cell.pf-pair {
  background: var(--pf-main);
  color: var(--pf-on);
  border-color: var(--pf-main);
}
#pf-hand button.pf-range-cell[aria-pressed='true'] {
  outline: 2px solid var(--pf-blue);
  outline-offset: 0;
}
#pf-hand .pf-range.pf-zoomed {
  gap: 5px;
}
#pf-hand .pf-range.pf-zoomed button {
  min-height: 46px;
  font-size: 14px;
  letter-spacing: 0;
  border-radius: 7px;
}
#pf-hand .pf-zoom-controls {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
#pf-hand .pf-zoom-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-zoom-row button {
  flex: 1;
  padding: 8px 2px;
  font-size: 12px;
}
#pf-hand .pf-combos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}
#pf-hand .pf-combos button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 5px;
  min-height: 51px;
}
#pf-hand .pf-combos button[aria-pressed='true'] .pf-mini-card {
  background: var(--pf-panel);
}
#pf-hand .pf-combos button .pf-mini-card {
  height: 34px;
  min-width: 32px;
  font-size: 14px;
}
#pf-hand .pf-board-slots {
  display: flex;
  gap: 5px;
  margin: 14px 0 20px;
  justify-content: center;
  flex-wrap: wrap;
}
#pf-hand .pf-board-slots button {
  padding: 0;
  min-width: 42px;
  min-height: 54px;
  border-style: dashed;
}
#pf-hand .pf-board-slots button:nth-child(4),
#pf-hand .pf-board-slots button:nth-child(5) {
  margin-left: 5px;
}
#pf-hand .pf-board-slots button .pf-mini-card {
  border: 0;
  background: transparent;
}
#pf-hand .pf-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 18px 0 8px;
}
#pf-hand .pf-title-row h3 {
  margin: 0;
}
#pf-hand textarea,
#pf-hand select {
  width: 100%;
  min-height: 47px;
  font: inherit;
  font-size: 16px;
  background: var(--pf-panel);
  color: var(--pf-ink);
  border: 1px solid var(--pf-line);
  border-radius: 11px;
  padding: 10px;
  box-sizing: border-box;
}
#pf-hand textarea {
  min-height: 100px;
  resize: vertical;
}
#pf-hand .pf-memo {
  font:
    400 13px/1.8 ui-monospace,
    SFMono-Regular,
    'Noto Sans JP',
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 14px 0 0;
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
  border-radius: 14px;
  padding: 17px;
}
#pf-hand .pf-end-state {
  padding: 13px 0;
  font-size: 15px;
  font-weight: 600;
}
#pf-hand .pf-round-board {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}
#pf-hand .pf-picker-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin: 15px 0;
}
#pf-hand .pf-picker-top .pf-mini-cards {
  min-height: 44px;
  align-items: center;
}
#pf-hand .pf-picker-top .pf-small {
  white-space: nowrap;
}
#pf-hand .pf-minor {
  display: block;
  margin: 16px 0;
}
#pf-hand .pf-inferred summary {
  min-height: 44px;
}
@media (max-width: 380px) {
  #pf-hand button.pf-range-cell {
    font-size: 11px;
    min-height: 24px;
  }
  #pf-hand .pf-range.pf-zoomed button {
    font-size: 13px;
    min-height: 46px;
  }
  #pf-hand .pf-seat.pf-self:after {
    top: -15px;
  }
  #pf-hand .pf-board-slots {
    gap: 3px;
  }
  #pf-hand .pf-board-slots button {
    min-width: 39px;
  }
}
#pf-hand .pf-suit-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
#pf-hand button.pf-suit-option {
  min-height: 48px;
  font-size: 24px;
  padding: 4px;
}
#pf-hand .pf-suit-rows {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
#pf-hand .pf-suit-label {
  margin-bottom: 5px;
}
#pf-hand .pf-raise-preview {
  padding: 12px 0 17px;
}
#pf-hand .pf-raise-preview > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}
#pf-hand .pf-raise-preview strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#pf-hand .pf-raise-preview small {
  font-size: 12px;
  font-weight: 400;
  color: var(--pf-sub);
}

:root {
  color-scheme: light dark;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Noto Sans JP',
    sans-serif;
  background: light-dark(#edf1ec, #101613);
  color: light-dark(#182c25, #eff5ef);
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
#pf-preview {
  padding: 24px 12px 56px;
}
#pf-hand {
  max-width: 480px;
  box-shadow: 0 14px 60px light-dark(#1532240c, #0004);
  border-radius: 22px;
}
#pf-hand .pf-chrome {
  position: relative;
  padding: 16px 22px 10px;
}
#pf-hand button.pf-brand {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 44px;
  border-radius: 0;
  letter-spacing: 2px;
}
#pf-hand .pf-home-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
}
#pf-hand .pf-home-heading h2 {
  font-size: 23px;
  margin: 6px 0 0;
}
#pf-hand .pf-count {
  font-size: 12px;
  color: var(--pf-sub);
  white-space: nowrap;
}
#pf-hand .pf-home-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
#pf-hand .pf-home-actions .pf-primary {
  flex: 1;
  min-height: 54px;
}
#pf-hand .pf-saved-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
#pf-hand button.pf-saved-hand {
  text-align: left;
  border-radius: 16px;
  padding: 16px;
  font-weight: 400;
}
#pf-hand .pf-saved-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
#pf-hand .pf-saved-main > .pf-small {
  flex: 1;
}
#pf-hand .pf-review-snippet {
  font-size: 12px;
  color: var(--pf-sub);
  margin-top: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pf-hand .pf-notice {
  padding: 12px 14px;
  background: var(--pf-soft);
  border-radius: 12px;
  font-size: 13px;
  margin: 0 0 18px;
}
#pf-hand .pf-notice .pf-row {
  margin-top: 12px;
}
#pf-hand .pf-empty {
  text-align: center;
  padding: 28px 0 46px;
}
#pf-hand .pf-empty h3 {
  margin: 10px 0;
}
#pf-hand .pf-empty-symbol {
  font-size: 38px;
  color: var(--pf-main);
  opacity: 0.65;
}
#pf-hand .pf-storage-note {
  font-size: 11px;
  color: var(--pf-sub);
  text-align: center;
  margin-top: 34px;
}
#pf-hand .pf-storage-note summary {
  cursor: pointer;
  min-height: 32px;
  list-style-position: inside;
}
#pf-hand .pf-storage-note p {
  text-align: left;
  line-height: 1.6;
  margin: 8px 0 0;
}
/* Folded by default so that people who never used the old page are not slowed down. */
#pf-hand .pf-restore-hint summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 24px;
}
#pf-hand .pf-restore-hint[open] summary {
  margin-bottom: 4px;
}
#pf-hand .pf-restore-hint p,
#pf-hand .pf-move-notice p {
  margin: 6px 0 0;
  line-height: 1.6;
}
/* Home screen only: recording screens size themselves to the viewport. */
#pf-hand:not(.pf-home-view) .pf-move-notice {
  display: none;
}
#pf-hand .pf-move-notice {
  margin: 12px 16px 0;
  border: 1px solid var(--pf-main);
}
#pf-hand .pf-move-notice .pf-row {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#pf-hand .pf-move-link {
  color: var(--pf-main);
  font-weight: 600;
}
#pf-hand .pf-backup-menu {
  position: relative;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-backup-menu summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
#pf-hand .pf-backup-menu > .pf-stack {
  position: absolute;
  right: 0;
  top: 40px;
  min-width: 150px;
  padding: 8px;
  z-index: 3;
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
  border-radius: 12px;
}
#pf-hand .pf-detail-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 20px 0;
}
#pf-hand .pf-detail-header h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
#pf-hand .pf-detail-tools {
  justify-content: flex-start;
  margin: 18px 0;
}
#pf-hand .pf-review-editor {
  margin-top: 24px;
}
#pf-hand .pf-review-editor textarea {
  min-height: 110px;
}
#pf-hand button.pf-seat.pf-folded:disabled {
  opacity: 0.45;
}
#pf-hand .pf-table {
  height: 240px;
}
#pf-hand .pf-table.pf-nine {
  height: 306px;
}
#pf-content {
  min-height: 350px;
}
#pf-hand .pf-ledger .pf-seat-label {
  min-width: 45px;
  width: auto;
}
#pf-hand .pf-ledger .pf-entry {
  min-width: 0;
}
#pf-hand .pf-ledger .pf-amount {
  white-space: nowrap;
  font-size: 12px;
}
#pf-hand .pf-suit-option[aria-pressed='true'] {
  color: var(--pf-on);
}
#pf-hand .pf-saved-hand .pf-mini-cards {
  flex-shrink: 0;
}
@media (max-width: 520px) {
  #pf-preview {
    padding: 0 0 40px;
  }
  #pf-hand {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    min-height: 100svh;
  }
  #pf-content {
    padding: 16px 18px 24px;
  }
  #pf-hand .pf-chrome {
    padding-left: 18px;
    padding-right: 18px;
  }
  #pf-hand .pf-home-heading {
    gap: 5px;
  }
  #pf-hand .pf-home-heading h2 {
    font-size: 21px;
  }
}
@media (max-width: 360px) {
  #pf-content {
    padding-left: 12px;
    padding-right: 12px;
  }
  #pf-hand .pf-chrome {
    padding-left: 12px;
    padding-right: 12px;
  }
  #pf-hand .pf-home-heading h2 {
    font-size: 19px;
  }
  #pf-hand .pf-saved-main {
    gap: 7px;
  }
  #pf-hand .pf-saved-main > .pf-small {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #pf-hand button {
    transition:
      background-color 0.12s ease,
      opacity 0.12s ease;
  }
}
#pf-hand [hidden] {
  display: none !important;
}
body {
  min-width: 0;
}
#pf-hand .pf-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 4px 18px 12px;
}
#pf-hand button.pf-phase-tab {
  min-width: 0;
  min-height: 40px;
  padding: 6px 1px;
  border-radius: 7px;
  border: 0;
  background: var(--pf-soft);
  color: var(--pf-sub);
  font-size: 11px;
}
#pf-hand button.pf-phase-tab[aria-current='step'] {
  background: var(--pf-main);
  color: var(--pf-on);
}
#pf-hand button.pf-phase-tab:disabled {
  opacity: 0.35;
}
#pf-hand .pf-table {
  margin-bottom: 56px;
  height: 274px;
}
#pf-hand .pf-table.pf-nine {
  height: 320px;
}
#pf-hand .pf-seat-wrap {
  position: absolute;
  width: 66px;
  transform: translate(-50%, -50%);
  z-index: 1;
}
#pf-hand .pf-seat-wrap button.pf-seat {
  position: relative;
  transform: none;
  left: auto;
  top: auto;
  width: 66px;
}
#pf-hand .pf-nine .pf-seat-wrap {
  width: 59px;
}
#pf-hand .pf-nine .pf-seat-wrap button.pf-seat {
  width: 59px;
}
#pf-hand .pf-seat-cards {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
}
#pf-hand .pf-seat-cards .pf-mini-card {
  min-width: 25px;
  height: 32px;
  padding: 2px;
  font-size: 12px;
  background: var(--pf-panel);
  box-shadow: 0 2px 5px light-dark(#18302818, #0004);
}
#pf-hand .pf-felt {
  gap: 4px;
}
#pf-hand .pf-table-board {
  display: flex;
  gap: 3px;
  justify-content: center;
  flex-wrap: nowrap;
  min-height: 16px;
}
#pf-hand .pf-table-board:empty {
  display: none;
}
#pf-hand .pf-table-board .pf-mini-card {
  min-width: 25px;
  height: 36px;
  padding: 3px 1px;
  font-size: 13px;
}
#pf-hand button.pf-table-edit {
  font-size: 11px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  margin-top: 3px;
}
#pf-hand button[data-action='fold'] {
  background: light-dark(#285f9e, #9fc9ff);
  border-color: light-dark(#285f9e, #9fc9ff);
  color: light-dark(#fff, #112b47);
}
#pf-hand button[data-action='check'],
#pf-hand button[data-action='call'] {
  background: light-dark(#236844, #afe0bd);
  border-color: light-dark(#236844, #afe0bd);
  color: light-dark(#fff, #173323);
}
#pf-hand button[data-action='bet'],
#pf-hand button[data-action='raise'] {
  background: light-dark(#b33946, #ffa8ad);
  border-color: light-dark(#b33946, #ffa8ad);
  color: light-dark(#fff, #45161b);
}
#pf-hand .pf-board-editor,
#pf-hand .pf-edit-prompt {
  padding: 18px 0;
  margin-top: 20px;
  border-top: 1px solid var(--pf-line);
  scroll-margin-top: 14px;
}
#pf-hand .pf-board-editor h3,
#pf-hand .pf-edit-prompt h3 {
  margin: 0 0 10px;
}
#pf-hand .pf-editor-footer,
#pf-hand .pf-edit-prompt .pf-row {
  margin-top: 16px;
}
#pf-hand .pf-edit-prompt {
  background: var(--pf-soft);
  padding: 16px;
  border-radius: 14px;
}
@media (max-width: 360px) {
  #pf-hand .pf-progress {
    margin-left: 12px;
    margin-right: 12px;
  }
  #pf-hand .pf-table-board .pf-mini-card {
    min-width: 23px;
    font-size: 12px;
  }
  #pf-hand .pf-table.pf-nine {
    height: 330px;
  }
}
@media (max-width: 360px) {
  #pf-hand .pf-table-board {
    gap: 2px;
  }
  #pf-hand .pf-table-board .pf-mini-card {
    min-width: 20px;
    height: 32px;
    padding: 2px 0;
    font-size: 11px;
  }
}

/* Compact action entry: table first, optional detail on demand. */
#pf-hand.pf-actions-view .pf-chrome {
  padding-top: 2px;
  padding-bottom: 0;
}
#pf-hand.pf-actions-view .pf-progress {
  margin-top: 0;
  margin-bottom: 2px;
}
#pf-hand.pf-actions-view #pf-content {
  padding-top: 12px;
}
#pf-hand.pf-actions-view .pf-table {
  height: 224px;
  margin-top: 22px;
  margin-bottom: 36px;
}
#pf-hand.pf-actions-view .pf-table.pf-nine {
  height: 276px;
}
#pf-hand .pf-table-meta {
  position: absolute;
  left: 0;
  top: -20px;
  display: grid;
  gap: 1px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--pf-sub);
  font-variant-numeric: tabular-nums;
}
#pf-hand button.pf-table-undo {
  position: absolute;
  right: 0;
  top: -24px;
  min-height: 40px;
  padding: 7px 9px;
  font-size: 12px;
  z-index: 2;
  background: transparent;
  border: 0;
}
#pf-hand.pf-actions-view .pf-felt {
  gap: 0;
}
#pf-hand .pf-table-pot small {
  font-size: 11px;
  font-weight: 400;
}
#pf-hand .pf-table-street {
  font-size: 11px;
}
#pf-hand button.pf-board-tap {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 5px;
  display: flex;
  align-items: center;
}
#pf-hand .pf-unknown-card {
  border-style: dashed;
  color: var(--pf-sub);
  font-weight: 400;
}
#pf-hand .pf-action-caption {
  font-size: 12px;
  color: var(--pf-sub);
  margin: 0 0 4px;
}
#pf-hand.pf-actions-view .pf-action-grid {
  margin: 0 0 10px;
}
#pf-hand.pf-actions-view .pf-action-grid button {
  min-height: 52px;
  padding: 6px;
}
#pf-hand.pf-actions-view .pf-raise-box {
  padding-top: 8px;
}
#pf-hand .pf-raise-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
#pf-hand .pf-amount-controls {
  display: grid;
  gap: 5px;
  align-items: center;
}
#pf-hand .pf-amount-controls input {
  min-height: 44px;
  height: 44px;
  padding: 8px 28px 8px 8px;
  font-size: 17px;
}
#pf-hand .pf-amount-controls .pf-field-unit span {
  top: 11px;
  right: 9px;
  font-size: 12px;
}
#pf-hand .pf-amount-controls > button {
  min-width: 0;
  min-height: 44px;
  padding: 6px 2px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
#pf-hand.pf-actions-view .pf-raise-preview {
  padding: 3px 0 5px;
}
#pf-hand .pf-total-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  font-size: 12px;
  cursor: pointer;
}
#pf-hand .pf-total-details summary > span::after {
  content: ' ⌄';
  color: var(--pf-sub);
}
#pf-hand .pf-total-details[open] summary > span::after {
  content: ' ⌃';
}
#pf-hand.pf-actions-view button.pf-full {
  min-height: 44px;
  margin-top: 0;
}
#pf-hand .pf-action-history {
  margin-top: 9px;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-action-history > summary {
  min-height: 40px;
  padding: 10px 0;
  cursor: pointer;
}
#pf-hand .pf-action-history .pf-inferred {
  margin: 0;
}
#pf-hand .pf-action-history .pf-ledger {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--pf-ink);
}
#pf-hand .pf-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: #10251c70;
  z-index: 100;
}
#pf-hand .pf-board-editor {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  max-height: min(85dvh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 101;
  background: var(--pf-panel);
  padding: 0 14px;
  border: 1px solid var(--pf-line);
  border-radius: 18px 18px 0 0;
  margin: 0;
  box-shadow: 0 -8px 36px #0002;
}
#pf-hand .pf-board-editor > .pf-row:first-child {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--pf-panel);
  min-height: 52px;
  padding-top: 4px;
  border-bottom: 1px solid var(--pf-line);
}
#pf-hand .pf-board-editor h3 {
  margin: 0;
}
#pf-hand .pf-board-editor .pf-deck {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
#pf-hand .pf-board-editor .pf-board-slots {
  margin: 12px 0;
}
#pf-hand .pf-board-editor .pf-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--pf-panel);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  margin-top: 10px;
  border-top: 1px solid var(--pf-line);
  gap: 6px;
  flex-wrap: nowrap;
}
#pf-hand .pf-board-editor .pf-editor-footer button {
  font-size: 12px;
  padding: 9px 8px;
}
@media (max-width: 360px) {
  #pf-hand .pf-board-editor .pf-deck {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  #pf-hand .pf-table-meta {
    font-size: 10px;
  }
  #pf-hand .pf-amount-controls {
    gap: 4px;
  }
}
#pf-hand .pf-editor-error {
  font-size: 12px;
  color: var(--pf-red);
  margin-top: 8px;
}
#pf-hand .pf-editor-error:empty {
  display: none;
}
#pf-hand.pf-actions-view {
  box-sizing: border-box;
}
@media (max-width: 520px) {
  body:has(#pf-hand.pf-actions-view) #pf-preview {
    padding-bottom: 0;
  }
}
#pf-hand.pf-actions-view .pf-table:not(.pf-nine):has([data-seat$=':BTN'].pf-self) {
  margin-bottom: 44px;
}
#pf-sync-status {
  margin: 8px 18px;
  font-size: 12px;
}
#pf-sync-status .pf-row {
  gap: 6px;
}
#pf-sync-status button {
  font-size: 12px;
  padding: 8px;
}

/* Board arrangement experiments share one card-selection path. */
#pf-hand .pf-board-picker {
  min-width: 0;
}
#pf-hand label.pf-board-layout-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
}
#pf-hand .pf-board-layout-label select {
  width: auto;
  max-width: calc(100% - 40px);
  min-height: 40px;
  height: 40px;
  padding: 5px 28px 5px 10px;
  font-size: 13px;
}
#pf-hand .pf-board-cards {
  display: grid;
  gap: 4px;
}
#pf-hand .pf-board-seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
#pf-hand .pf-board-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#pf-hand button.pf-board-choice {
  min-width: 0;
  min-height: 44px;
  padding: 4px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#pf-hand .pf-board-choice > span + span {
  font-size: 12px;
}
#pf-hand .pf-suit-block + .pf-suit-block {
  margin-top: 8px;
}
#pf-hand .pf-suit-block-label {
  font-size: 12px;
  margin: 0 0 3px;
}
#pf-hand .pf-board-suits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
#pf-hand .pf-board-suits button {
  padding: 4px;
  min-height: 44px;
  font-size: 22px;
}
#pf-hand .pf-board-matrix {
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 5px 2px;
}
#pf-hand .pf-board-matrix button.pf-board-choice {
  min-height: 50px;
  border-radius: 3px;
  font-size: 13px;
}
#pf-hand .pf-board-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  max-width: 100%;
  padding-bottom: 8px;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
}
#pf-hand .pf-board-scroll-matrix {
  display: grid;
  width: max-content;
  grid-template-columns: 28px repeat(13, 44px);
  grid-template-rows: repeat(4, 56px);
  gap: 6px 4px;
  isolation: isolate;
}
#pf-hand .pf-board-scroll-matrix button.pf-board-choice {
  width: 44px;
  height: 56px;
  font-size: 16px;
}
#pf-hand .pf-board-suit-fixed {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--pf-panel);
  box-shadow: 4px 0 0 var(--pf-panel);
  display: grid;
  place-items: center;
  font-size: 18px;
}
#pf-hand .pf-board-editor .pf-board-picker {
  margin-top: 8px;
}
#pf-hand .pf-board-editor .pf-editor-footer {
  z-index: 3;
}
@media (max-width: 360px) {
  #pf-hand .pf-board-matrix {
    column-gap: 1px;
  }
  #pf-hand .pf-board-matrix button.pf-board-choice {
    font-size: 12px;
  }
}

/* Give hand selection readable rows; shorter viewports can scroll naturally. */
#pf-hand.pf-hand-view {
  box-sizing: border-box;
  --pf-range-row: clamp(28px, calc((100svh - 350px) / 13), 34px);
}
#pf-hand.pf-hand-view .pf-chrome {
  padding-top: 0;
  padding-bottom: 0;
}
#pf-hand.pf-hand-view .pf-progress {
  margin-top: 0;
  margin-bottom: 2px;
}
#pf-hand.pf-hand-view #pf-content {
  min-height: 0;
  padding-top: 5px;
  padding-bottom: 10px;
}
#pf-hand .pf-picker-modebar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-bottom: 4px;
}
#pf-hand .pf-picker-position {
  font-size: 12px;
  color: var(--pf-sub);
  min-width: 24px;
}
#pf-hand .pf-picker-modes {
  display: flex;
  gap: 3px;
  flex: 1;
  background: var(--pf-soft);
  padding: 2px;
  border-radius: 10px;
}
#pf-hand .pf-picker-modes button {
  min-height: 36px;
  flex: 1;
  border: 0;
  padding: 5px 4px;
  background: transparent;
  font-size: 12px;
}
#pf-hand .pf-picker-modes button[aria-pressed='true'] {
  background: var(--pf-panel);
  color: var(--pf-ink);
}
#pf-hand button.pf-range-zoom {
  min-height: 40px;
  min-width: 44px;
  font-size: 12px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--pf-sub);
}
#pf-hand .pf-hand-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  margin: 4px 0;
  font-size: 14px;
}
#pf-hand .pf-hand-choice strong {
  font-weight: 600;
}
#pf-hand .pf-hand-choice .pf-mini-cards {
  min-height: 32px;
}
#pf-hand .pf-hand-choice button.pf-card-remove {
  min-height: 32px;
  padding: 0;
}
#pf-hand .pf-hand-choice .pf-mini-card {
  min-width: 26px;
  height: 30px;
  padding: 2px;
  font-size: 12px;
}
#pf-hand .pf-hand-suit-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
#pf-hand .pf-suit-rank {
  font-size: 13px;
  text-align: center;
}
#pf-hand .pf-hand-picker .pf-suit-rows {
  gap: 6px;
  margin-top: 0;
}
#pf-hand .pf-hand-picker .pf-suit-options {
  gap: 6px;
}
#pf-hand .pf-hand-picker button.pf-suit-option {
  height: 44px;
  min-height: 44px;
  padding: 4px;
  font-size: 22px;
}
#pf-hand .pf-range-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0;
}
#pf-hand .pf-range-zones label {
  display: flex;
  align-items: center;
  gap: 6px;
}
#pf-hand .pf-range-zones select {
  min-height: 36px;
  height: 36px;
  font-size: 12px;
  padding: 4px 8px;
}
#pf-hand.pf-hand-view .pf-range {
  gap: 1px;
  margin: 5px 0;
  grid-auto-rows: var(--pf-range-row);
}
#pf-hand.pf-hand-view button.pf-range-cell {
  min-height: 0;
  height: 100%;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  border-radius: 2px;
  letter-spacing: -0.6px;
}
#pf-hand.pf-hand-view .pf-range.pf-zoomed {
  gap: 4px;
  grid-auto-rows: clamp(44px, calc((100svh - 350px) / 5), 52px);
}
#pf-hand.pf-hand-view .pf-range.pf-zoomed button.pf-range-cell {
  min-height: 0;
  height: 100%;
  font-size: 14px;
  border-radius: 6px;
}
#pf-hand.pf-hand-view .pf-footer {
  margin-top: 8px;
  gap: 8px;
}
#pf-hand.pf-hand-view .pf-footer button {
  min-height: 44px;
  padding: 8px;
  font-size: 13px;
}
@media (max-width: 520px) {
  body:has(#pf-hand.pf-hand-view) #pf-preview {
    padding-bottom: 0;
  }
}

/* Bound grid items themselves; clipping only the parent hid the overflowing card. */
#pf-hand .pf-saved-list {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
#pf-hand button.pf-saved-hand {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
#pf-hand .pf-saved-hand > .pf-row {
  min-width: 0;
}
#pf-hand .pf-saved-hand > .pf-row > .pf-small:first-child {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pf-hand .pf-saved-hand > .pf-row > .pf-small:last-child {
  flex-shrink: 0;
}
#pf-hand .pf-saved-main {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  gap: 8px;
}
#pf-hand .pf-saved-main > .pf-small {
  overflow-wrap: anywhere;
}
#pf-hand .pf-review-snippet {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  max-width: 100%;
  min-width: 0;
}
#pf-hand .pf-edit-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--pf-main);
  margin-top: 8px;
}
#pf-hand .pf-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 16px;
}
#pf-hand .pf-detail-title h2 {
  font-size: 20px;
  margin: 0;
}
#pf-hand .pf-detail-title button {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 12px;
  flex-shrink: 0;
}
#pf-hand .pf-text-memo {
  margin: 14px 0;
  font-size: 12px;
  color: var(--pf-sub);
  min-width: 0;
}
#pf-hand .pf-text-memo > summary {
  min-height: 44px;
  padding: 10px 0;
}
#pf-hand .pf-text-memo .pf-memo {
  color: var(--pf-ink);
  max-width: 100%;
}
#pf-hand .pf-text-memo .pf-detail-tools {
  margin: 8px 0;
}
#pf-hand .pf-review-editor {
  display: block;
}

/* Native date editors must shrink with their grid tracks, including WebKit. */
#pf-hand label {
  min-width: 0;
  max-width: 100%;
}
#pf-hand .pf-stack {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
#pf-hand input[type='date'],
#pf-hand input[type='datetime-local'] {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  min-inline-size: 0;
  width: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;
}
#pf-hand input::-webkit-date-and-time-value {
  min-width: 0;
  min-height: 1.5em;
  text-align: left;
}
#pf-hand input::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
}
/* Keep upper-seat cards outside the felt; reserve space above for cards/meta. */
#pf-hand .pf-seat-upper .pf-seat-cards {
  top: auto;
  bottom: calc(100% + 5px);
}
#pf-hand .pf-table:has(.pf-seat-upper .pf-seat-cards) {
  margin-top: 54px;
}
#pf-hand .pf-table:has(.pf-seat-upper .pf-seat-cards) .pf-table-meta {
  top: -50px;
}
#pf-hand .pf-table:has(.pf-seat-upper .pf-seat-cards) .pf-table-undo {
  top: -54px;
}
/* Read-only table replay reuses the seat/board geometry, without editing routes. */
#pf-hand.pf-detail-view .pf-chrome {
  padding-top: 2px;
  padding-bottom: 0;
}
#pf-hand .pf-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 11px;
  color: var(--pf-sub);
  margin-bottom: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#pf-hand .pf-detail-meta time {
  flex-shrink: 0;
}
#pf-hand .pf-detail-meta span {
  min-width: 0;
}
#pf-hand .pf-replay {
  min-width: 0;
}
#pf-hand .pf-replay-streets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
#pf-hand .pf-replay-streets button {
  padding: 6px 2px;
  font-size: 12px;
  min-width: 0;
}
#pf-hand .pf-replay .pf-table {
  height: 224px;
  margin-top: 30px;
  margin-bottom: 44px;
}
#pf-hand .pf-replay .pf-table.pf-nine {
  height: 276px;
}
#pf-hand .pf-replay .pf-table:has(.pf-seat-upper .pf-seat-cards) {
  margin-top: 54px;
}
#pf-hand .pf-replay .pf-seat {
  width: 66px;
  min-height: 51px;
  padding: 5px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 500;
}
#pf-hand .pf-replay .pf-nine .pf-seat {
  width: 59px;
  min-height: 48px;
  font-size: 12px;
}
#pf-hand .pf-replay .pf-table-board {
  min-height: 44px;
  align-items: center;
}
#pf-hand .pf-replay .pf-felt {
  gap: 0;
}
#pf-hand .pf-replay-action {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  overflow-wrap: anywhere;
  padding: 4px 0;
}
#pf-hand .pf-replay-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
#pf-hand .pf-replay-controls button {
  padding: 8px;
}
#pf-hand .pf-review-summary {
  margin-top: 16px;
}
#pf-hand .pf-review-summary > summary {
  font-size: 13px;
  min-height: 44px;
  padding: 10px 0;
  color: var(--pf-sub);
}
#pf-hand .pf-seat-upper .pf-self:after {
  top: auto;
  bottom: -16px;
}
#pf-hand .pf-replay .pf-seat {
  position: relative;
}
#pf-hand .pf-replay .pf-table.pf-upper-space {
  margin-top: 54px;
}
#pf-hand .pf-replay .pf-upper-space .pf-table-meta {
  top: -50px;
}
#pf-hand .pf-replay .pf-table {
  margin-bottom: 16px;
}
#pf-hand .pf-replay .pf-table.pf-bottom-space {
  margin-bottom: 44px;
}

/* A table context is chosen before hand entry, then reused without extra phases. */
#pf-hand button.pf-current-table {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  text-align: left;
  gap: 2px 10px;
  margin-bottom: 14px;
  padding: 12px;
  min-width: 0;
}
#pf-hand .pf-current-table > span {
  font-size: 12px;
  color: var(--pf-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#pf-hand .pf-current-table > strong {
  font-size: 14px;
  font-weight: 600;
  grid-column: 1;
}
#pf-hand .pf-current-table > small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 11px;
  color: var(--pf-sub);
}
#pf-hand .pf-rake-settings > summary,
#pf-hand .pf-preset-editor > summary {
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--pf-sub);
}
#pf-hand .pf-rake-settings .pf-fields {
  margin: 8px 0 0;
}
#pf-hand .pf-preset-editor .pf-row {
  margin-top: 10px;
}
#pf-hand .pf-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#pf-hand .pf-hand-context {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}
#pf-hand .pf-hand-context > div {
  width: 130px;
  min-width: 0;
}
#pf-hand .pf-hand-context > .pf-link {
  font-size: 11px;
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
#pf-hand input[type='time'] {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  min-inline-size: 0;
  width: 100%;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;
}
/* Opening the red action is not itself a recorded action. */
#pf-hand .pf-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
#pf-hand .pf-action-grid button {
  min-width: 0;
  padding: 6px 3px;
  font-size: 13px;
}
#pf-hand button[data-amount-open] {
  background: light-dark(#b33946, #ffa8ad);
  border-color: light-dark(#b33946, #ffa8ad);
  color: light-dark(#fff, #45161b);
}
/* Amount entry is a regular page: no fixed overlay, scroll lock or keyboard tracking. */
#pf-hand.pf-amount-view .pf-chrome {
  display: none;
}
#pf-hand.pf-amount-view #pf-content {
  min-height: 0;
  padding-top: 12px;
}
#pf-hand .pf-amount-editor {
  position: static;
  width: 100%;
  padding: 0;
  border: 0;
  box-shadow: none;
  transform: none;
  outline: none;
}
#pf-hand .pf-amount-editor h3 {
  margin: 0;
  font-size: 17px;
}
#pf-hand .pf-amount-editor .pf-raise-box {
  border: 0;
  padding-top: 12px;
}
#pf-hand .pf-amount-editor .pf-full {
  margin-top: 12px;
  min-height: 48px;
}
#pf-hand .pf-amount-editor .pf-amount-error {
  font-size: 12px;
  color: var(--pf-red);
  margin-top: 8px;
}
#pf-hand .pf-amount-error:empty {
  display: none;
}
#pf-hand.pf-setup-view .pf-chrome {
  padding-top: 4px;
  padding-bottom: 0;
}
#pf-hand.pf-setup-view #pf-content {
  padding-top: 12px;
}
#pf-hand.pf-setup-view h2 {
  font-size: 21px;
  margin-bottom: 14px;
}
#pf-hand.pf-setup-view .pf-stack {
  gap: 10px;
}
#pf-hand.pf-setup-view .pf-fields {
  margin-bottom: 0;
}
#pf-hand.pf-setup-view .pf-footer {
  margin-top: 16px;
}
#pf-amount-form {
  width: 100%;
}
#pf-hand .pf-amount-heading {
  gap: 10px;
  margin-bottom: 4px;
}
#pf-hand .pf-amount-heading .pf-link {
  min-height: 44px;
  white-space: nowrap;
}
#pf-hand .pf-amount-body {
  overflow: visible;
}
#pf-hand .pf-amount-footer .pf-amount-error {
  margin: 6px 0 0;
}
#pf-hand .pf-amount-footer .pf-amount-error:empty {
  display: none;
}
#pf-hand .pf-amount-footer .pf-full {
  margin-top: 8px;
}
#pf-hand button[data-amount-submit] {
  background: light-dark(#b33946, #ffa8ad);
  border-color: light-dark(#b33946, #ffa8ad);
  color: light-dark(#fff, #45161b);
}
#pf-hand .pf-chrome-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
#pf-hand .pf-preferences-link {
  background: transparent;
  border: 0;
  padding: 8px 10px;
  min-height: 44px;
  font-size: 13px;
  color: var(--pf-sub);
}
#pf-hand .pf-setting-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  cursor: pointer;
}
#pf-hand .pf-setting-check input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--pf-main);
}
#pf-hand .pf-setting-check small {
  display: block;
  color: var(--pf-sub);
  font-weight: 400;
  font-size: 12px;
  margin-top: 5px;
}
#pf-hand .pf-preferences {
  gap: 20px;
}

#pf-hand .pf-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
  color: var(--pf-sub);
  font-size: 12px;
  border-top: 1px solid var(--pf-line);
  padding-top: 10px;
}
#pf-hand .pf-version .pf-link {
  font-size: 12px;
  min-height: 44px;
}

/* Keep live hand context with the number field without a fixed input overlay. */
#pf-hand .pf-amount-context {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--pf-soft);
  border: 1px solid var(--pf-line);
  border-radius: 12px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
#pf-hand .pf-amount-context-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 15px;
  color: var(--pf-sub);
}
#pf-hand .pf-amount-context-line strong {
  font-weight: 600;
  color: var(--pf-ink);
}
#pf-hand .pf-amount-context-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
#pf-hand .pf-amount-context .pf-table-board {
  min-width: 0;
  gap: 3px;
  justify-content: flex-start;
}
#pf-hand .pf-amount-context .pf-table-board .pf-mini-card {
  min-width: 30px;
  height: 34px;
  padding: 2px;
  font-size: 13px;
}
#pf-hand .pf-amount-context .pf-board-tap {
  min-height: 44px;
}
#pf-hand .pf-amount-hero {
  flex-shrink: 0;
}
#pf-hand .pf-amount-hero small {
  display: block;
  font-size: 10px;
  line-height: 12px;
  color: var(--pf-sub);
  margin-bottom: 2px;
}
#pf-hand .pf-amount-hero .pf-mini-cards {
  gap: 3px;
}
#pf-hand .pf-amount-hero .pf-mini-card {
  min-width: 24px;
  height: 29px;
  padding: 2px;
  font-size: 12px;
}
#pf-hand.pf-amount-view {
  overflow: visible;
}

/* Shared navigation: back/cancel left, forward/commit right, in document flow. */
#pf-hand .pf-footer {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: nowrap;
}
#pf-hand .pf-footer .pf-back {
  flex: 0 0 70px;
  min-width: 70px;
}
#pf-hand .pf-footer .pf-primary {
  flex: 1;
  min-width: 0;
}
#pf-hand .pf-amount-footer {
  margin-top: 10px;
}
#pf-hand .pf-amount-footer button {
  margin-top: 0;
  min-height: 48px;
}
#pf-hand .pf-picker-modebar .pf-range-zoom {
  margin-left: auto;
}
#pf-hand .pf-hand-choice:has(.pf-mini-cards:empty) {
  display: none;
}
#pf-hand.pf-hand-view button.pf-range-cell {
  font-size: 12px;
  letter-spacing: -0.65px;
}
#pf-hand.pf-hand-view .pf-range.pf-zoomed button.pf-range-cell {
  font-size: 15px;
}
#pf-hand .pf-destructive {
  background: var(--pf-red);
  border-color: var(--pf-red);
  color: var(--pf-on);
}
/* The editable board replaces its background copy; cards remain visible in the editor. */
#pf-hand.pf-board-editing .pf-table .pf-table-board,
#pf-hand.pf-board-editing .pf-amount-context .pf-table-board {
  visibility: hidden;
}
/* Replay and full chronological review are alternate views of the same hand. */
#pf-hand.pf-detail-view:has(.pf-review-summary[open]) #pf-replay {
  display: none;
}
#pf-hand.pf-detail-view .pf-chrome .pf-link {
  display: none;
}

#pf-hand.pf-detail-view:has(.pf-review-summary[open]) .pf-detail-meta {
  display: none;
}

/* Native Utility shares its palette across the app, including the existing table geometry. */
#pf-hand[data-appearance='native'] {
  --pf-bg: light-dark(#f2f2f7, #19191c);
  --pf-panel: light-dark(#fff, #28282d);
  --pf-ink: light-dark(#202124, #f4f4f6);
  --pf-sub: light-dark(#575b66, #b7b9c3);
  --pf-line: light-dark(#d7d9df, #45464f);
  --pf-soft: light-dark(#e8e9ef, #303138);
  --pf-main: light-dark(#005bbb, #8dbdff);
  --pf-on: light-dark(#fff, #142537);
  box-sizing: border-box;
  border-radius: 12px;
  box-shadow: none;
}
#pf-hand[data-appearance='native'] .pf-chrome {
  background: var(--pf-panel);
  border-bottom: 1px solid var(--pf-line);
  padding-block: 10px;
}
#pf-hand[data-appearance='native'] button.pf-primary,
#pf-hand[data-appearance='native'] button.pf-back,
#pf-hand[data-appearance='native'] select {
  border-radius: 7px;
}
#pf-hand[data-appearance='native'] .pf-home-heading {
  padding-block: 4px;
}
:root:has(#pf-hand[data-appearance='native']) {
  background: light-dark(#e9ebf0, #13151a);
  color: light-dark(#202124, #f4f4f6);
}
#pf-hand[data-appearance='native'] > .pf-progress {
  display: block;
  margin-block: 2px;
  min-width: 0;
}
#pf-hand[data-appearance='native'] > .pf-progress[hidden] {
  display: none;
}
#pf-hand[data-appearance='native'] .pf-phase-picker select {
  width: auto;
  max-width: 100%;
  min-height: 44px;
  padding: 5px 6px;
  border: 0;
  font-weight: 650;
  color: var(--pf-ink);
}
#pf-hand[data-appearance='native']:has(> .pf-progress:not([hidden]))
  :is(#pf-content > h2:first-child, .pf-table-street, .pf-amount-street) {
  display: none;
}
#pf-hand[data-appearance='native'].pf-amount-view .pf-chrome {
  display: flex;
}
#pf-hand[data-appearance='native'] .pf-amount-context-line {
  justify-content: flex-end;
}
#pf-hand[data-appearance='native'] button[data-action='fold'] {
  background: var(--pf-soft);
  border-color: var(--pf-line);
  color: var(--pf-ink);
}
#pf-hand[data-appearance='native'] :is(button[data-action='check'], button[data-action='call']) {
  background: var(--pf-panel);
  border-color: var(--pf-main);
  color: var(--pf-main);
}
#pf-hand[data-appearance='native'] :is(button[data-amount-open], button[data-amount-submit]) {
  background: var(--pf-main);
  border-color: var(--pf-main);
  color: var(--pf-on);
}
#pf-hand[data-appearance='native'] .pf-native-review > summary {
  padding: 12px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--pf-line);
}
@media (max-width: 520px) {
  #pf-preview:has(#pf-hand[data-appearance='native']) {
    padding-bottom: 0;
  }
  #pf-hand[data-appearance='native'] {
    border-radius: 0;
  }
  #pf-hand[data-appearance='native'] .pf-chrome {
    padding-block: 2px;
  }
  #pf-hand[data-appearance='native'] #pf-content {
    padding-block: 6px 10px;
  }
  #pf-hand[data-appearance='native'] h2 {
    margin-bottom: 10px;
  }
  #pf-hand[data-appearance='native'] .pf-footer {
    margin-top: 8px;
  }
  #pf-hand[data-appearance='native'] .pf-board-slots {
    margin-block: 6px 8px;
  }
  #pf-hand[data-appearance='native'] .pf-suit-block + .pf-suit-block {
    margin-top: 4px;
  }
  #pf-hand[data-appearance='native'] .pf-board-layout-label {
    margin-bottom: 4px;
  }
  #pf-hand[data-appearance='native'].pf-hand-view {
    --pf-range-row: clamp(22px, calc((100svh - 348px) / 13), 34px);
  }
  #pf-hand[data-appearance='native'] .pf-amount-heading {
    margin-bottom: 0;
  }
  #pf-hand[data-appearance='native'] .pf-amount-editor .pf-raise-box {
    padding-top: 6px;
  }
}

@media (max-width: 520px) and (max-height: 740px) {
  /* Keep the full board within reach on short screens. Suit tabs remain available
     for users who prefer wider card targets. */
  #pf-hand[data-appearance='native'] .pf-suit-block .pf-board-seven {
    grid-template-columns: repeat(13, minmax(0, 1fr));
    gap: 1px;
  }
  #pf-hand[data-appearance='native'] .pf-suit-block button.pf-board-choice {
    padding-inline: 0;
    font-size: 12px;
  }
  #pf-hand[data-appearance='native'] .pf-suit-block-label {
    margin-bottom: 0;
  }
  #pf-hand[data-appearance='native'] .pf-hand-context + .pf-table {
    margin-bottom: 16px;
  }
}

#pf-hand .pf-picker-modebar .pf-hand-choice {
  margin: 0;
  min-height: 0;
}
#pf-hand .pf-picker-modebar .pf-hand-choice .pf-mini-card {
  height: 34px;
  min-width: 30px;
  font-size: 14px;
}
#pf-hand .pf-hand-context .pf-hand-table-info {
  flex: 1;
  width: auto;
  display: grid;
  justify-items: end;
  text-align: right;
}
#pf-hand .pf-hand-table-info .pf-link {
  font-size: 11px;
  overflow-wrap: anywhere;
}

#pf-hand[data-appearance='native'] .pf-phase-picker {
  display: inline-flex;
  position: relative;
  align-items: center;
}
#pf-hand[data-appearance='native'] .pf-phase-picker select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  padding: 4px 17px 4px 0;
  font-size: 15px;
  cursor: pointer;
}
#pf-hand[data-appearance='native'] .pf-phase-picker::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  position: absolute;
  right: 5px;
  top: 16px;
  pointer-events: none;
  color: var(--pf-sub);
}
#pf-hand[data-appearance='native'].pf-actions-view .pf-table {
  height: 274px;
}
#pf-hand[data-appearance='native'].pf-actions-view .pf-table.pf-nine {
  height: 320px;
}
@media (max-width: 520px) {
  #pf-hand[data-appearance='native'].pf-hand-view .pf-picker-modebar {
    min-height: 36px;
    margin-bottom: 0;
  }
  #pf-hand[data-appearance='native'].pf-hand-view button.pf-range-zoom {
    min-height: 36px;
  }
  #pf-hand[data-appearance='native'].pf-hand-view .pf-footer {
    margin-top: 4px;
  }
  #pf-hand[data-appearance='native'] .pf-hand-picker .pf-suit-rows {
    gap: 2px;
  }
}

/* The amount form expands in the action screen without obscuring the table. */
#pf-hand.pf-amount-view .pf-chrome {
  display: flex;
}
#pf-hand.pf-amount-view .pf-table {
  margin-bottom: 36px;
}
#pf-hand.pf-amount-view .pf-amount-editor {
  margin-top: 0;
  padding: 0;
}
#pf-hand[data-appearance='native'] .pf-sheet-backdrop {
  background: light-dark(#20283870, #090c127f);
}

/* The dealer marker follows BTN in both the live table and replay. */
#pf-hand .pf-dealer-button {
  position: absolute;
  z-index: 2;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--pf-sub);
  border-radius: 50%;
  background: var(--pf-panel);
  color: var(--pf-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px #0003;
  pointer-events: none;
}
/* Keep all five community cards between the seats on narrow screens. */
#pf-hand .pf-table .pf-table-board .pf-mini-card {
  width: clamp(24px, calc((100vw - 202px) / 5), 32px);
  min-width: clamp(24px, calc((100vw - 202px) / 5), 32px);
  height: 43px;
  padding: 2px 0;
  font-size: 15px;
}
