.cheatmp-handbar {
  width: 100%;
  height: 210px;                /* HARD GUARANTEE FOR 2 ROWS */
  min-height: 210px;

  background: #23272d;
  border-top: 2px solid #3a3f47;

  display: flex;
  align-items: center;

  padding: 6px 12px;
  box-sizing: border-box;
}

.cheatmp-hand {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  grid-template-rows: repeat(2, 100px);

  gap: 4px 4px;

  width: 100%;
  height: 100%;

  align-content: center;
  justify-content: center;
  justify-items: center;

  overflow-x: auto;
  overflow-y: hidden;

  box-sizing: border-box;
}

/* ========================================================================== */
/*                               HAND CARDS                                   */
/* ========================================================================== */

.cheatmp-hand .card {
  width: 75px;
  height: 100px;

  background-size: cover;
  background-position: center;

  border-radius: 2px;
  border: 1px solid #111;

  cursor: pointer;
  transition: transform 0.12s;
}

.cheatmp-hand .card:hover {
  transform: translateY(-4px);
}

.cheatmp-hand .card.selected {
  border-color: #e4cf79;
  box-shadow: 0 0 8px rgba(255,240,150,0.6);
  transform: translateY(-6px);
}

/* Scrollbar tuning */
.cheatmp-hand::-webkit-scrollbar { height: 4px; }
.cheatmp-hand::-webkit-scrollbar-thumb { background: #3a3f47; border-radius: 4px; }
.cheatmp-hand::-webkit-scrollbar-track { background: #14181d; }

/* ========================================================================== */
/*                              TOAST MESSAGE                                 */
/* ========================================================================== */

#cheatmp-toast {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  font-weight: bold;
  color: #e4cf79;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#cheatmp-toast.show {
  opacity: 1;
}

/* ========================================================================== */
/*                          FLYING CARD ANIMATION                              */
/* ========================================================================== */

.flying-card {
  position: fixed;
  width: 72px;
  height: 100px;
  background: url("../assets/cards/card_back.png");
  background-size: cover;
  border-radius: 6px;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.5s ease-out, opacity 0.5s;
}
/* ========================================================================== */
/*                              UTILITY                                       */
/* ========================================================================== */

/* Migrated ownership from 16-social-profile-quests-b.css — CheatMP / Play Cards MP family */
/* ==== CheatMP rebuilt status pane overrides ==== */
#cheatmp-chat-container {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
#cheatmp-chat-container .cheatmp-status-card {
  width: 100%;
  min-height: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(25,31,38,0.96), rgba(14,18,23,0.96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  padding: 12px;
  color: #e8edf5;
}
#cheatmp-chat-container .cheatmp-status-title,
#cheatmp-chat-container .cheatmp-status-subtitle {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#cheatmp-chat-container .cheatmp-status-title {
  margin-bottom: 10px;
  color: #ffd966;
}
#cheatmp-chat-container .cheatmp-status-subtitle {
  margin-top: 12px;
  margin-bottom: 6px;
  color: #9bd0ff;
  font-size: 12px;
}
#cheatmp-chat-container .cheatmp-status-grid {
  display: grid;
  gap: 6px;
}
#cheatmp-chat-container .cheatmp-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
#cheatmp-chat-container .cheatmp-status-row span {
  color: rgba(232,237,245,0.7);
}
#cheatmp-chat-container .cheatmp-status-copy {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(232,237,245,0.82);
}
#cheatmp-turn-log .cheatmp-log-line {
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
#cheatmp-arena-panel .cheatmp-seat.is-local-seat .seat-name {
  color: #9bd0ff;
}

/* ==== CheatMP layout hotfix: keep side panes narrow and stop table/seats from crushing them ==== */
#cheatmp-arena-panel .cheatmp-arena-wrapper {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: clamp(280px, 22vw, 360px) minmax(0, 1fr) clamp(220px, 18vw, 300px);
  gap: 12px;
  align-items: stretch;
  justify-items: stretch;
  padding: 8px;
}

#cheatmp-arena-panel #cheatmp-chat-container,
#cheatmp-arena-panel #cheatmp-log-container {
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: 100%;
}

#cheatmp-arena-panel #cheatmp-chat-container .cheatmp-status-card {
  overflow: auto;
}

#cheatmp-arena-panel .cheatmp-table-wrap {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  align-self: stretch;
}

#cheatmp-arena-panel .cheatmp-table {
  top: 0;
  width: min(460px, calc(100% - 24px));
  height: min(460px, calc(100% - 24px));
  min-width: 300px;
  min-height: 300px;
}

