.party-game-pick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  border: 0; padding: 0; margin: 4px 0; min-width: 0;
}
.party-game-pick legend { padding: 0; margin-bottom: 5px; color: #f1e0f7; font-size: 12px; font-weight: 750; }
.party-game-pick label { position: relative; min-width: 0; }
.party-game-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.party-game-pick span {
  display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 37px; padding: 4px;
  border: 1px solid #916689; border-radius: 8px; background: #332031; white-space: nowrap;
  font-size: 12px;
}
.party-game-pick .pixel { width: 17px; height: 17px; }
.party-game-pick input:checked + span { border-color: #ffd489; color: #ffe5a8; background: #583841; }
.party-game-pick input:focus-visible + span { outline: 2px solid #ead0ff; outline-offset: 2px; }
.party-entry { bottom: 9%; }

.party-room:is([data-mode="beat"], [data-mode="raid"], [data-mode="duel"]) { left: clamp(32px, 18vw, 275px); }
.party-table-center:has(.party-mini:not([hidden])) {
  padding: 10px; border: 1px solid #a97858; border-radius: 18px;
  background: radial-gradient(ellipse at center, #66334a, #321e31);
  box-shadow: inset 0 0 0 4px #2d192a, 0 5px #241426;
}
.party-mini { width: 100%; max-width: 600px; padding: 4px 11px 0; }
.party-mini-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #ffe3ab; }
.party-mini-heading strong { font: 800 clamp(16px, 2vw, 25px)/1.15 var(--display); }
.party-mini-heading span { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-beat { display: grid; justify-items: center; gap: 12px; padding: 2px 0 8px; }
.mini-hit {
  display: grid; justify-items: center; gap: 1px; padding: 3px 8px;
  border: 0; background: none; color: var(--cream);
}
.mini-hit:disabled .party-button { opacity: .65; }
.mini-hammer, .mini-raid i {
  display: block;
  background: url("assets/werkstatt-objekte.png") 0 0 / 200% 200% no-repeat;
  filter: drop-shadow(0 7px 5px #271226);
}
.mini-hammer { width: clamp(76px, 9vw, 137px); aspect-ratio: 1; transform-origin: 60% 80%; }
.mini-rail {
  position: relative; width: 95%; height: 20px; border: 1px solid #c78961; border-radius: 6px;
  background: #381c2d; box-shadow: inset 0 3px #281522; overflow: hidden;
}
#mini-zone {
  position: absolute; inset-block: 0;
  background: linear-gradient(90deg, #935054, #ffd487 48%, #ffe9b5 50%, #ffd487 52%, #935054);
}
#mini-spark { position: absolute; inset: 0; pointer-events: none; }
#mini-spark::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 10px;
  translate: -50% -50%; rotate: 45deg;
  border: 1px solid #fff4d2; background: #fff0a8; box-shadow: 0 0 11px #ffe688;
}
.mini-raid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 9px 0 3px; }
.mini-raid button {
  display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 4px 2px 7px;
  border: 1px solid #9f6a79; border-radius: 12px; background: #3e2436;
  color: #ffdfa5; font-weight: 800;
}
.mini-raid i { width: min(100%, 128px); aspect-ratio: 1; background-position: 0 100%; }
.mini-raid button:nth-child(2) i { filter: hue-rotate(29deg) drop-shadow(0 7px 5px #271226); }
.mini-raid button:nth-child(3) i { filter: hue-rotate(-26deg) saturate(1.45) drop-shadow(0 7px 5px #271226); }
.mini-raid button.picked { border-color: #ffdb88; box-shadow: inset 0 0 0 2px #ffc76b54; }
.mini-raid button[data-reveal="solo"] { border-color: #badc90; }
.mini-raid button[data-reveal="crowded"] { border-color: #e5a0a2; }
.mini-raid button small { color: #f0c6b4; font-size: 10px; font-weight: 750; }
.mini-duel { display: grid; gap: 5px; justify-items: center; }
.duel-hit {
  position: relative; display: grid; justify-items: center; gap: 4px; width: min(100%, 230px);
  padding: 0 8px 4px; background: none; border: 0;
}
.duel-hit .mini-hammer { position: absolute; top: 0; left: 16%; width: 76px; }
.duel-hit[aria-disabled="true"] { cursor: default; }
.duel-hit[aria-disabled="true"] .party-button { opacity: .65; }
.duel-piece {
  display: block; width: 128px; height: 56px;
  background: linear-gradient(155deg, #fff0bd, #eca765 48%, #ab5e62 51%, #683953);
  clip-path: polygon(4% 25%, 79% 25%, 96% 52%, 81% 78%, 4% 78%);
}
.duel-hit .duel-piece { margin-top: 38px; margin-left: 24px; }
.duel-piece[data-shape="dagger"] { clip-path: polygon(5% 42%, 33% 42%, 33% 29%, 43% 29%, 43% 35%, 71% 35%, 97% 49%, 71% 65%, 43% 65%, 43% 71%, 33% 71%, 33% 58%, 5% 58%); }
.duel-piece[data-shape="blade"] { clip-path: polygon(3% 44%, 27% 44%, 29% 32%, 36% 32%, 39% 39%, 77% 32%, 98% 41%, 92% 62%, 77% 70%, 39% 61%, 36% 69%, 29% 69%, 27% 57%, 3% 57%); }
.duel-piece[data-shape="sword"] {
  clip-path: polygon(0 42%, 24% 42%, 26% 25%, 34% 25%, 37% 38%, 80% 38%, 100% 50%, 80% 62%, 37% 62%, 34% 75%, 26% 75%, 24% 58%, 0 58%);
  background: linear-gradient(150deg, #ffe499 12%, #fff5dc 45%, #b19ad9 52%, #f5b769 75%);
}
.duel-piece[data-shape="fork"] { clip-path: polygon(0 46%, 42% 47%, 58% 31%, 95% 23%, 96% 32%, 67% 44%, 100% 44%, 100% 53%, 66% 54%, 91% 71%, 87% 80%, 55% 67%, 43% 59%, 0 58%); }
.duel-readout { width: min(100%, 270px); display: flex; justify-content: space-between; gap: 9px; color: #ffe8ba; font-size: 12px; }
.duel-heat {
  position: relative; width: min(100%, 270px); height: 12px; border: 1px solid #b48266; border-radius: 4px;
  background: linear-gradient(90deg,#331f35 38%,#624331 38% 80%,#562839 80%); overflow: hidden;
}
.duel-heat span { position: absolute; inset: 0; transform-origin: left; background: #d99478; }
.mini-duel[data-heat="glow"] .duel-heat span { background: #ffce76; }
.mini-duel[data-heat="hot"] .duel-heat span { background: #ff8990; }
#duel-heat-text { color: #f5ccab; font-size: 11px; }
.duel-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; width: 100%; }
.duel-results > div {
  display: grid; justify-items: center; padding: 3px; border: 1px solid #815766; border-radius: 6px;
  background: #382437; text-align: center; color: #f9ddc6; font-size: 10px; overflow-wrap: anywhere;
}
.duel-results .winner { border-color: #ffcc76; background: #593b38; }
.duel-results .duel-piece { width: min(100%, 64px); height: 27px; }
.mini-duel:has(.duel-results:not([hidden])) .duel-hit,
.mini-duel:has(.duel-results:not([hidden])) .duel-heat { display: none; }
#mini-feedback { min-height: 19px; margin-top: 6px; color: #f5d6c1; font-size: 12px; font-weight: 750; }
@media (max-height: 820px) and (min-width: 741px) {
  .party-room:is([data-mode="beat"], [data-mode="raid"]) .party-seat { min-height: 80px; }
  .party-room:is([data-mode="beat"], [data-mode="raid"]) .party-avatar { width: 37px; height: 34px; }
  .mini-raid i { width: min(100%, 98px); }
  .mini-hammer { width: clamp(73px, 8vw, 104px); }
}
@media (hover: hover) and (pointer: fine) {
  .mini-raid button:hover:not(:disabled) { border-color: #ffdc96; background: #68403f; }
  .mini-hit:hover:not(:disabled) .party-button { background: #ffe4a7; }
}
@media (max-width: 740px) {
  .party-room:is([data-mode="beat"], [data-mode="raid"], [data-mode="duel"]) { left: 4%; }
}
