.badge {
  display: inline-block;
  border: 1px solid var(--shu);
  color: var(--sumi);
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.03em;
  margin: 8px 0 12px;
}
.play-main { padding-bottom: 48px; }
.play-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 0 18px;
}
.subnav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.subnav a { color: var(--quiet); text-decoration: none; font-size: 14px; }
.subnav a[aria-current="page"] { color: var(--sumi); }
.play-grid { display: grid; gap: 28px; }
.play-grid > section > * { max-width: 520px; }
.pay { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--quiet); margin: 8px 0 16px; }
.pay td { padding: 3px 0; text-align: right; }
.pay td:first-child { text-align: left; }
.pay tr.hit td { color: var(--shu); font-weight: 500; }
.msg { font-family: var(--serif); text-align: center; min-height: 28px; margin: 8px 0 12px; font-size: 18px; }
.msg.win, .extra.match { color: var(--shu); }
.extra { text-align: center; color: var(--quiet); min-height: 1.4em; }
.cards { display: flex; gap: 8px; justify-content: center; min-height: 128px; }
.slot { flex: 1; max-width: 96px; text-align: center; }
.card {
  position: relative;
  width: 100%;
  aspect-ratio: 62 / 88;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 24px);
  color: var(--sumi);
  cursor: pointer;
  outline: 1.5px solid transparent;
  outline-offset: 3px;
}
.card.red { color: var(--shu); }
.card .suit { align-self: flex-end; }
.card.back {
  background: repeating-linear-gradient(45deg, #fff 0 6px, var(--washi) 6px 12px);
  cursor: default;
}
.card.held { outline-color: var(--ai); transform: translateY(-4px); }
.card.spot { box-shadow: 0 0 0 1px var(--sakura), 0 8px 18px rgba(200, 68, 47, 0.16); }
.card.inwin { background: #fdf7f4; }
.card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--shu);
  color: #fff;
  border: 0;
  border-radius: 99px;
  padding: 1px 7px;
  margin: 0;
  letter-spacing: 0;
}
.hold { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 8px; color: transparent; }
.hold.on { color: var(--ai); }
.stats { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 12px; font-size: 14px; }
.btns { display: flex; gap: 8px; }
.stake-label, .btns .btn { flex: 1; }
.stake-label {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--quiet);
  min-height: 44px;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.sheet { border-top: 1px solid var(--line); margin-top: 28px; }
.sheet summary {
  cursor: pointer;
  padding: 16px 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}
.sheet-body { padding-bottom: 8px; }

.reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  margin: 12px 0;
}
.reels::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--shu);
  opacity: 0.7;
  pointer-events: none;
}
.reel {
  height: 216px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
}
.strip { position: absolute; left: 0; right: 0; top: 0; }
.sym {
  height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  font-family: var(--serif);
  font-size: 40px;
  color: var(--shu);
}
.sym i { display: block; width: 46px; height: 8px; background: var(--sumi); border-radius: 2px; }
.sym-B2 i, .sym-B1 i { background: var(--ai); }
.sym-X { opacity: 0.25; }
.raise {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
  margin: 12px 0;
}
.reel-row, .shot-wrap { display: flex; gap: 12px; align-items: center; }
.reel-picks, .shot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(100%, 520px); }
.reel-choice {
  min-height: 88px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px;
  cursor: pointer;
}
.reel-choice:disabled { cursor: default; }
.reel-choice .sym { height: 72px; }
.relay-box {
  width: 88px;
  min-height: 112px;
  border: 1px solid var(--shu);
  background: var(--paper);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}
.snap-row { display: flex; gap: 16px; align-items: flex-end; justify-content: center; }
.snap-face { width: 72px; }
.shot-grid { grid-template-rows: repeat(3, 76px); }
.shot-cell {
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  min-height: 72px;
}
.shot-cell .sym { height: 64px; font-size: 32px; }
.shot-cell.lit { outline: 2px solid var(--shu); outline-offset: -2px; }
.shot-cell.spinning { background: repeating-linear-gradient(45deg, var(--paper) 0 6px, var(--washi) 6px 12px); }
.line-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.line-picks button {
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.line-picks button[aria-pressed="true"] { border-color: var(--shu); color: var(--shu); }

.race-app { display: grid; gap: 18px; }
.week-row, .type-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.week-select { min-height: 44px; background: var(--paper); border: 1px solid var(--line); padding: 8px 10px; }
.ticket-summary { font-family: var(--serif); font-size: 20px; min-height: 1.4em; }
.board { display: grid; }
.lane {
  display: grid;
  grid-template-columns: 28px 72px minmax(0, 1fr) 52px 40px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 4px 2px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.lane.picked { box-shadow: inset 3px 0 0 var(--ai); }
.lane.mover .lane-name, .lane.mover .lane-move { color: var(--shu); }
.lane-bar { display: block; height: 6px; background: var(--line); }
.lane-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--sumi);
  transform-origin: left center;
  transform: scaleX(0);
}
.lane.mover .lane-bar span { background: var(--shu); }
.lane-rank, .lane-pts, .lane-move { font-variant-numeric: tabular-nums; font-size: 13px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin: 8px 0 16px; }
.pod { background: var(--paper); border: 1px solid var(--line); padding: 12px; text-align: center; min-height: 88px; }
.pod.first { min-height: 120px; border-color: var(--shu); }
.pod span { display: block; color: var(--shu); font-family: var(--serif); }
.pod em { display: block; font-style: normal; color: var(--quiet); font-size: 13px; }

@media (min-width: 900px) {
  .play-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 56px; align-items: start; }
  .race-app { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); grid-template-areas: "controls board" "actions board"; align-items: start; }
  .race-controls { grid-area: controls; }
  .race-board { grid-area: board; }
  .race-actions { grid-area: actions; }
}
@media (max-width: 899px) {
  body.has-dock { padding-bottom: 96px; }
  .race-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: 8px;
    background: var(--washi);
    border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .race-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .card.held { transform: none; }
}
