.cq-wrap {
  width: 100%;
  padding: 4px 0 28px;
  box-sizing: border-box;
}

.cq-hint {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
}

.cq-hint code,
.cq-intro code {
  font-size: 13px;
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}

.cq-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.cq-tab {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}

.cq-tab.is-on {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

.cq-field {
  margin-bottom: 14px;
}

.cq-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.cq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cq-input,
.cq-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}

.cq-date {
  width: auto;
  min-width: 180px;
  max-width: 240px;
  flex: 0 1 240px;
}

.cq-textarea {
  min-height: 110px;
  resize: vertical;
}

.cq-input:focus,
.cq-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.cq-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.cq-check input {
  margin-top: 3px;
}

.cq-error {
  margin: 0 0 12px;
  font-size: 14px;
  color: #dc2626;
}

.cq-check-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin: 8px 0 16px;
  padding: 18px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.cq-box {
  min-width: 88px;
  padding: 6px 10px 4px;
  border-bottom: 2px solid #111827;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: #111827;
  text-align: center;
}

.cq-unit {
  font-size: 20px;
  color: #111827;
  padding-bottom: 4px;
}

.cq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

.cq-btn-primary {
  background: #10b981;
  color: #fff;
}

.cq-btn-primary:hover {
  background: #059669;
}

.cq-btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.cq-btn-secondary:hover {
  background: #d1d5db;
}

.cq-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.cq-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.cq-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  background: #fff;
}

.cq-table th,
.cq-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  font-size: 14px;
  color: #111827;
}

.cq-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.cq-table tbody tr:last-child td {
  border-bottom: none;
}

.cq-intro {
  margin-top: 28px;
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.cq-intro h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.cq-intro h2:not(:first-child) {
  margin-top: 20px;
}

.cq-intro h3 {
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.cq-intro p,
.cq-intro li {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}

.cq-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  z-index: 40;
}

@media (max-width: 640px) {
  .cq-box {
    min-width: 64px;
    font-size: 18px;
  }
  .cq-unit {
    font-size: 16px;
  }
}
