@import url("https://fonts.googleapis.com/css2?family=Marcellus&display=swap");
body {
  margin: 0;
  background: var(--jade-bg);
  color: var(--jade-text);
  font-family: var(--jade-body-font);
  line-height: 1.5;
}
header,
main,
footer {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
  box-sizing: border-box;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--jade-line);
}
header img {
  width: 170px;
  max-width: 40vw;
}
header nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
h1,
h2,
h3 {
  font-family: var(--jade-heading-font);
  font-weight: 400;
}
h1 {
  font-size: clamp(30px, 5vw, 52px);
}
a {
  color: var(--jade-accent);
}
section {
  border: 1px solid var(--jade-line);
  background: var(--jade-surface);
  padding: 24px;
  border-radius: var(--jade-radius-panel);
  margin: 20px 0;
}
button,
input,
select,
textarea {
  font: inherit;
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid var(--jade-line);
  border-radius: var(--jade-radius);
  padding: 10px;
  background: var(--jade-surface);
  color: var(--jade-text);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--jade-accent);
  outline-offset: 3px;
}
label {
  display: block;
  margin: 12px 0;
}
textarea {
  width: 100%;
  min-height: 100px;
}
footer {
  border-top: 1px solid var(--jade-line);
  color: var(--jade-muted);
}
.club {
  border-left: 8px solid var(--club);
  padding: 16px;
  background: var(--jade-surface);
  margin: 8px 0;
}
#status,
#error {
  white-space: pre-wrap;
}
#error {
  color: var(--jade-danger);
}
#clubs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}
#lot {
  font-size: clamp(26px, 4vw, 52px);
  background: linear-gradient(120deg, var(--jade-surface), var(--jade-glow));
  padding: 40px;
  animation: reveal 0.5s;
}
#amount {
  font-size: clamp(32px, 6vw, 80px);
  font-variant-numeric: tabular-nums;
  color: var(--jade-accent);
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 500px) {
  header,
  main,
  footer {
    padding: 16px;
  }
  header {
    flex-wrap: wrap;
  }
  section {
    padding: 16px;
  }
}
#arena {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
  min-height: 330px;
}
#arena[hidden] {
  display: none;
}
#lot {
  position: relative;
  min-height: 210px;
  display: flex;
  align-items: center;
  border: 1px solid var(--jade-line);
  box-sizing: border-box;
}
#lot:before {
  content: attr(data-label);
  position: absolute;
  top: 18px;
  left: 40px;
  font: 14px var(--jade-body-font);
  letter-spacing: 0.16em;
  color: var(--jade-accent);
}
#amount {
  margin: 0 0 20px;
  line-height: 1.1;
}
#bids {
  list-style: none;
  padding: 0;
  max-height: 140px;
  overflow: auto;
  color: var(--jade-muted);
}
body[data-view="stage"] #clubs {
  grid-template-columns: repeat(var(--club-cols, 6), minmax(0, 1fr));
  gap: 10px;
}
body[data-view="stage"] .club {
  margin: 0;
  padding: 12px;
  border-left: 0;
  border-top: 5px solid var(--club);
}
body[data-view="stage"] .club h2 {
  font: 18px var(--jade-body-font);
  margin: 0 0 10px;
}
body[data-view="stage"] .club p {
  font-size: 13px;
  margin: 0;
}
body[data-view="stage"] footer {
  display: none;
}
body[data-phase="spinning"] #lot {
  animation: slot 0.15s infinite alternate;
}
body[data-phase="sold"] #lot {
  border: 3px solid var(--jade-accent);
  animation: stamp 0.4s;
}
body[data-phase="unsold"] #lot {
  filter: grayscale(1);
}
#playerPanel li {
  padding: 14px;
  border-bottom: 1px solid var(--jade-line);
}
#playerPanel label {
  display: inline-block;
  margin-right: 20px;
}
@keyframes slot {
  from {
    transform: translateY(-4px);
    opacity: 0.65;
  }
  to {
    transform: translateY(4px);
    opacity: 1;
  }
}
@keyframes stamp {
  from {
    transform: scale(1.07);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@media (min-width: 1600px) {
  body[data-view="stage"] header,
  body[data-view="stage"] main {
    max-width: 1720px;
  }
  body[data-view="stage"] #arena {
    min-height: 370px;
  }
  body[data-view="stage"] #lot {
    font-size: 56px;
    min-height: 280px;
  }
  body[data-view="stage"] #amount {
    font-size: 100px;
  }
}
@media (max-width: 750px) {
  #arena {
    grid-template-columns: 1fr;
    gap: 0;
  }
  body[data-view="stage"] #clubs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #lot {
    padding: 28px;
    min-height: 180px;
  }
  #lot:before {
    left: 28px;
  }
}
progress {
  width: 100%;
  height: 7px;
  accent-color: var(--club);
}
body[data-view="stage"] .club p[aria-label] {
  font-size: 16px;
  letter-spacing: 0.1em;
}
body[data-view="stage"] .club p {
  line-height: 1.25;
}
body[data-view="purse"] .club {
  border-top: 6px solid var(--club);
}
body[data-phase="going_once"] #amount,
body[data-phase="going_twice"] #amount {
  animation: stamp 0.4s;
}
.confetti {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 18px;
  pointer-events: none;
  z-index: 10;
  animation: confetti 1.7s ease-in forwards;
}
@keyframes confetti {
  to {
    transform: translateY(100vh) rotate(600deg);
    opacity: 0;
  }
}
#lot img {
  border-radius: 50%;
  object-fit: cover;
  margin-right: 20px;
}
#lot small {
  display: block;
  font: 18px var(--jade-body-font);
  margin: 16px;
}
#diceArea {
  display: flex;
  justify-content: center;
  gap: 55px;
  padding: 24px 0 16px;
  perspective: 650px;
  height: 96px;
}
#diceArea[hidden] {
  display: none;
}
.die-holder {
  position: relative;
  width: 64px;
  height: 64px;
  perspective: 400px;
}
.die {
  position: relative;
  width: 64px;
  height: 64px;
  transform-style: preserve-3d;
  transform: rotateX(var(--x, 0deg)) rotateY(var(--y, 0deg));
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.die-face {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff, #e9e4d8);
  border: 1px solid #d1cabb;
  border-radius: 12px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 11px;
  gap: 3px;
  backface-visibility: hidden;
  box-shadow: inset 0 0 10px #00000015;
}
.pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #176b50;
  box-shadow: inset 0 1px 2px #0008;
}
.face-1 {
  transform: translateZ(32px);
}
.face-2 {
  transform: rotateY(90deg) translateZ(32px);
}
.face-3 {
  transform: rotateX(90deg) translateZ(32px);
}
.face-4 {
  transform: rotateX(-90deg) translateZ(32px);
}
.face-5 {
  transform: rotateY(-90deg) translateZ(32px);
}
.face-6 {
  transform: rotateY(180deg) translateZ(32px);
}
.die-shadow {
  position: absolute;
  inset: 65px -10px -20px;
  background: radial-gradient(ellipse, #0008, transparent 70%);
  filter: blur(4px);
}
.rolling .die {
  animation: three-dice 1.2s linear infinite;
  animation-delay: var(--delay);
}
.rolling .die-shadow {
  animation: shadow-roll 0.6s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}
@keyframes three-dice {
  0% {
    transform: translateY(0) rotateX(0) rotateY(0);
  }
  25% {
    transform: translateY(-20px) rotateX(120deg) rotateY(90deg);
  }
  65% {
    transform: translateY(-8px) rotateX(270deg) rotateY(240deg);
  }
  100% {
    transform: translateY(0) rotateX(360deg) rotateY(360deg);
  }
}
@keyframes shadow-roll {
  to {
    opacity: 0.35;
    transform: scale(0.65);
  }
}
.photo-credit {
  font-size: 11px;
  flex-basis: 100%;
  line-height: 1.3;
}
#lot {
  flex-wrap: wrap;
}
#mockLabel {
  color: var(--jade-muted);
  margin: 0;
}
@media (min-width: 1600px) {
  body[data-view="stage"] #arena {
    min-height: 270px;
  }
  body[data-view="stage"] #lot {
    min-height: 240px;
    font-size: 44px;
  }
  body[data-view="stage"] h1 {
    margin: 18px 0 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .die {
    transition: none;
  }
  .rolling .die,
  .rolling .die-shadow {
    animation: none;
  }
}
@media (max-width: 500px) {
  #diceArea {
    gap: 36px;
  }
  .die-holder {
    transform: scale(0.8);
  }
}
#playerPanel li img {
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 14px;
}
#playerPanel .photo-credit {
  display: block;
  margin-left: 62px;
}
#lot {
  gap: 20px;
  padding: 40px 28px 20px;
  flex-wrap: nowrap;
}
#lot:before {
  left: 28px;
  top: 14px;
}
#lot img {
  flex-shrink: 0;
  width: 128px;
  height: 160px;
  border-radius: 12px;
  object-position: 50% 15%;
}
.lot-copy {
  min-width: 0;
}
.lot-copy h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.lot-copy p {
  font: 18px var(--jade-body-font);
  line-height: 1.35;
  margin: 5px 0;
}
.lot-copy .photo-credit {
  display: block;
  margin-top: 12px;
  line-height: 1.3;
}
#audioControls {
  display: flex;
  align-items: center;
  gap: 16px;
}
#audioControls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#audioControls input {
  padding: 0;
  width: 110px;
}
body[data-view="stage"] #audioControls {
  float: right;
}
body[data-view="stage"] #availability {
  display: inline-block;
}
body[data-view="stage"] #clubs {
  clear: both;
}
body[data-view="stage"] #diceArea {
  height: 76px;
  padding: 16px 0 12px;
}
@media (min-width: 1600px) {
  body[data-view="stage"] #arena {
    min-height: 250px;
  }
}
@media (max-width: 600px) {
  #lot {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 44px;
  }
  body[data-view="stage"] #audioControls {
    float: none;
  }
  #audioControls {
    flex-wrap: wrap;
  }
}
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--jade-accent);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 99;
  background: var(--jade-surface);
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
caption {
  text-align: left;
  color: var(--jade-muted);
  padding-bottom: 8px;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--jade-line);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
}
.stat-grid strong {
  font-size: 28px;
}
.spend-row {
  margin-bottom: 20px;
}
.spend-bar {
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--club-from), var(--club));
  min-width: 0;
  transition: width 0.5s;
}
#content .club img {
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
  margin: 6px 12px 6px 0;
}
nav [aria-current="page"] {
  font-weight: bold;
  text-decoration-thickness: 3px;
}
progress {
  transition: all 0.4s;
}
