.pe-intro {
  padding: 22px 0 18px;
}
.pe-intro h1 {
  font-size: 30px;
}
.pe-main-toolbar {
  display: flex;
  align-items: end;
  gap: 9px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.pe-main-toolbar label {
  display: grid;
  gap: 5px;
  font-size: 9px;
  color: var(--muted);
}
.pe-main-toolbar input,
.pe-main-toolbar select {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  font-size: 11px;
  padding: 8px 9px;
  height: 34px;
  max-width: 175px;
}
.pe-main-toolbar .pe-find {
  flex: 1;
  min-width: 150px;
  max-width: 240px;
}
.pe-find input {
  max-width: none;
  width: 100%;
}
.pe-main-toolbar button {
  font-size: 10px;
  padding: 9px 10px;
  height: 34px;
}
.pe-edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #e4eadd;
  border: 1px solid #cdd7c7;
  border-radius: 6px 6px 0 0;
  padding: 10px 12px;
  flex-wrap: wrap;
}
.pe-edit-toolbar .button-group {
  flex-wrap: wrap;
}
.pe-edit-toolbar button {
  padding: 6px 9px;
  font-size: 10px;
}
.pe-edit-toolbar .toolbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pe-edit-toolbar #pe-change-count {
  font-size: 10px;
  color: var(--muted);
}
.pe-formula {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 0;
  padding: 7px 12px;
  font-size: 11px;
}
.pe-formula #pe-address {
  min-width: 47px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  color: var(--moss);
  font-weight: 650;
}
.pe-formula #pe-field-name {
  font-size: 10px;
  color: var(--muted);
  min-width: 70px;
}
.pe-formula input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 5px;
  font-size: 12px;
}
.pe-formula #pe-selection-count {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.pe-workspace {
  display: grid;
  grid-template-columns:
    minmax(300px, min(var(--list-width), calc(100% - 288px)))
    8px minmax(270px, 1fr);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  overflow: hidden;
  height: calc(100vh - 345px);
  min-height: 480px;
  max-height: 1100px;
  background: var(--white);
}
.pe-grid-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.pe-scroll {
  overflow: auto;
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.pe-grid {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  user-select: none;
}
.studio-main .pe-grid th,
.studio-main .pe-grid td {
  padding: 0;
  margin: 0;
  text-align: left;
  position: relative;
  min-width: 0;
  border-right: 1px solid #dde1d7;
  border-bottom: 1px solid #e1e4db;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.3;
  background: #fcfaf5;
}
.studio-main .pe-grid thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #e6ebdf;
  height: 34px;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}