#cheatmp-arena-panel .cheatmp-seat {
  width: 230px;
  height: 230px;
}

#cheatmp-arena-panel #cheatmp-seat-1 { left: 50%; top: 90%; }
#cheatmp-arena-panel #cheatmp-seat-2 { left: 77%; top: 76%; }
#cheatmp-arena-panel #cheatmp-seat-3 { left: 88%; top: 50%; }
#cheatmp-arena-panel #cheatmp-seat-4 { left: 77%; top: 24%; }
#cheatmp-arena-panel #cheatmp-seat-5 { left: 50%; top: 10%; }
#cheatmp-arena-panel #cheatmp-seat-6 { left: 23%; top: 24%; }
#cheatmp-arena-panel #cheatmp-seat-7 { left: 12%; top: 50%; }
#cheatmp-arena-panel #cheatmp-seat-8 { left: 23%; top: 76%; }

#cheatmp-arena-panel .seat-chao {
  height: 155px;
}

#cheatmp-arena-panel .seat-chao-scale {
  transform: translateX(-50%) scale(1.6);
}

#cheatmp-arena-panel .seat-name {
  top: 48px;
  font-size: 15px;
  line-height: 1.1;
  padding: 0 8px;
}

#cheatmp-arena-panel .seat-cardcount {
  top: 76px;
  font-size: 14px;
}

#cheatmp-arena-panel .cheatmp-side.cheatmp-log {
  min-width: 0;
}

#cheatmp-arena-panel .cheatmp-log-title {
  font-size: 20px;
}

#cheatmp-arena-panel #cheatmp-turn-log {
  font-size: 14px;
  overflow: auto;
}

#cheatmp-arena-panel #cheatmp-turn-log .cheatmp-log-line {
  line-height: 1.25;
}

#cheatmp-arena-panel .cheatmp-status-title {
  font-size: 16px;
}

#cheatmp-arena-panel .cheatmp-status-row,
#cheatmp-arena-panel .cheatmp-status-copy {
  font-size: 13px;
}

@media (max-width: 1500px) {
  #cheatmp-arena-panel .cheatmp-arena-wrapper {
    grid-template-columns: clamp(240px, 21vw, 320px) minmax(0, 1fr) clamp(200px, 17vw, 260px);
  }
  #cheatmp-arena-panel .cheatmp-table {
    width: min(400px, calc(100% - 16px));
    height: min(400px, calc(100% - 16px));
    min-width: 260px;
    min-height: 260px;
  }
  #cheatmp-arena-panel .cheatmp-seat {
    width: 190px;
    height: 190px;
  }
  #cheatmp-arena-panel .seat-chao {
    height: 128px;
  }
  #cheatmp-arena-panel .seat-chao-scale {
    transform: translateX(-50%) scale(1.35);
  }
  #cheatmp-arena-panel .seat-name {
    top: 36px;
    font-size: 13px;
  }
  #cheatmp-arena-panel .seat-cardcount {
    top: 60px;
    font-size: 13px;
  }
}

/* ==== Play Cards submode controls ==== */
.playcards-submode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.playcards-submode-btn,
.playcards-start-btn,
.playcards-target-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(28,39,54,0.96), rgba(16,22,31,0.96));
  color: #e9eef5;
  border-radius: 10px;
  min-height: 34px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}
.playcards-submode-btn.active,
.playcards-target-btn.active {
  border-color: rgba(255,217,102,0.9);
  box-shadow: 0 0 0 1px rgba(255,217,102,0.45) inset;
}
.playcards-submode-btn:disabled,
.playcards-target-btn:disabled,
.playcards-start-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.playcards-start-btn {
  width: 100%;
  background: linear-gradient(180deg, rgba(46,121,59,0.98), rgba(31,88,43,0.98));
  border-color: rgba(132,255,162,0.35);
  font-weight: 700;
}
.playcards-wait-copy {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: #cbd6e2;
  font-size: 12px;
  line-height: 1.4;
}
.playcards-setup-actions {
  margin-bottom: 10px;
}
.playcards-target-picker {
  margin: 10px 0 12px;
}
.playcards-target-title {
  color: #9db0c4;
  font-size: 11px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.playcards-target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#cheatmp-arena-panel .cheatmp-seat.is-target-seat {
  outline: 2px solid rgba(255,217,102,0.9);
  outline-offset: 4px;
}
