/* Tester issue reporter. The Report button lives in the top bar. The sheet sits over the table
   but does not pause it: Close (and "Close and play" on your turn) dismisses it at once. */
#reportBarBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e0b04a;
  background: linear-gradient(180deg, #a86b12, #3d2808);
  color: #fff8e8;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
#reportBarBtn[hidden] { display: none !important; }
#reportBarBtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (pointer: coarse) { #reportBarBtn { min-height: 44px; } }
@media (max-width: 600px) {
  #reportBarBtn { padding: 4px 8px; font-size: .8rem; }
  /* The phone bar is one row. Testers keep the word Report, so the logo gives up a little height. */
  body.at-table:has(#reportBarBtn:not([hidden])) .brand-logo { height: 48px; }
}
#reportBtn {
  position: fixed;
  z-index: 45;
  left: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2b5d8a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  cursor: grab;
  touch-action: none;
  display: grid;
  place-items: center;
}
#reportBtn[hidden] { display: none !important; }
#reportBtn svg { display: block; pointer-events: none; }

#reportView {
  position: fixed;
  inset: 0;
  z-index: 100;
  height: 100%;
  max-height: 100dvh;
  background: #0e1014;
  color: #e8eaed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font: 15px/1.35 system-ui, sans-serif;
}
#reportView[hidden] { display: none !important; }

/* The screenshot takes every pixel the sheet does not. container-type gives the image a definite cap so it cannot spill over the title. */
#reportShot {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  container-type: size;
}
.ir-frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}
.ir-frame img {
  display: block;
  max-width: 100cqw;
  max-height: 100cqh;
  width: auto;
  height: auto;
  background: #111;
}
#reportPins { position: absolute; inset: 0; }
.ir-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2630;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px #000;
  touch-action: none;
  cursor: grab;
}
.ir-wait { color: #9aa0a6; padding: 16px; line-height: 1.4; }

#reportSide {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 48%;
  overflow: hidden;
  background: #16181c;
  border-top: 1px solid #2c3036;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}
#reportSide header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 4px;
}
#reportSide h2 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
#reportTurn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 12px 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #e6b325;
  color: #1b1300;
  font-weight: 800;
}
#reportTurn[hidden] { display: none !important; }
#reportTurn button {
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  background: #1b1300;
  color: #fff;
  min-height: 40px;
  padding: 8px 12px;
  cursor: pointer;
}
.ir-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 12px 8px;
}
.ir-foot {
  flex: none;
  padding: 8px 12px 12px;
  background: #16181c;
  border-top: 1px solid #2c3036;
}
#reportSide textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  background: #111214;
  border: 1px solid #3a3d42;
  border-radius: 8px;
  padding: 6px 8px;
  resize: none;
}
#reportSide label:not(.ir-screen) { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
#reportSide label.ir-screen {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  min-height: 36px;
  font-size: 0.85rem;
}
#reportSide label.ir-screen span { flex: 1 1 auto; line-height: 1.3; }
#reportSide label.ir-screen input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #3a3d42;
  position: relative;
  cursor: pointer;
}
#reportSide label.ir-screen input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
#reportSide label.ir-screen input:checked { background: #2b5d8a; }
#reportSide label.ir-screen input:checked::after { transform: translateX(18px); }
#reportSide label.ir-screen input:focus-visible { outline: 2px solid #8ab4e0; outline-offset: 2px; }
#reportSide label.ir-screen input:disabled { opacity: 0.45; cursor: not-allowed; }
#reportMore { border: 1px solid #3a3d42; border-radius: 8px; padding: 2px 8px 6px; }
#reportMore summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-weight: 700; font-size: 0.9rem; }
#reportMore label { margin-top: 4px; }
.ir-rec { display: flex; gap: 8px; align-items: center; }
#reportTimer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; min-width: 3.2em; }
#reportRec, #reportPause, #reportStop, #reportSend {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  background: #2b5d8a;
  color: #fff;
  cursor: pointer;
}
#reportRec {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 1.05rem;
}
#reportPause, #reportStop { min-height: 44px; padding: 10px 16px; }
#reportSend {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 1.05rem;
}
#reportClose { background: transparent; color: #e8eaed; font: inherit; font-weight: 800; font-size: 1rem; line-height: 1; min-height: 44px; padding: 8px 12px; border: 1px solid #6b717a; border-radius: 999px; cursor: pointer; }
#reportAudio { width: 100%; }
.ir-muted { color: #9aa0a6; font-size: 0.78rem; margin: 0; line-height: 1.3; }
#reportErr:empty { display: none; }
#reportErr { color: #f0a0a0; }

@media (orientation: landscape) and (max-height: 520px) {
  #reportView { flex-direction: row; }
  #reportShot { flex: 1 1 auto; height: 100%; }
  #reportSide { width: min(340px, 46vw); max-height: none; height: 100%; border-top: 0; border-left: 1px solid #2c3036; box-shadow: none; }
}
