.rcb3 { max-width: 640px; }
.rcb3-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.rcb3-tab {
  padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.rcb3-tab-active { background: #19616a; border-color: #19616a; color: #fff; }
.rcb3-panel { display: flex; flex-direction: column; gap: 12px; }
.rcb3-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.rcb3-panel input, .rcb3-panel select { padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; }
.rcb3-panel input:focus, .rcb3-panel select:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.rcb3-row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rcb3-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rcb3-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rcb3-check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.rcb3-check {
  flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 700;
}
.rcb3-check input[type="checkbox"] { width: auto; padding: 0; }
.rcb3-check-inline { justify-content: flex-end; }

.rcb3-slider-row { display: flex; align-items: center; gap: 10px; }
.rcb3-slider-row input[type="range"] { flex: 1 1 auto; }
.rcb3-slider-row output {
  min-width: 52px; text-align: center; font-size: 13px; font-weight: 700; color: #19616a;
  background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px; padding: 4px 6px;
}

.rcb3-subhead { font-size: 12.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: 0.03em; margin: 4px 0 -4px; }

.rcb3-out { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rcb3-cmd {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
}
.rcb3-cmd code { font-family: ui-monospace, monospace; font-size: 13.5px; color: #19616a; font-weight: 700; }
.rcb3-cmd span { font-size: 12.5px; color: #5b6b56; }

.rcb3-result {
  padding: 14px 16px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
  display: flex; flex-direction: column; gap: 6px;
}
.rcb3-result-big { font-size: 22px; font-weight: 800; color: #19616a; }
.rcb3-result-line { font-size: 13px; color: #27331f; display: flex; justify-content: space-between; gap: 10px; }
.rcb3-result-line b { color: #27331f; }

.rcb3-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rcb3-table th, .rcb3-table td { text-align: left; padding: 7px 9px; border-bottom: 1px solid #d9e0d4; }
.rcb3-table th { color: #5b6b56; font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.rcb3-table td { color: #27331f; }
.rcb3-table tfoot td { font-weight: 800; color: #19616a; border-bottom: none; border-top: 2px solid #d9e0d4; }

.rcb3-hint { font-size: 12.5px; color: #5b6b56; margin: 4px 0 0; }
.rcb3-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }
.rcb3-tabnote { font-size: 12.5px; color: #5b6b56; margin: 2px 0 0; padding-top: 8px; border-top: 1px dashed #d9e0d4; }

.rcb3-canvas-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rcb3-canvas-wrap canvas {
  background: #fff; border: 1px solid #d9e0d4; border-radius: 6px; image-rendering: pixelated;
  max-width: 100%;
}
.rcb3-grid {
  font-family: ui-monospace, monospace; font-size: 10px; line-height: 10px; letter-spacing: 1px;
  background: #fff; border: 1px solid #d9e0d4; border-radius: 6px; padding: 10px; overflow-x: auto;
  white-space: pre; color: #19616a; max-width: 100%;
}

@media (max-width: 480px) {
  .rcb3-row2, .rcb3-row3, .rcb3-row4 { grid-template-columns: 1fr; }
}
