.obg-panel {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.obg-panel h1 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  line-height: 1.25;
}

.obg-panel > p {
  margin: 0 0 8px;
  line-height: 1.45;
  color: #444;
}

.obg-card {
  margin: 20px 0;
  padding: 20px 22px;
  border: 1px solid #ccc;
  background: #fafafa;
  border-radius: 6px;
  box-sizing: border-box;
}

.obg-card h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.obg-card label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  line-height: 1.35;
}

.obg-card .obg-hint {
  display: block;
  margin: -2px 0 8px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #666;
  line-height: 1.35;
}

.obg-card input[type="text"] {
  display: block;
  width: 100%;
  max-width: 360px;
  font-size: 16px;
  line-height: 1.3;
  padding: 10px 12px;
  margin: 0 0 14px;
  border: 1px solid #333;
  border-radius: 4px;
  box-sizing: border-box;
}

.obg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 18px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 4px;
  background: #333;
  color: #fff;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.obg-btn:hover {
  filter: brightness(1.08);
}

.obg-btn.secondary {
  background: #eee;
  color: #222;
}

.obg-btn.secondary:hover {
  filter: brightness(0.97);
}

.obg-card .obg-btn + .obg-btn,
.obg-card p {
  margin-top: 0;
}

.obg-error {
  color: #c0392b;
  margin: 12px 0 0;
}

.obg-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #eef6ff;
  border: 1px solid #9db7d8;
  font-weight: 600;
}

.obg-status.your-turn {
  background: #e8f8e8;
  border-color: #6aaa6a;
}

/* Live sidebar is wider than the old one-device Player 1–8 column */
.boardgames_container #playerBox {
  width: 240px;
  height: auto;
  min-height: 0;
  align-items: stretch;
  box-sizing: border-box;
}

.obg-code-banner {
  font-size: 18px;
  letter-spacing: 0.06em;
  font-weight: 800;
  margin: 0 0 10px;
  text-align: center;
  width: 100%;
  word-break: break-all;
}

.obg-invite {
  width: 100%;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  border-radius: 4px;
  box-sizing: border-box;
}

.obg-invite-label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.obg-host-steps {
  margin: 0 0 12px;
  padding: 0 0 0 1.2em;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  width: 100%;
  box-sizing: border-box;
}

.obg-host-steps li {
  margin-bottom: 4px;
}

.obg-players-heading {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

.obg-player-list li.obg-waiting {
  border-left-color: #ccc;
  color: #777;
  font-style: italic;
  background: #fafafa;
}

.obg-invite-url {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #111;
  border: 1px solid #bbb;
  border-radius: 3px;
  box-sizing: border-box;
  background: #fff;
}

.obg-copy-invite {
  display: block;
  width: 100%;
  padding: 9px 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 4px;
  background: #333;
  color: #fff;
  box-sizing: border-box;
}

.obg-copy-invite:hover {
  filter: brightness(1.08);
}

.obg-copy-msg {
  margin: 6px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #2e7d32;
}

.obg-player-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  width: 100%;
}

.obg-player-list li {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-left: 6px solid #999;
  background: #f5f5f5;
  font-size: 15px;
  box-sizing: border-box;
}

.obg-player-list li.active-turn {
  outline: 2px solid #333;
}

.obg-player-list li.disconnected {
  opacity: 0.5;
}

.obg-host-actions,
.obg-roll-only {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.obg-host-actions button,
.obg-roll-only button {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  padding: 12px 10px;
  width: 100%;
  border: 1px solid #333;
  border-radius: 4px;
  color: #222;
  background: #eee;
  white-space: normal;
  box-sizing: border-box;
}

.obg-host-actions button:hover:not(:disabled),
.obg-roll-only button:hover:not(:disabled) {
  border-color: #000;
  filter: brightness(0.97);
}

.obg-host-actions button:disabled,
.obg-roll-only button:disabled {
  background: #e0e0e0;
  color: #888;
  border-color: #bbb;
  cursor: not-allowed;
}

.obg-host-actions .obg-start {
  background: #4caf50;
  color: #fff;
}

.obg-host-actions .obg-start:disabled {
  background: #a5d6a7;
  color: #f0f0f0;
}

.obg-host-actions .obg-restart {
  margin-top: 4px;
}

/* Mobile-only tweaks for live host/play — desktop layout untouched */
@media (max-width: 900px) {
  body.obg-live .footer {
    display: none !important;
  }

  body.obg-live .boardgames_container #playerBox {
    width: min(280px, 100%);
    height: auto;
    margin: 0 0 24px;
  }

  /*
   * Inline #mainDiv { grid-column: 1 / span 2 } invents a second column
   * on the nosidebar 1-col grid, so the blue topnav only paints half-width.
   * Force a single column on mobile only.
   */
  body.obg-live .grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr !important;
  }

  body.obg-live #mainDiv {
    grid-column: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.obg-live .topnav {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    background-color: #1875d0;
  }
}