.pe-grid thead button {
  display: flex;
  gap: 7px;
  align-items: center;
  text-align: left;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px 0 8px;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pe-grid thead button small {
  font-size: 8px;
  color: #718167;
}
.studio-main .pe-grid .pe-filters th {
  top: 34px;
  height: 31px;
  background: #f0f2e8;
  padding: 4px;
}
.pe-filters input {
  padding: 2px 4px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 10px;
  width: 100%;
  height: 23px;
  border-radius: 3px;
}
.pe-filters input:focus,
.pe-filters input:not(:placeholder-shown) {
  background: white;
  border-color: #c6d3bd;
}
.pe-grid .pe-column-resizer {
  position: absolute;
  inset: 0 0 0 auto;
  width: 6px;
  cursor: col-resize;
  touch-action: none;
  z-index: 7;
}
.pe-column-resizer:hover {
  background: #99b28e;
}
.pe-column-resizer:focus {
  outline: 2px solid var(--moss);
  outline-offset: -2px;
}
.studio-main .pe-grid .pe-corner {
  position: sticky;
  left: 0;
  z-index: 8;
  text-align: center;
  width: 42px;
  background: #e5eadf;
}
.studio-main .pe-grid .pe-frozen {
  position: sticky;
  left: 42px;
  z-index: 2;
  border-right: 2px solid #c8d3c0;
}
.studio-main .pe-grid thead .pe-frozen {
  z-index: 6;
}
.studio-main .pe-grid .pe-row-number {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #eef0e7;
  width: 42px;
  text-align: center;
}
.pe-row-number button {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 4px;
  background: transparent;
  font-size: 10px;
  color: #76836e;
}
.studio-main .pe-grid td {
  height: 36px;
  cursor: cell;
  padding: 7px 8px;
  text-overflow: ellipsis;
  outline: none;
  vertical-align: middle;
  scroll-margin-top: 67px;
  scroll-margin-left: 190px;
}
.studio-main .comfortable .pe-grid td {
  height: 46px;
  padding: 11px 8px;
}
.pe-value {
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.pe-empty {
  color: #bec6b5;
}
.studio-main .pe-grid .pe-readonly {
  color: #7c8475;
  background: #f0f2ea;
}
.studio-main .pe-grid .pe-selected {
  background: #e2edde;
  box-shadow: inset 0 0 0 1px #c4d7ba;
}
.studio-main .pe-grid .pe-focus {
  box-shadow: inset 0 0 0 2px #3e6844;
  z-index: 3;
}
.studio-main .pe-grid .pe-focused-row .pe-row-number {
  background: #d2e1c7;
  color: #274b2d;
}
.pe-grid .pe-changed:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-top: 6px solid #6c9656;
  border-left: 6px solid transparent;
  pointer-events: none;
}
.studio-main .pe-grid .pe-invalid {
  background: #f8e5dc;
  box-shadow: inset 0 -2px #b55a3c;
}
.studio-main .pe-grid .pe-invalid.pe-focus {
  box-shadow: inset 0 0 0 2px #b55a3c;
}
.studio-main .pe-grid .pe-row-context {
  display: block;
  font-size: 8px;
  color: #7a8571;
  margin-top: 1px;
  line-height: 1.15;
}
.pe-grid .pe-cell-editor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid #3e6844;
  padding: 6px;
  font: inherit;
  background: white;
  color: var(--ink);
  border-radius: 0;
  z-index: 10;
  resize: none;
  min-height: 0;
}
.pe-grid-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  font-size: 10px;
  background: #edf0e5;
  color: var(--muted);
  border-top: 1px solid var(--line);
  min-height: 34px;
}
.pe-grid-status #pe-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pe-workspace .canvas-panel {
  height: auto;
}
.pe-workspace .canvas-heading {
  padding: 14px 16px;
}
.pe-workspace .canvas-heading h3 {
  font-size: 15px;
}
.pe-workspace .canvas-footer > span {
  display: none;
}
.pe-workspace .canvas-footer {
  padding: 10px;
  justify-content: flex-end;
}
.pe-workspace .canvas-footer button {
  padding: 6px;
  font-size: 9px;
}
.pe-workspace .plan-stage {
  min-height: 0;
}
.pe-errors {
  margin-top: 13px;
  padding: 12px 15px;
  border: 1px solid #dbb09a;
  background: #f8e9df;
  border-radius: 5px;
  font-size: 12px;
}
.pe-errors summary {
  cursor: pointer;
}
.pe-errors button {
  display: block;
  text-align: left;
  white-space: normal;
  width: 100%;
  font-size: 11px;
  margin-top: 8px;
  background: #fff9f3;
  border-color: #e3cabc;
}
.pe-help {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.pe-help summary {
  cursor: pointer;
  font-weight: 550;
}
.pe-help p {
  max-width: 1000px;
}
.pe-column-option {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.pe-column-option label {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  font-size: 12px;
}
.pe-column-option input {
  width: 15px;
  accent-color: var(--moss);
}
.pe-column-option button {
  padding: 5px 10px;
}
.pe-review {
  max-height: 360px;
  overflow: auto;
}
.pe-review th,
.pe-review td {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pe-review td {
  max-width: 240px;
}
.editor-dialog textarea[name="pasted"],
#pe-copy-text {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid var(--line);
}
@media (min-width: 1700px) {
  .pe-workspace {
    grid-template-columns:
      minmax(400px, min(var(--list-width), calc(100% - 338px)))
      8px minmax(320px, 1fr);
  }
}
@media (max-width: 1100px) {
  .pe-workspace {
    grid-template-columns:
      minmax(280px, min(var(--list-width), calc(100% - 248px)))
      8px minmax(230px, 1fr);
  }
  .pe-edit-toolbar .toolbar-right {
    margin-left: 0;
    justify-content: flex-start;
  }
  .pe-edit-toolbar #pe-change-count {
    width: 100%;
  }
  .pe-formula #pe-field-name {
    display: none;
  }
  .pe-workspace .canvas-heading {
    display: block;
  }
  .pe-workspace .canvas-heading select {
    margin-top: 7px;
  }
  .pe-intro h1 {
    font-size: 27px;
  }
}
@media (max-width: 700px) {
  .pe-workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .pe-grid-panel {
    height: 430px;
    flex: none;
  }
  .pe-workspace .splitter {
    display: none;
  }
  .pe-workspace .canvas-panel {
    height: 560px;
    flex: none;
  }
  .pe-main-toolbar label {
    flex: 1 1 130px;
  }
  .pe-main-toolbar input,
  .pe-main-toolbar select {
    max-width: none;
    width: 100%;
  }
  .pe-main-toolbar .pe-find {
    max-width: none;
  }
  .pe-main-toolbar button {
    flex: 1 1 130px;
  }
  .pe-edit-toolbar .toolbar-right {
    width: 100%;
  }
  .pe-formula {
    gap: 5px;
    padding: 6px;
  }
  .pe-formula #pe-selection-count {
    font-size: 9px;
  }
  .pe-grid-status {
    font-size: 9px;
  }
  .pe-intro h1 {
    font-size: 27px;
  }
  .pe-main-toolbar {
    gap: 7px;
  }
}
