body {
  color: red;
}

.level1 {
  color: green;
}

.knocked-down {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 20 20'><path d='M0 0 L20 20 ' stroke='gray' stroke-width='3'/></svg>");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%, auto;
}

.stunned {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 20 20'><path d='M0 0 L20 20 M0 20 L20 0' stroke='gray' stroke-width='3'/></svg>");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%, auto;
}

.gb-mobile-root {
  height: 100vh;
  overflow: hidden;
}

.gb-mobile-root {
  height: 100dvh;
}

.gb-top-bar {
  padding-top: env(safe-area-inset-top);
}

.gb-pitch {
  touch-action: manipulation;
  user-select: none;
  -webkit-touch-callout: none;
}

.gb-pitch-sizer {
  display: flex;
  flex: 1 1 0%;
  justify-content: center;
  align-items: center;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.gb-pitch-sizer {
  align-items: safe center;
}

.gb-pitch-sizer {
  justify-content: safe center;
}

.gb-dock {
  background: #fafafa;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: env(safe-area-inset-bottom);
  min-height: 48px;
}

.gb-dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gb-dock-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 6px;
}

.gb-dock-button {
  padding: 8px 12px;
  font-size: 14px;
  min-height: 36px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.gb-dock-handle {
  display: block;
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.gb-dock-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.gb-roll-strip {
  font-family: monospace;
  font-size: 12px;
  text-align: left;
  width: 100%;
  max-width: 800px;
  color: #222;
}

.gb-roll-list {
  max-height: 9em;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff;
}

.gb-roll-all {
  margin-top: 4px;
  font-size: 12px;
}

.gb-roll-turn-title {
  font-weight: bold;
  margin-top: 2px;
}

.gb-roll-player-title {
  color: #555;
  margin-top: 2px;
}

.gb-roll-line {
  padding-left: 8px;
  white-space: pre;
}

.gb-roll-line[data-outcome=fail], .gb-roll-line[data-outcome=fumble], .gb-roll-line[data-outcome=broken], .gb-roll-line[data-outcome=ko], .gb-roll-line[data-outcome=casualty] {
  color: #b00020;
}

.gb-roll-history {
  width: 100%;
  max-width: 800px;
  font-family: monospace;
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
  font-size: 12px;
  border-radius: 4px;
  background: #fff;
  color: #222;
}

.gb-roll-history-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.gb-roll-history-body {
  max-height: 24em;
  overflow-y: auto;
}

.gb-roll-compact .gb-roll-list {
  max-height: 96px;
}

.gb-team-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 11rem));
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.gb-team-card {
  min-width: 0;
  gap: 6px;
  justify-content: space-between;
  border: 1px solid #ccc;
  align-items: baseline;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  border-radius: 6px;
  display: flex;
  background: #fff;
  color: #222;
}

.gb-team-card:hover, .gb-team-card:focus {
  border-color: #337ab7;
  background: #f5f9fd;
}

.gb-team-card-random {
  border-style: dashed;
}

.gb-team-card-name {
  font-weight: bold;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gb-team-card-value {
  font-family: monospace;
  color: #555;
  white-space: nowrap;
}