.play-shell {
  min-height: calc(100vh - var(--topH));
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
}

/* _play_sidebar.html */
.play-left { padding: 18px; }

.play-left-card {
  height: calc(100vh - var(--topH) - 36px);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 20px 18px;
  overflow: hidden;
}

.play-left-title {
  font-size: 22px;
  color: rgba(210,176,106,0.92);
  margin-bottom: 14px;
}

.play-main-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 3 equal columns */
.play-main-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* Left column */
.play-title {
  justify-self: start;
  font-size: 42px;
  font-weight: 700;
  color: rgba(210,176,106,0.92);
}

/* Center column */
.play-difficulty {
  justify-self: center;
  display: flex;
  gap: 0;
}

/* Button styling */
.play-diff-btn {
  padding: 6px 20px;
  height: 34px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
}

.play-diff-btn:first-child {
  border-radius: 2px 0 0 2px;
}

.play-diff-btn:last-child {
  border-radius: 0 2px 2px 0;
}

.play-diff-btn:not(:last-child) {
  border-right: 1px solid rgba(0,0,0,0.25);
}

.play-diff-btn.is-active {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
  outline: 1px solid rgba(255,255,255,0.45);
}

.play-field {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.play-label {
  font-size: 18px;
  color: rgba(255,255,255,0.55);
}

.play-input {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  font-size: 18px;
  outline: none;
}

.play-inline-elo {
  font-size: 16px;
  color: rgba(255,255,255,0.38);
  padding-right: 6px;
}

/* tabs */
.play-tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.play-tab{
  height: 44px;
  background: transparent;
  border: none;
  color: rgba(210,176,106,0.70);
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
}

.play-tab.is-active{
  background: rgba(0,0,0,0.12);
  color: rgba(210,176,106,0.95);
  box-shadow: inset 0 -2px 0 rgba(210,176,106,0.65);
}

.play-tabpanes{ margin-top: 14px; }
.play-pane{ display: none; }
.play-pane.is-active{ display: block; }

.play-search { margin-top: 16px; padding-top: 12px; }

.play-search-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.play-search-label,
.play-sort-label {
  font-size: 18px;
  color: rgba(210,176,106,0.75);
}

.play-search-box-input{
  height: 30px;
  width: 100%;
  padding: 0 10px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.play-sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.play-sort-pill{
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.45);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

.play-elo-pop{
  margin-top: 10px;
  padding: 10px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.10);
  display: none;
}

.play-elo-pop.is-open{ display: block; }

.play-elo-row{
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.play-elo-input{
  height: 30px;
  padding: 0 10px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.play-elo-to{
  color: rgba(255,255,255,0.35);
  font-size: 16px;
}

.play-elo-clear{
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.35);
  font-family: inherit;
  cursor: pointer;
  padding: 0 4px;
}

.play-botlist {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
  padding-left: 8px;
  padding-right: 8px;
  height: calc(100% - 260px);
  overflow: auto;
}

/* bot rows */
.bot-row {
  height: 54px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 12px;
  width: 100%;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.08);
}

.bot-select-btn {
  all: unset;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  cursor: pointer;
}

.bot-name {
  font-size: 18px;
  color: rgba(255,255,255,0.55);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  justify-self: start;
}

.bot-meta {
  text-align: right;
  font-size: 14px;
  color: rgba(255,255,255,0.30);
  line-height: 1.1;
}

.bot-elo { margin-bottom: 2px; }

.bot-delete-btn {
  background: transparent;
  border: none;
  color: rgba(255,120,120,0.8);
  font-size: 18px;
  cursor: pointer;
  padding: 0 8px;
}

.bot-delete-btn:hover { color: rgba(255,80,80,1); }

.play-mine-note{
  font-size: 16px;
  color: rgba(255,255,255,0.40);
  margin-bottom: 10px;
  text-align: center;
}

.play-upload-form{
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.12);
}

.play-upload-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.play-upload-input{
  font-family: inherit;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.play-upload-btn{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.70);
  padding: 6px 12px;
  cursor: pointer;
}

.play-upload-error{
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255,120,120,0.8);
}

/* right side */
.play-main { padding: 22px 28px; position: relative; }

.play-main-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.play-back {
  font-size: 18px;
  color: rgba(210, 176, 106, 0.70);
  text-decoration: none;
  width: fit-content;
}

.play-title {
  font-size: 42px;
  font-weight: 700;
  color: rgba(210,176,106,0.92);
}

.play-stage {
  margin-top: 14px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.play-canvas {
  width: 620px;
  height: 360px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
}

.play-stage-controls {
  width: 620px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,0.35);
  font-size: 18px;
}

.play-stage-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.35);
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
}

.play-stage-debug input { margin-left: 10px; transform: translateY(1px); }

.play-debug {
  margin-top: 18px;
  display: grid;
  justify-items: center;
}

.play-debug-box {
  width: 620px;
  height: 150px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.35);
  overflow: auto;
  font-size: 14px;
  line-height: 1.25;
}
