.bgwd-tool {
  max-width: 980px;
  margin: 20px auto;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: #202124;
  line-height: 1.65;
}

.bgwd-card {
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
}

.bgwd-title {
  margin: 0 0 6px;
  font-size: 28px;
  color: #1a73e8;
}

.bgwd-description {
  margin: 0 0 12px;
  color: #5f6368;
}

.bgwd-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.bgwd-input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bgwd-input {
  flex: 1 1 360px;
  min-width: 220px;
  border: 1px solid #c7c9cc;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
}

.bgwd-helper-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #5f6368;
}

.bgwd-btn {
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #202124;
  padding: 8px 14px;
  cursor: pointer;
}

.bgwd-btn:hover {
  background: #f1f3f4;
}

.bgwd-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.bgwd-btn-primary {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}

.bgwd-btn-primary:hover {
  background: #1558b0;
}

.bgwd-loading {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #174ea6;
}

.bgwd-loading[hidden],
[data-bgwd-result][hidden] {
  display: none !important;
}

.bgwd-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #bcd3f7;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: bgwd-spin 0.9s linear infinite;
}

@keyframes bgwd-spin {
  to {
    transform: rotate(360deg);
  }
}

.bgwd-messages {
  margin-top: 10px;
}

.bgwd-message {
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
}

.bgwd-message.error {
  background: #fce8e6;
  color: #a50e0e;
}

.bgwd-message.warn {
  background: #fef7e0;
  color: #7a4f01;
}

.bgwd-section-title {
  margin: 18px 0 10px;
  font-size: 18px;
  border-bottom: 1px solid #eceff1;
  padding-bottom: 6px;
}

.bgwd-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.bgwd-kv {
  border: 1px solid #e6e9ed;
  border-radius: 6px;
  padding: 10px;
  background: #fafbfc;
}

.bgwd-kv .k {
  font-size: 12px;
  color: #5f6368;
}

.bgwd-kv .v {
  margin-top: 4px;
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bgwd-note {
  margin: 10px 0;
  color: #5f6368;
  font-size: 13px;
}

.bgwd-table-wrap {
  overflow-x: auto;
}

.bgwd-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d7dbe3;
}

.bgwd-table th,
.bgwd-table td {
  border: 1px solid #d7dbe3;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bgwd-table th {
  background: #eef2f8;
}

.bgwd-raw-details {
  margin-top: 10px;
}

.bgwd-code {
  background: #f8f9fa;
  border: 1px solid #eceff1;
  border-radius: 6px;
  padding: 8px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.bgwd-copy-row {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.bgwd-dns-card {
  border: 1px solid #e5e7ea;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  background: #fff;
}

.bgwd-dns-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bgwd-muted {
  color: #5f6368;
  font-size: 13px;
}

.bgwd-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  border: 0;
  background: #e8eaed;
  color: #3c4043;
  cursor: help;
  padding: 0;
}

.bgwd-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  background: #202124;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.bgwd-soa-sub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px;
  font-size: 13px;
}
