/* Embedded workspaces retain normal flow. The homepage has a nonmodal side panel. */
.development-tools-inline {
  box-sizing: border-box;
  width: min(calc(100% - 24px), var(--dev-inline-width, 960px));
  margin: 0 0 36px min(var(--dev-inline-left, 12px), calc(100% - 24px));
  padding-top: clamp(24px, 4vh, 44px);
  scroll-margin-top: 16px;
}
.development-tools-inline[hidden] { display: none !important; }
.development-tools-inline .dev-tools-inline-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(12px, 2vw, 20px);
}
.development-tools-inline .dev-create-colors { display: flex; gap: 10px; margin-top: 12px; }
.development-tools-inline .dev-create-colors > button { flex: 1; min-height: 42px; }
.development-tools-inline .dev-create-picker {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}
.development-tools-inline .dev-create-picker > button { min-height: 44px; font-size: 22px; }
.development-tools-inline .dev-create-selection { display: grid; justify-items: center; gap: 7px; }
.development-tools-inline .dev-create-preview {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 55px;
  line-height: 1;
}
.development-tools-inline .dev-create-label { color: #f4f0df; font-size: 16px; }
.development-tools-inline #dev-create-cancel { background: #26352f; color: #f4f0df; }
.dev-creation-ghost {
  position: fixed !important;
  z-index: 10001;
  pointer-events: none;
  transform: translate(-50%, -50%) !important;
  line-height: 1 !important;
  filter: drop-shadow(0 4px 5px #0009);
  will-change: left, top;
}
.dev-creation-ghost[hidden] { display: none !important; }
body.dev-creation-active #board,
body.dev-creation-active #board .square { cursor: crosshair !important; }
/* An ended test position remains editable without its normal result card covering the board. */
body.dev-creation-active #game-over-overlay { display: none !important; }
@media (max-width: 600px) {
  .development-tools-inline .dev-history-controls { flex-wrap: wrap; }
  .development-tools-inline .dev-history-position { order: 3; flex-basis: 100%; }
  .development-tools-inline .dev-tool-actions { flex-wrap: wrap; }
}

.development-tools-docked {
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:0;
  overflow:hidden;
  border:1px solid #40564a;
  border-radius:8px;
  background:#17231f;
  color:#f4f0df;
  font-family:system-ui,sans-serif;
  isolation:isolate;
}
.development-tools-docked[data-placement="right"] {
  position:absolute;
  left:var(--dev-panel-left);
  top:var(--dev-panel-top);
  width:var(--dev-panel-width);
  height:var(--dev-panel-height);
  margin:0;
  z-index:18;
}
.development-tools-docked[data-placement="below"] {
  position:relative;
  width:min(calc(100% - 24px),var(--dev-inline-width,960px));
  height:min(740px,80dvh);
  margin:16px 0 24px min(var(--dev-inline-left,12px),calc(100% - 24px));
}
.development-panel-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex:0 0 auto;
  gap:8px;
  padding:9px 10px;
  border-bottom:1px solid #40564a;
}
.development-panel-header h2 {
  margin:0;
  min-width:0;
  color:#f4f0df;
  font:400 22px/1.1 "Bebas Neue",Impact,sans-serif;
  overflow-wrap:anywhere;
}
.development-panel-close {
  display:grid;
  place-items:center;
  flex:0 0 30px;
  width:30px;
  height:30px;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:4px;
  background:transparent;
  color:#f4f0df;
  font:24px/1 system-ui,sans-serif;
  cursor:pointer;
}
.development-panel-close:hover { background:#ffffff12; }
.development-panel-close:focus-visible { outline:2px solid #a294ff;outline-offset:1px; }
.development-tools-docked .dev-tools-inline-inner {
  flex:1 1 auto;
  min-width:0;
  min-height:0;
  padding:10px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#697d6d #17231f;
}
.development-tools-docked .dev-tools-inline-inner,
.development-tools-docked .dev-tools-inline-inner > .dev-tools {
  width:100%;
  max-width:none;
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.development-tools-docked .dev-tools-inline-inner > .dev-tools { box-sizing:border-box;padding:0; }
.development-tools-docked .dev-lock-panel { box-sizing:border-box;width:100%;padding:10px; }
.development-tools-docked .dev-lock-copy { min-width:0; }
.development-tools-docked .dev-lock-copy strong { font-size:14px; }
.development-tools-docked .dev-lock-copy small { font-size:11px; }
.development-tools-docked .dev-key-row { flex-wrap:wrap; }
.development-tools-docked .dev-key-input { width:100%;flex:1 1 110px;box-sizing:border-box; }
.development-tools-docked .dev-tools-heading { margin:0 0 8px;justify-content:flex-end; }
.development-tools-docked .dev-tools-heading > div { display:none; }
.development-tools-docked .dev-tool-card { box-sizing:border-box;min-width:0;padding:10px;margin-top:8px; }
.development-tools-docked .dev-tool-card:first-of-type { margin-top:0; }
.development-tools-docked .dev-tool-card h3 { font-size:14px; }
.development-tools-docked .dev-tool-copy,
.development-tools-docked .dev-tool-status { font-size:12px;line-height:1.4;overflow-wrap:anywhere; }
.development-tools-docked .dev-tool-actions { display:flex;flex-wrap:wrap;gap:6px; }
.development-tools-docked .dev-tool-actions > button { flex:1 1 115px;min-width:0;white-space:normal; }
.development-tools-docked .dev-create-colors { gap:6px;margin-top:8px; }
.development-tools-docked .dev-create-picker { grid-template-columns:34px minmax(0,1fr) 34px;gap:6px;margin:10px 0; }
.development-tools-docked .dev-create-picker > button { min-height:36px; }
.development-tools-docked .dev-create-preview { width:48px;height:48px;font-size:42px; }
.development-tools-docked .dev-create-label { font-size:14px; }
.development-tools-docked .dev-history-controls { flex-wrap:wrap;gap:6px; }
.development-tools-docked .dev-history-controls > button { flex:1 1 90px;white-space:normal; }
.development-tools-docked .dev-history-position { order:3;flex-basis:100%;text-align:center;white-space:normal; }
.development-tools-docked .dev-piece-inspector { min-width:0;flex-wrap:wrap; }
.development-tools-docked .dev-piece-label { min-width:0;white-space:normal;overflow-wrap:anywhere; }

.dev-silhouette-toggle { display:flex;align-items:center;gap:8px;margin:12px 0 6px;font:600 13px/1.3 system-ui,sans-serif;color:#f4f0df;cursor:pointer; }
.dev-silhouette-toggle input { width:16px;height:16px;margin:0;accent-color:#a294ff; }
.dev-create-preview .is-silhouette,
.dev-creation-ghost.is-silhouette { color:transparent!important;-webkit-text-stroke:2px #f4f0df;text-shadow:none!important; }
body.dev-chain-targeting #board,
body.dev-chain-targeting #board .square { cursor:crosshair!important; }
.dev-test-grants form { display:grid;gap:8px;margin:12px 0 0; }
.dev-test-grants label { display:grid;gap:6px;font:600 12px/1.4 system-ui,sans-serif;color:#f4f0df; }
.dev-test-grants select,
.dev-test-grants input {
  box-sizing:border-box;
  min-width:0;
  width:100%;
  min-height:36px;
  padding:7px 8px;
  border:1px solid #53685b;
  border-radius:5px;
  background:#26352f;
  color:#f4f0df;
  font:13px/1.3 system-ui,sans-serif;
}
.dev-test-grants .dev-points-row { display:flex;flex-wrap:wrap;gap:8px; }
.dev-test-grants .dev-points-row input { flex:1 1 90px; }
.dev-test-grants .dev-points-row button { flex:0 1 auto; }
.dev-test-grants [hidden] { display:none!important; }
.dev-test-grants :is(input,select):focus-visible { outline:2px solid #a294ff;outline-offset:2px; }
