.offline-parameter-toggle {
  position: fixed;
  right: 24px;
  bottom: 80px;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 142px;
  gap: 7px;
  padding: 13px 10px 13px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 45, 72, .14);
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.floating-edit-button {
  position: fixed;
  right: 24px;
  bottom: 142px;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 142px;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 45, 72, .14);
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}

.floating-edit-button:hover,
.floating-edit-button:focus-visible {
  border-color: #9eb5da;
  background: #eef4ff;
  color: #244f96;
  outline: none;
}

.offline-parameter-toggle b {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  font-size: 11px;
}

.offline-parameter-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(var(--reference-panel-width, 560px), 90vw);
  box-sizing: border-box;
  overflow-y: auto;
  padding: 22px;
  border-left: 1px solid var(--border);
  background: #f7f9fc;
  box-shadow: -18px 0 45px rgba(31, 45, 72, .16);
  transform: translateX(105%);
  transition: transform .2s ease;
}

.offline-parameter-panel.open {
  transform: translateX(0);
}

.reference-panel-resizer{position:fixed;top:0;bottom:0;width:18px;z-index:63;cursor:col-resize;touch-action:none;user-select:none;display:grid;place-items:center;background:transparent;border:0;padding:0}
.reference-panel-resizer[hidden]{display:none}
.reference-panel-resizer::after{content:'';height:56px;width:5px;border-radius:5px;background:#94a8c7;box-shadow:0 0 0 3px rgba(255,255,255,.8)}
.reference-panel-resizer:hover::after,.reference-panel-resizer:focus-visible::after{background:#315da8}
.reference-panel-resizer:focus-visible{outline:2px solid #315da8;outline-offset:-2px}
body.reference-panel-resizing,body.reference-panel-resizing *{cursor:col-resize!important;user-select:none!important}
body.reference-panel-resizing .offline-parameter-panel iframe{pointer-events:none}

.offline-parameter-head,
.offline-parameter-head > div,
.offline-parameter-actions {
  display: flex;
  align-items: center;
}

.offline-parameter-head {
  position: sticky;
  top: -22px;
  z-index: 2;
  justify-content: space-between;
  margin: -22px -22px 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 249, 252, .96);
  backdrop-filter: blur(10px);
}

.offline-parameter-head > div {
  gap: 8px;
}

.offline-parameter-head p,
.offline-parameter-head h2 {
  margin: 0;
}

.offline-parameter-head p {
  color: var(--blue);
  font-weight: 750;
}

.offline-parameter-close {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 26px;
}

.offline-parameter-list {
  display: grid;
  gap: 12px;
}

.offline-parameter-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.offline-parameter-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.offline-parameter-item summary::-webkit-details-marker {
  display: none;
}

.offline-parameter-item summary span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.offline-parameter-item summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offline-parameter-item summary small,
.offline-parameter-item summary i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.offline-parameter-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.offline-parameter-content {
  padding-top: 16px;
}

.offline-parameter-content img {
  max-width: 100%;
  height: auto;
}

.offline-parameter-actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.offline-parameter-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.offline-parameter-actions label {
  cursor: pointer;
}

.offline-parameter-actions button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.offline-parameter-note,
.offline-parameter-error {
  margin-top: 14px;
}

.offline-parameter-error,
.text-danger {
  color: #a33a32;
}

.offline-parameter-empty {
  padding: 34px 20px;
  text-align: center;
}

@media (max-width: 800px) {
  .offline-parameter-toggle {
    top: auto;
    right: 14px;
    bottom: 130px;
  }

  .floating-edit-button {
    right: 14px;
    bottom: 192px;
  }

  .offline-parameter-panel {
    top: auto;
    width: min(var(--reference-panel-width, 90vw), 90vw);
    max-height: 82vh;
    padding: 18px;
    border-top: 1px solid var(--border);
    border-left: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
  }

  .offline-parameter-panel.open {
    transform: translateY(0);
  }

  .offline-parameter-head {
    top: -18px;
    margin: -18px -18px 14px;
    padding: 14px 18px;
  }
}
