.bcw-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid #f3c27a;
  border-radius: 14px;
  background: #fff8ec;
  color: #6b4500;
  font-size: 14px;
  line-height: 1.65;
}

.bcw-alert svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bcw-alert strong {
  display: block;
  margin-bottom: 2px;
}

.bcw-form select,
.bcw-form input[type="password"],
.bcw-form input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--bt-border, #dce5ef);
  border-radius: 10px;
  background: var(--bt-card, #fff);
  color: inherit;
  font-family: inherit;
  font-size: 14px;
}

.bcw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.bcw-secret-input {
  display: flex;
  gap: 8px;
}

.bcw-secret-input input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bcw-out {
  margin-top: 26px;
  overflow-wrap: anywhere;
}

.bcw-out h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.bcw-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--bt-border, #e3eaf1);
  border-radius: 12px;
  background: var(--bt-card, #fff);
}

.bcw-field-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  grid-column: 1;
}

.bcw-field-body {
  display: grid;
  gap: 8px;
  grid-column: 1;
}

.bcw-label {
  font-size: 13px;
  font-weight: 700;
}

.bcw-field-head small,
.bcw-meta {
  color: var(--bt-muted, #64748b);
  font-size: 12px;
}

.bcw-value {
  display: block;
  padding: 0;
  background: none;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-all;
}

.bcw-field-tools,
.bcw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bcw-actions {
  margin-top: 16px;
}

.bcw-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--bt-border, #dce5ef);
  border-radius: 999px;
  background: var(--bt-card, #fff);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bcw-chip:hover {
  border-color: #168dca;
  color: #168dca;
}

.bcw-qr {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 112px;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  line-height: 0;
}

.bcw-qr svg {
  width: 100%;
  height: auto;
}

.bcw-secret {
  border-color: #f3c27a;
  background: #fffaf2;
}

.bcw-secret[data-hidden] .bcw-value,
.bcw-secret[data-hidden] .bcw-words,
.bcw-secret[data-hidden] .bcw-qr {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.bcw-words {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
  margin: 0 0 6px;
  padding: 0;
  counter-reset: word;
  list-style: none;
}

.bcw-words li {
  padding: 8px 10px;
  border: 1px solid var(--bt-border, #e3eaf1);
  border-radius: 8px;
  background: var(--bt-card, #fff);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  counter-increment: word;
}

.bcw-words li::before {
  content: counter(word) ". ";
  color: var(--bt-muted, #64748b);
  font-size: 12px;
}

.bcw-more {
  margin: 4px 0 8px;
}

.bcw-more summary {
  margin-bottom: 12px;
  color: #168dca;
  font-weight: 700;
  cursor: pointer;
}

.bcw-warn {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8ec;
  color: #6b4500;
  font-size: 13px;
  line-height: 1.6;
}

.bcw-table {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--bt-border, #e3eaf1);
  border-radius: 12px;
}

.bcw-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bcw-table th,
.bcw-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--bt-border, #e3eaf1);
  text-align: left;
  vertical-align: top;
}

.bcw-table td {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.bcw-table tr:last-child td {
  border-bottom: 0;
}

.bcw-secret-cell {
  filter: blur(5px);
  user-select: none;
}

.bcw-show-keys .bcw-secret-cell {
  filter: none;
  user-select: text;
}

#bcw-print {
  display: none;
}

@media (max-width: 700px) {
  .bcw-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bcw-field {
    grid-template-columns: minmax(0, 1fr);
  }

  .bcw-qr {
    grid-column: 1;
    grid-row: auto;
    width: 132px;
  }

  .bcw-words {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  body > *:not(#bcw-print) {
    display: none !important;
  }

  #bcw-print {
    display: block;
    color: #000;
    font-family: Arial, sans-serif;
  }

  #bcw-print * {
    color: #000 !important;
    background: none !important;
  }

  #bcw-print h1 {
    font-size: 22px;
  }

  #bcw-print p {
    font-size: 12px;
  }

  .bcw-print-part {
    margin: 18px 0;
    padding: 14px;
    border: 1px dashed #000;
    page-break-inside: avoid;
  }

  .bcw-print-part h2 {
    margin: 0 0 8px;
    font-size: 15px;
  }

  .bcw-print-part .bcw-qr {
    display: block;
    width: 150px;
    margin-bottom: 8px;
  }

  .bcw-print-part code {
    font-family: "Courier New", monospace;
    font-size: 14px;
    word-break: break-all;
  }
}
