.bgpw-wrap {
  max-width: 860px;
  margin: 18px auto;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: #333;
  font-size: 14px;
  line-height: 1.7;
}

.bgpw-main-title {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.2;
  color: #2a76be;
  font-weight: 700;
}

.bgpw-main-description {
  margin: 0 0 14px;
  font-size: 13px;
  color: #666;
}

.bgpw-panel {
  border: 1px solid #cfcfcf;
  background: #fff;
}

.bgpw-form-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  border-top: 1px solid #dedede;
}

.bgpw-form-row:first-child {
  border-top: none;
}

.bgpw-row-label {
  background: #f5f5f5;
  border-right: 1px solid #dedede;
  padding: 11px 12px;
  font-weight: 700;
  font-size: 13px;
}

.bgpw-row-input {
  padding: 11px 12px;
}

.bgpw-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}

.bgpw-inline-options label,
.bgpw-symbol-grid label,
.bgpw-block-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
}

.bgpw-inline-options input[type="checkbox"],
.bgpw-inline-options input[type="radio"],
.bgpw-symbol-grid input[type="checkbox"],
.bgpw-block-options input[type="checkbox"] {
  margin: 0;
}

.bgpw-mt-8 {
  margin-top: 8px;
}

.bgpw-symbol-block {
  margin-top: 8px;
  border: 1px solid #d9d9d9;
  background: #fafafa;
  padding: 8px 10px;
}

.bgpw-symbol-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px 10px;
}

.bgpw-help {
  margin: 6px 0 0;
  font-size: 12px;
  color: #666;
}

.bgpw-input-num {
  width: 88px;
  height: 30px;
  border: 1px solid #bcbcbc;
  padding: 3px 7px;
  font-size: 14px;
  border-radius: 2px;
  box-sizing: border-box;
}

.bgpw-input-range {
  width: 220px;
  height: 20px;
}

.bgpw-mini-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  background: #f9f9f9;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bgpw-mini-btn.is-active {
  border-color: #3aa25c;
  background: #eaf8ef;
  color: #1d783d;
}

.bgpw-block-options {
  display: grid;
  gap: 6px;
}

.bgpw-actions {
  margin: 16px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bgpw-action-btn {
  height: 40px;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
}

.bgpw-generate {
  background: #26b24a;
}

.bgpw-reset {
  background: #444;
}

.bgpw-download {
  background: #2580d8;
}

.bgpw-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bgpw-error {
  border: 1px solid #dc9d9d;
  background: #fff2f2;
  color: #b04242;
  padding: 9px 10px;
  font-size: 13px;
  margin-top: 10px;
}

.bgpw-copy-notice {
  margin: 12px 0 8px;
  font-size: 12px;
  color: #555;
}

.bgpw-result-block {
  border: 1px solid #d0d0d0;
  background: #fff;
}

.bgpw-result-title {
  padding: 8px 10px;
  background: #f5f5f5;
  border-bottom: 1px solid #dcdcdc;
  font-size: 13px;
  font-weight: 700;
}

.bgpw-result-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.bgpw-result-item {
  border: 1px solid #efefef;
  padding: 8px 10px;
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  word-break: break-all;
}

.bgpw-result-item:hover,
.bgpw-result-item:focus {
  background: #f0f8ff;
  outline: none;
}

.bgpw-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 3px;
  z-index: 99999;
}

.bgpw-toast.is-error {
  background: rgba(155, 34, 34, 0.9);
}

@media (max-width: 768px) {
  .bgpw-main-title {
    font-size: 24px;
  }

  .bgpw-form-row {
    grid-template-columns: 1fr;
  }

  .bgpw-row-label {
    border-right: none;
    border-bottom: 1px solid #dedede;
  }

  .bgpw-symbol-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .bgpw-actions {
    flex-direction: column;
  }

  .bgpw-action-btn {
    width: 100%;
  }

  .bgpw-result-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .bgpw-result-list {
    grid-template-columns: 1fr;
  }
}